summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorRebecca Grayson <becky.grayson1@hotmail.co.uk>2019-07-15 13:23:11 +0100
committerRebecca Grayson <becky.grayson1@hotmail.co.uk>2019-07-16 12:11:07 +0100
commitce12bbf1bb4bc1d0ede83d1591a499d59fd4c875 (patch)
treed796e332c29cf94a26cc2ef4fe22e70d573807c5 /tests
parent6163ef87e0ab871efe44630aac00487fcfa06c65 (diff)
downloadbuildstream-ce12bbf1bb4bc1d0ede83d1591a499d59fd4c875.tar.gz
Checkout to default dir if no tar or directory:
When neither --tar nor --directory are provided, bst artifact checkout will no longer error out. Defaults to a suitable directory, consistent with bst workspace open. Test for new feature has been added
Diffstat (limited to 'tests')
-rw-r--r--tests/frontend/buildcheckout.py18
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/frontend/buildcheckout.py b/tests/frontend/buildcheckout.py
index d3eec0d21..aadefc2ab 100644
--- a/tests/frontend/buildcheckout.py
+++ b/tests/frontend/buildcheckout.py
@@ -233,6 +233,24 @@ def test_build_checkout_tarball(datafiles, cli):
@pytest.mark.datafiles(DATA_DIR)
+def test_build_checkout_no_tar_no_directory(datafiles, cli, tmpdir):
+ project = str(datafiles)
+ runtestdir = str(tmpdir)
+
+ result = cli.run(project=project, args=['build', 'target.bst'])
+ result.assert_success()
+
+ checkout_args = ['artifact', 'checkout', 'target.bst']
+
+ result = cli.run(cwd=runtestdir, project=project, args=checkout_args)
+ result.assert_success()
+ filename = os.path.join(runtestdir, 'target', 'usr', 'bin', 'hello')
+ assert os.path.exists(filename)
+ filename = os.path.join(runtestdir, 'target', 'usr', 'include', 'pony.h')
+ assert os.path.exists(filename)
+
+
+@pytest.mark.datafiles(DATA_DIR)
def test_build_checkout_tarball_stdout(datafiles, cli):
project = str(datafiles)
tarball = os.path.join(cli.directory, 'tarball.tar')