summaryrefslogtreecommitdiff
path: root/tests/integration/shellbuildtrees.py
diff options
context:
space:
mode:
authorJürg Billeter <j@bitron.ch>2019-03-14 10:40:56 +0000
committerJürg Billeter <j@bitron.ch>2019-03-16 07:24:58 +0100
commit142ef9cdc6ed3c5b0e91ca450dfcd608822e0a60 (patch)
treecf803c726ddd833f52fc333d17d340e7c82fb991 /tests/integration/shellbuildtrees.py
parent3dc95d4ba2bf6c236bc69f35c098f563ab0f65aa (diff)
downloadbuildstream-142ef9cdc6ed3c5b0e91ca450dfcd608822e0a60.tar.gz
_artifact.py: Do not create empty buildtree directories
Creating an empty buildtree directory when buildtree caching is disabled means cached_buildtree() can return True even if no buildtree is available, which breaks logic in the frontend and in Stream. This adds the buildtree_exists() method to indicate whether an artifact was created with a buildtree, independent of whether the buildtree is available in the local cache.
Diffstat (limited to 'tests/integration/shellbuildtrees.py')
-rw-r--r--tests/integration/shellbuildtrees.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/integration/shellbuildtrees.py b/tests/integration/shellbuildtrees.py
index 13d21548e..31af8a0e4 100644
--- a/tests/integration/shellbuildtrees.py
+++ b/tests/integration/shellbuildtrees.py
@@ -71,8 +71,8 @@ def test_buildtree_staged_warn_empty_cached(cli_integration, tmpdir, datafiles):
res = cli_integration.run(project=project, args=[
'shell', '--build', '--use-buildtree', 'always', element_name, '--', 'cat', 'test'
])
- res.assert_shell_error()
- assert "Artifact contains an empty buildtree" in res.stderr
+ res.assert_main_error(ErrorDomain.APP, None)
+ assert "Artifact was created without buildtree" in res.stderr
@pytest.mark.datafiles(DATA_DIR)
@@ -148,8 +148,8 @@ def test_buildtree_from_failure_option_never(cli_integration, tmpdir, datafiles)
res = cli_integration.run(project=project, args=[
'shell', '--build', element_name, '--use-buildtree', 'always', '--', 'cat', 'test'
])
- res.assert_shell_error()
- assert "Artifact contains an empty buildtree" in res.stderr
+ res.assert_main_error(ErrorDomain.APP, None)
+ assert "Artifact was created without buildtree" in res.stderr
@pytest.mark.datafiles(DATA_DIR)