diff options
author | Raoul Hidalgo Charman <raoul.hidalgocharman@codethink.co.uk> | 2019-02-11 12:07:55 +0000 |
---|---|---|
committer | Jürg Billeter <j@bitron.ch> | 2019-02-19 17:05:17 +0000 |
commit | 4b62b9362870045a6203d01f2abf3e437bf23ae6 (patch) | |
tree | 36377248836d2f6e8e25d87a81a7de1bd27bc722 /tests/integration/shellbuildtrees.py | |
parent | c7f76268cc6f35209587749df85f3af9cfbaabf1 (diff) | |
download | buildstream-4b62b9362870045a6203d01f2abf3e437bf23ae6.tar.gz |
context: remove artifactdir
Will check and move old artifact directory if it exists, and create
symlink linking old directory to new.
Part of #870
Diffstat (limited to 'tests/integration/shellbuildtrees.py')
-rw-r--r-- | tests/integration/shellbuildtrees.py | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/tests/integration/shellbuildtrees.py b/tests/integration/shellbuildtrees.py index e6b50c098..3fd761f05 100644 --- a/tests/integration/shellbuildtrees.py +++ b/tests/integration/shellbuildtrees.py @@ -62,7 +62,7 @@ def test_buildtree_staged_warn_empty_cached(cli_integration, tmpdir, datafiles): # Switch to a temp artifact cache dir to ensure the artifact is rebuilt, # caching an empty buildtree cli_integration.configure({ - 'artifactdir': os.path.join(os.path.join(str(tmpdir), 'artifacts')) + 'cachedir': str(tmpdir) }) res = cli_integration.run(project=project, args=['--cache-buildtrees', 'never', 'build', element_name]) @@ -139,7 +139,7 @@ def test_buildtree_from_failure_option_never(cli_integration, tmpdir, datafiles) # Switch to a temp artifact cache dir to ensure the artifact is rebuilt, # caching an empty buildtree cli_integration.configure({ - 'artifactdir': os.path.join(os.path.join(str(tmpdir), 'artifacts')) + 'cachedir': str(tmpdir) }) res = cli_integration.run(project=project, args=['--cache-buildtrees', 'never', 'build', element_name]) @@ -163,7 +163,7 @@ def test_buildtree_from_failure_option_failure(cli_integration, tmpdir, datafile # default behaviour (which is always) as the buildtree will explicitly have been # cached with content. cli_integration.configure({ - 'artifactdir': os.path.join(os.path.join(str(tmpdir), 'artifacts')) + 'cachedir': str(tmpdir) }) res = cli_integration.run(project=project, args=['--cache-buildtrees', 'failure', 'build', element_name]) @@ -195,10 +195,7 @@ def test_buildtree_pulled(cli, tmpdir, datafiles): assert cli.get_element_state(project, element_name) == 'cached' # Discard the cache - cli.configure({ - 'artifacts': {'url': share.repo, 'push': True}, - 'artifactdir': os.path.join(cli.directory, 'artifacts2') - }) + shutil.rmtree(str(os.path.join(str(tmpdir), 'cache', 'cas'))) assert cli.get_element_state(project, element_name) != 'cached' # Pull from cache, ensuring cli options is set to pull the buildtree @@ -231,7 +228,6 @@ def test_buildtree_options(cli, tmpdir, datafiles): assert share.has_artifact('test', element_name, cli.get_element_key(project, element_name)) # Discard the cache - shutil.rmtree(str(os.path.join(str(tmpdir), 'cache', 'artifacts'))) shutil.rmtree(str(os.path.join(str(tmpdir), 'cache', 'cas'))) assert cli.get_element_state(project, element_name) != 'cached' |