diff options
author | Tristan van Berkom <tristan@codethink.co.uk> | 2020-09-04 18:15:09 +0900 |
---|---|---|
committer | Tristan van Berkom <tristan@codethink.co.uk> | 2020-09-18 12:38:49 +0900 |
commit | e135b78d04dd9688c36bcf97de66419e11c3ed46 (patch) | |
tree | 031342b65fd4829d5490f2342e9b6e3ed8ac6109 /tests | |
parent | 172c7404b00016cf7358af77b45b9d2a946af301 (diff) | |
download | buildstream-e135b78d04dd9688c36bcf97de66419e11c3ed46.tar.gz |
ScriptElement: Porting to new API
Instead of relying on Element.search(), use Element.configure_dependencies() to
configure the layout.
Summary of changes:
* scriptelement.py:
Change ScriptElement.layout_add() API to take an Element instead of an element name,
this is now not optional (one cannot specify a `None` element).
This is an API breaking change
* plugins/elements/script.py:
Implement Element.configure_dependencies() in order to call ScriptElement.layout_add().
This is a breaking YAML format change.
* tests/integration: Script integration tests updated to use the new YAML format
* tests/cachekey: Updated for `script` element changes
Diffstat (limited to 'tests')
8 files changed, 20 insertions, 44 deletions
diff --git a/tests/cachekey/project/elements/script1.expected b/tests/cachekey/project/elements/script1.expected index 71be17a37..5d9799f1a 100644 --- a/tests/cachekey/project/elements/script1.expected +++ b/tests/cachekey/project/elements/script1.expected @@ -1 +1 @@ -38078af3714d6d5128669dc7b4d7e942a46ea4137c388d44a1f455b4cc1918d0
\ No newline at end of file +1220b2849910f60f864c2c325cda301809dcb9b730281862448508fbeae5fb91
\ No newline at end of file diff --git a/tests/cachekey/project/target.expected b/tests/cachekey/project/target.expected index 38d4abeef..3a718b2ac 100644 --- a/tests/cachekey/project/target.expected +++ b/tests/cachekey/project/target.expected @@ -1 +1 @@ -5bf8ea2d6c0900c226c8fd3dae980f0b92e40f3fc1887b64d31bf04b6210d763
\ No newline at end of file +629e8d188cc2a88e2474bfabd45d4eb6d5e55435445bd1e5596953de564830dd
\ No newline at end of file diff --git a/tests/integration/project/elements/script/corruption-2.bst b/tests/integration/project/elements/script/corruption-2.bst index 39c4f2c23..75c5e92d0 100644 --- a/tests/integration/project/elements/script/corruption-2.bst +++ b/tests/integration/project/elements/script/corruption-2.bst @@ -1,10 +1,8 @@ kind: script -depends: -- filename: base.bst - type: build -- filename: script/corruption-image.bst - type: build +build-depends: +- base.bst +- script/corruption-image.bst config: commands: diff --git a/tests/integration/project/elements/script/corruption.bst b/tests/integration/project/elements/script/corruption.bst index 037d4daca..841a2dd69 100644 --- a/tests/integration/project/elements/script/corruption.bst +++ b/tests/integration/project/elements/script/corruption.bst @@ -1,21 +1,9 @@ kind: script -depends: -- filename: base.bst - type: build -- filename: script/corruption-image.bst - type: build -- filename: script/corruption-integration.bst - type: build +build-depends: +- base.bst +- script/corruption-image.bst +- script/corruption-integration.bst variables: install-root: "/" - -config: - layout: - - element: base.bst - destination: "/" - - element: script/corruption-image.bst - destination: "/" - - element: script/corruption-integration.bst - destination: "/" diff --git a/tests/integration/project/elements/script/marked-tmpdir.bst b/tests/integration/project/elements/script/marked-tmpdir.bst index 506cdd5f4..7abbd3261 100644 --- a/tests/integration/project/elements/script/marked-tmpdir.bst +++ b/tests/integration/project/elements/script/marked-tmpdir.bst @@ -1,8 +1,7 @@ kind: compose -depends: -- filename: base.bst - type: build +build-depends: +- base.bst public: bst: diff --git a/tests/integration/project/elements/script/script-layout.bst b/tests/integration/project/elements/script/script-layout.bst index 11ca353e3..f19b27e52 100644 --- a/tests/integration/project/elements/script/script-layout.bst +++ b/tests/integration/project/elements/script/script-layout.bst @@ -5,19 +5,12 @@ variables: install-root: /buildstream/nstall build-root: /buildstream/uild -depends: - - filename: base.bst - type: build +build-depends: + - base.bst - filename: script/script.bst - type: build + config: + location: /buildstream/uild config: - layout: - - element: base.bst - destination: / - - - element: script/script.bst - destination: /buildstream/uild - commands: - - "cp %{build-root}/test %{install-root}" + - "cp %{build-root}/test %{install-root}" diff --git a/tests/integration/project/elements/script/script.bst b/tests/integration/project/elements/script/script.bst index ffca23ab7..3f3eb55c7 100644 --- a/tests/integration/project/elements/script/script.bst +++ b/tests/integration/project/elements/script/script.bst @@ -1,9 +1,8 @@ kind: script description: Script test -depends: - - filename: base.bst - type: build +build-depends: +- base.bst config: commands: diff --git a/tests/integration/project/elements/script/tmpdir.bst b/tests/integration/project/elements/script/tmpdir.bst index 685a694ea..5fbf55dc9 100644 --- a/tests/integration/project/elements/script/tmpdir.bst +++ b/tests/integration/project/elements/script/tmpdir.bst @@ -1,8 +1,7 @@ kind: script -depends: -- filename: script/no-tmpdir.bst - type: build +build-depends: +- script/no-tmpdir.bst config: commands: |