summaryrefslogtreecommitdiff
path: root/tests/integration
diff options
context:
space:
mode:
authorDarius Makovsky <traveltissues@protonmail.com>2019-11-19 18:31:18 +0000
committerDarius Makovsky <traveltissues@protonmail.com>2019-11-26 14:05:20 +0000
commit393a0c6c55ded32402f98f713a405e8791e69efa (patch)
tree784c011b3a24f0372544407bdeb66966ce07b5f7 /tests/integration
parentd96de06706b52ea98e6209a660b028ec9ba56170 (diff)
downloadbuildstream-393a0c6c55ded32402f98f713a405e8791e69efa.tar.gz
tests: enable incremental workspace config test
builds no longer affect the local copy but the buildtree can be checked for the configure results
Diffstat (limited to 'tests/integration')
-rw-r--r--tests/integration/workspace.py30
1 files changed, 25 insertions, 5 deletions
diff --git a/tests/integration/workspace.py b/tests/integration/workspace.py
index 6c6503f96..8dfe92279 100644
--- a/tests/integration/workspace.py
+++ b/tests/integration/workspace.py
@@ -254,8 +254,6 @@ def test_updated_dependency_nested(cli, datafiles):
@pytest.mark.datafiles(DATA_DIR)
@pytest.mark.skipif(not HAVE_SANDBOX, reason="Only available with a functioning sandbox")
-@pytest.mark.xfail(HAVE_SANDBOX == "buildbox", reason="Not working with BuildBox")
-@pytest.mark.xfail(reason="Incremental builds are currently incompatible with workspace source plugin.")
def test_incremental_configure_commands_run_only_once(cli, datafiles):
project = str(datafiles)
workspace = os.path.join(cli.directory, "workspace")
@@ -275,16 +273,38 @@ def test_incremental_configure_commands_run_only_once(cli, datafiles):
res.assert_success()
# Then we build, and check whether the configure step succeeded
- res = cli.run(project=project, args=["build", element_name])
+ res = cli.run(project=project, args=["--cache-buildtrees", "always", "build", element_name])
res.assert_success()
- assert os.path.exists(os.path.join(workspace, "prepared"))
+ # check that the workspace was not configured
+ assert not os.path.exists(os.path.join(workspace, "prepared"))
+
+ # the configure should have been run in the sandbox, so check the buildtree
+ res = cli.run(
+ project=project,
+ args=["shell", "--build", element_name, "--use-buildtree", "always", "--", "find", ".", "-mindepth", "1",],
+ )
+ res.assert_success()
+
+ files = res.output.splitlines()
+ assert "./prepared" in files
+ assert not "./prepared-again" in files
# When we build again, the configure commands should not be
# called, and we should therefore exit cleanly (the configure
# commands are set to always fail after the first run)
- res = cli.run(project=project, args=["build", element_name])
+ res = cli.run(project=project, args=["--cache-buildtrees", "always", "build", element_name])
res.assert_success()
+
assert not os.path.exists(os.path.join(workspace, "prepared-again"))
+ res = cli.run(
+ project=project,
+ args=["shell", "--build", element_name, "--use-buildtree", "always", "--", "find", ".", "-mindepth", "1",],
+ )
+ res.assert_success()
+
+ files = res.output.splitlines()
+ assert "./prepared" in files
+ assert not "./prepared-again" in files
# Test that rebuilding an already built workspaced element does