diff options
author | Phillip Smyth <phillip.smyth@codethink.co.uk> | 2018-03-07 15:02:01 +0000 |
---|---|---|
committer | Phillip Smyth <phillip.smyth@codethink.co.uk> | 2018-03-26 15:27:47 +0000 |
commit | b0e6a45e7d34ef969734bc5c607ce97a229a4f77 (patch) | |
tree | f87ede105b8912851530a702f945aa614d344516 /tests/integration | |
parent | e91dc8336074d22126e559a29e23ef2d52c5506a (diff) | |
download | buildstream-b0e6a45e7d34ef969734bc5c607ce97a229a4f77.tar.gz |
Generate unique subdirs for built elements
Based on issue 89 (https://gitlab.com/BuildStream/buildstream/issues/89)
Ensuring that elements are staged into unique subdirs while building.
This patch supports that by doing the following:
* Modify project config to add 2 new variables ("project-name" and "element-name")
* Changed the default install-root from "/buildstream/install" to "/buildstream-install"
* Update the tests to accommodate these changes
* Update the expected cache keys in the tests
This fixes #89
Diffstat (limited to 'tests/integration')
-rw-r--r-- | tests/integration/project/elements/stack/another-hi.bst | 4 | ||||
-rw-r--r-- | tests/integration/project/elements/stack/hi.bst | 4 | ||||
-rw-r--r-- | tests/integration/script.py | 12 |
3 files changed, 10 insertions, 10 deletions
diff --git a/tests/integration/project/elements/stack/another-hi.bst b/tests/integration/project/elements/stack/another-hi.bst index eb98dea36..f83fdee82 100644 --- a/tests/integration/project/elements/stack/another-hi.bst +++ b/tests/integration/project/elements/stack/another-hi.bst @@ -7,5 +7,5 @@ depends: config: commands: - - "mkdir -p /buildstream/install" - - "echo 'Another hi' > /buildstream/install/another-hi" + - "mkdir -p %{install-root}" + - "echo 'Another hi' > %{install-root}/another-hi" diff --git a/tests/integration/project/elements/stack/hi.bst b/tests/integration/project/elements/stack/hi.bst index adbf81537..0aa2d32f2 100644 --- a/tests/integration/project/elements/stack/hi.bst +++ b/tests/integration/project/elements/stack/hi.bst @@ -4,5 +4,5 @@ depends: type: build config: commands: - - "mkdir -p /buildstream/install" - - "echo 'Hi' > /buildstream/install/hi" + - "mkdir -p %{install-root}" + - "echo 'Hi' > %{install-root}/hi" diff --git a/tests/integration/script.py b/tests/integration/script.py index 5ecc51973..88226c0b7 100644 --- a/tests/integration/script.py +++ b/tests/integration/script.py @@ -39,8 +39,8 @@ def test_script(cli, tmpdir, datafiles): create_script_element(element_name, element_path, config={ 'commands': [ - "mkdir -p /buildstream/install", - "echo 'Hi' > /buildstream/install/test" + "mkdir -p %{install-root}", + "echo 'Hi' > %{install-root}/test" ], }) @@ -69,9 +69,9 @@ def test_script_root(cli, tmpdir, datafiles): # want to check the default here # 'root-read-only': False, 'commands': [ - "mkdir -p /buildstream/install", + "mkdir -p %{install-root}", "echo 'I can write to root' > /test", - "cp /test /buildstream/install" + "cp /test %{install-root}" ], }) @@ -97,9 +97,9 @@ def test_script_no_root(cli, tmpdir, datafiles): config={ 'root-read-only': True, 'commands': [ - "mkdir -p /buildstream/install", + "mkdir -p %{install-root}", "echo 'I can not write to root' > /test", - "cp /test /buildstream/install" + "cp /test %{install-root}" ], }) |