summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJürg Billeter <j@bitron.ch>2020-01-27 17:32:42 +0100
committerJürg Billeter <j@bitron.ch>2020-02-11 17:04:17 +0100
commitf886976295fd47883acfb62c8cfe7621f5031481 (patch)
treeb049afeab9b427c5e184ff30d8ded53d18058d53
parent7f30e221a5b2e3c066ea84bff33389342ab47c79 (diff)
downloadbuildstream-f886976295fd47883acfb62c8cfe7621f5031481.tar.gz
tests/integration/workspace.py: Fix test_workspace_commanddir
Object files are no longer stored in the workspace directory.
-rw-r--r--tests/integration/workspace.py13
1 files changed, 10 insertions, 3 deletions
diff --git a/tests/integration/workspace.py b/tests/integration/workspace.py
index 7e84b690b..69f267273 100644
--- a/tests/integration/workspace.py
+++ b/tests/integration/workspace.py
@@ -62,7 +62,6 @@ def test_workspace_mount_on_read_only_directory(cli, datafiles):
@pytest.mark.datafiles(DATA_DIR)
@pytest.mark.skipif(not HAVE_SANDBOX, reason="Only available with a functioning sandbox")
-@pytest.mark.xfail(reason="Incremental builds are currently incompatible with workspace source plugin.")
def test_workspace_commanddir(cli, datafiles):
project = str(datafiles)
workspace = os.path.join(cli.directory, "workspace")
@@ -74,8 +73,16 @@ def test_workspace_commanddir(cli, datafiles):
res = cli.run(project=project, args=["build", element_name])
assert res.exit_code == 0
- assert os.path.exists(os.path.join(cli.directory, "workspace"))
- assert os.path.exists(os.path.join(cli.directory, "workspace", "build"))
+ # Check that the object file was created in the command-subdir `build`
+ # using the cached 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 "../build/hello.o" in files
@pytest.mark.datafiles(DATA_DIR)