summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorJames Ennis <james.ennis@codethink.com>2019-01-09 12:36:02 +0000
committerJames Ennis <james.ennis@codethink.com>2019-01-22 12:32:43 +0000
commitfbd159390e97a26f85bb7e8d6284b14bb77083ff (patch)
tree78eb6130d68ceedca256fc6f71f6c19d645abe64 /tests
parent9eefe8634a95f181593f4f4b3b18564dd0fa0693 (diff)
downloadbuildstream-fbd159390e97a26f85bb7e8d6284b14bb77083ff.tar.gz
Mark 'old' checkout command as obsolete
This commit marks 'bst checkout' as a 'hidden' command. If used, the user will be prompted to use the new 'bst artifact checkout' command. All tests which used 'bst checkout' have been modified to use the new artifact sub-command. This partially solves #822.
Diffstat (limited to 'tests')
-rw-r--r--tests/artifactcache/expiry.py5
-rw-r--r--tests/elements/filter.py15
-rw-r--r--tests/examples/autotools.py2
-rw-r--r--tests/examples/developing.py2
-rw-r--r--tests/examples/first-project.py2
-rw-r--r--tests/examples/flatpak-autotools.py2
-rw-r--r--tests/format/junctions.py16
-rw-r--r--tests/frontend/buildcheckout.py38
-rw-r--r--tests/frontend/completions.py15
-rw-r--r--tests/frontend/compose_splits.py2
-rw-r--r--tests/frontend/mirror.py4
-rw-r--r--tests/frontend/workspace.py6
-rw-r--r--tests/integration/autotools.py4
-rw-r--r--tests/integration/cachedfail.py2
-rw-r--r--tests/integration/cmake.py4
-rw-r--r--tests/integration/compose-symlinks.py3
-rw-r--r--tests/integration/compose.py2
-rw-r--r--tests/integration/import.py2
-rw-r--r--tests/integration/make.py2
-rw-r--r--tests/integration/manual.py6
-rw-r--r--tests/integration/pip_element.py2
-rw-r--r--tests/integration/pip_source.py2
-rw-r--r--tests/integration/script.py24
-rw-r--r--tests/integration/shell.py2
-rw-r--r--tests/integration/source-determinism.py4
-rw-r--r--tests/integration/stack.py2
-rw-r--r--tests/integration/symlinks.py6
-rw-r--r--tests/sources/bzr.py2
-rw-r--r--tests/sources/deb.py6
-rw-r--r--tests/sources/git.py20
-rw-r--r--tests/sources/local.py6
-rw-r--r--tests/sources/patch.py8
-rw-r--r--tests/sources/previous_source_access.py2
-rw-r--r--tests/sources/remote.py8
-rw-r--r--tests/sources/tar.py12
-rw-r--r--tests/sources/zip.py8
36 files changed, 128 insertions, 120 deletions
diff --git a/tests/artifactcache/expiry.py b/tests/artifactcache/expiry.py
index d40f432c9..4c47ef75c 100644
--- a/tests/artifactcache/expiry.py
+++ b/tests/artifactcache/expiry.py
@@ -132,7 +132,7 @@ def test_expiry_order(cli, datafiles, tmpdir):
wait_for_cache_granularity()
# Now extract dep.bst
- res = cli.run(project=project, args=['checkout', 'dep.bst', checkout])
+ res = cli.run(project=project, args=['artifact', 'checkout', 'dep.bst', '--directory', checkout])
res.assert_success()
# Finally, build something that will cause the cache to overflow
@@ -379,7 +379,8 @@ def test_extract_expiry(cli, datafiles, tmpdir):
assert cli.get_element_state(project, 'target.bst') == 'cached'
# Force creating extract
- res = cli.run(project=project, args=['checkout', 'target.bst', os.path.join(str(tmpdir), 'checkout')])
+ res = cli.run(project=project, args=['artifact', 'checkout', 'target.bst',
+ '--directory', os.path.join(str(tmpdir), 'checkout')])
res.assert_success()
# Get a snapshot of the extracts in advance
diff --git a/tests/elements/filter.py b/tests/elements/filter.py
index 31b23c124..6c0a3ee1c 100644
--- a/tests/elements/filter.py
+++ b/tests/elements/filter.py
@@ -18,7 +18,7 @@ def test_filter_include(datafiles, cli, tmpdir):
result.assert_success()
checkout = os.path.join(tmpdir.dirname, tmpdir.basename, 'checkout')
- result = cli.run(project=project, args=['checkout', 'output-include.bst', checkout])
+ result = cli.run(project=project, args=['artifact', 'checkout', 'output-include.bst', '--directory', checkout])
result.assert_success()
assert os.path.exists(os.path.join(checkout, "foo"))
assert not os.path.exists(os.path.join(checkout, "bar"))
@@ -31,7 +31,8 @@ def test_filter_include_dynamic(datafiles, cli, tmpdir):
result.assert_success()
checkout = os.path.join(tmpdir.dirname, tmpdir.basename, 'checkout')
- result = cli.run(project=project, args=['checkout', 'output-dynamic-include.bst', checkout])
+ result = cli.run(project=project, args=['artifact', 'checkout', 'output-dynamic-include.bst',
+ '--directory', checkout])
result.assert_success()
assert os.path.exists(os.path.join(checkout, "foo"))
assert not os.path.exists(os.path.join(checkout, "bar"))
@@ -44,7 +45,7 @@ def test_filter_exclude(datafiles, cli, tmpdir):
result.assert_success()
checkout = os.path.join(tmpdir.dirname, tmpdir.basename, 'checkout')
- result = cli.run(project=project, args=['checkout', 'output-exclude.bst', checkout])
+ result = cli.run(project=project, args=['artifact', 'checkout', 'output-exclude.bst', '--directory', checkout])
result.assert_success()
assert not os.path.exists(os.path.join(checkout, "foo"))
assert os.path.exists(os.path.join(checkout, "bar"))
@@ -57,7 +58,7 @@ def test_filter_orphans(datafiles, cli, tmpdir):
result.assert_success()
checkout = os.path.join(tmpdir.dirname, tmpdir.basename, 'checkout')
- result = cli.run(project=project, args=['checkout', 'output-orphans.bst', checkout])
+ result = cli.run(project=project, args=['artifact', 'checkout', 'output-orphans.bst', '--directory', checkout])
result.assert_success()
assert os.path.exists(os.path.join(checkout, "baz"))
@@ -137,7 +138,7 @@ def test_filter_workspace_build(datafiles, cli, tmpdir):
result = cli.run(project=project, args=['build', 'output-orphans.bst'])
result.assert_success()
checkout_dir = os.path.join(tempdir, "checkout")
- result = cli.run(project=project, args=['checkout', 'output-orphans.bst', checkout_dir])
+ result = cli.run(project=project, args=['artifact', 'checkout', 'output-orphans.bst', '--directory', checkout_dir])
result.assert_success()
assert os.path.exists(os.path.join(checkout_dir, "quux"))
@@ -157,7 +158,7 @@ def test_filter_workspace_close(datafiles, cli, tmpdir):
result = cli.run(project=project, args=['build', 'output-orphans.bst'])
result.assert_success()
checkout_dir = os.path.join(tempdir, "checkout")
- result = cli.run(project=project, args=['checkout', 'output-orphans.bst', checkout_dir])
+ result = cli.run(project=project, args=['artifact', 'checkout', 'output-orphans.bst', '--directory', checkout_dir])
result.assert_success()
assert not os.path.exists(os.path.join(checkout_dir, "quux"))
@@ -177,7 +178,7 @@ def test_filter_workspace_reset(datafiles, cli, tmpdir):
result = cli.run(project=project, args=['build', 'output-orphans.bst'])
result.assert_success()
checkout_dir = os.path.join(tempdir, "checkout")
- result = cli.run(project=project, args=['checkout', 'output-orphans.bst', checkout_dir])
+ result = cli.run(project=project, args=['artifact', 'checkout', 'output-orphans.bst', '--directory', checkout_dir])
result.assert_success()
assert not os.path.exists(os.path.join(checkout_dir, "quux"))
diff --git a/tests/examples/autotools.py b/tests/examples/autotools.py
index af440cc6f..30f50768b 100644
--- a/tests/examples/autotools.py
+++ b/tests/examples/autotools.py
@@ -25,7 +25,7 @@ def test_autotools_build(cli, tmpdir, datafiles):
result = cli.run(project=project, args=['build', 'hello.bst'])
result.assert_success()
- result = cli.run(project=project, args=['checkout', 'hello.bst', checkout])
+ result = cli.run(project=project, args=['artifact', 'checkout', 'hello.bst', '--directory', checkout])
result.assert_success()
assert_contains(checkout, ['/usr', '/usr/lib', '/usr/bin',
diff --git a/tests/examples/developing.py b/tests/examples/developing.py
index 3b09962bd..166fcf374 100644
--- a/tests/examples/developing.py
+++ b/tests/examples/developing.py
@@ -26,7 +26,7 @@ def test_autotools_build(cli, tmpdir, datafiles):
result = cli.run(project=project, args=['build', 'hello.bst'])
result.assert_success()
- result = cli.run(project=project, args=['checkout', 'hello.bst', checkout])
+ result = cli.run(project=project, args=['artifact', 'checkout', 'hello.bst', '--directory', checkout])
result.assert_success()
assert_contains(checkout, ['/usr', '/usr/lib', '/usr/bin',
diff --git a/tests/examples/first-project.py b/tests/examples/first-project.py
index dac181423..821d2c190 100644
--- a/tests/examples/first-project.py
+++ b/tests/examples/first-project.py
@@ -23,7 +23,7 @@ def test_first_project_build_checkout(cli, tmpdir, datafiles):
result = cli.run(project=project, args=['build', 'hello.bst'])
assert result.exit_code == 0
- result = cli.run(project=project, args=['checkout', 'hello.bst', checkout])
+ result = cli.run(project=project, args=['artifact', 'checkout', 'hello.bst', '--directory', checkout])
assert result.exit_code == 0
assert_contains(checkout, ['/hello.world'])
diff --git a/tests/examples/flatpak-autotools.py b/tests/examples/flatpak-autotools.py
index d63771ebf..4153a9563 100644
--- a/tests/examples/flatpak-autotools.py
+++ b/tests/examples/flatpak-autotools.py
@@ -44,7 +44,7 @@ def test_autotools_build(cli, tmpdir, datafiles):
result = cli.run(project=project, args=['build', 'hello.bst'])
assert result.exit_code == 0
- result = cli.run(project=project, args=['checkout', 'hello.bst', checkout])
+ result = cli.run(project=project, args=['artifact', 'checkout', 'hello.bst', '--directory', checkout])
assert result.exit_code == 0
assert_contains(checkout, ['/usr', '/usr/lib', '/usr/bin',
diff --git a/tests/format/junctions.py b/tests/format/junctions.py
index d97c9f702..90608d0fc 100644
--- a/tests/format/junctions.py
+++ b/tests/format/junctions.py
@@ -39,7 +39,7 @@ def test_simple_build(cli, tmpdir, datafiles):
# Build, checkout
result = cli.run(project=project, args=['build', 'target.bst'])
result.assert_success()
- result = cli.run(project=project, args=['checkout', 'target.bst', checkoutdir])
+ result = cli.run(project=project, args=['artifact', 'checkout', 'target.bst', '--directory', checkoutdir])
result.assert_success()
# Check that the checkout contains the expected files from both projects
@@ -70,7 +70,7 @@ def test_nested_simple(cli, tmpdir, datafiles):
# Build, checkout
result = cli.run(project=project, args=['build', 'target.bst'])
result.assert_success()
- result = cli.run(project=project, args=['checkout', 'target.bst', checkoutdir])
+ result = cli.run(project=project, args=['artifact', 'checkout', 'target.bst', '--directory', checkoutdir])
result.assert_success()
# Check that the checkout contains the expected files from all subprojects
@@ -94,7 +94,7 @@ def test_nested_double(cli, tmpdir, datafiles):
# Build, checkout
result = cli.run(project=project, args=['build', 'target.bst'])
result.assert_success()
- result = cli.run(project=project, args=['checkout', 'target.bst', checkoutdir])
+ result = cli.run(project=project, args=['artifact', 'checkout', 'target.bst', '--directory', checkoutdir])
result.assert_success()
# Check that the checkout contains the expected files from all subprojects
@@ -167,7 +167,7 @@ def test_options_default(cli, tmpdir, datafiles):
# Build, checkout
result = cli.run(project=project, args=['build', 'target.bst'])
result.assert_success()
- result = cli.run(project=project, args=['checkout', 'target.bst', checkoutdir])
+ result = cli.run(project=project, args=['artifact', 'checkout', 'target.bst', '--directory', checkoutdir])
result.assert_success()
assert(os.path.exists(os.path.join(checkoutdir, 'pony.txt')))
@@ -184,7 +184,7 @@ def test_options(cli, tmpdir, datafiles):
# Build, checkout
result = cli.run(project=project, args=['build', 'target.bst'])
result.assert_success()
- result = cli.run(project=project, args=['checkout', 'target.bst', checkoutdir])
+ result = cli.run(project=project, args=['artifact', 'checkout', 'target.bst', '--directory', checkoutdir])
result.assert_success()
assert(not os.path.exists(os.path.join(checkoutdir, 'pony.txt')))
@@ -201,7 +201,7 @@ def test_options_inherit(cli, tmpdir, datafiles):
# Build, checkout
result = cli.run(project=project, args=['build', 'target.bst'])
result.assert_success()
- result = cli.run(project=project, args=['checkout', 'target.bst', checkoutdir])
+ result = cli.run(project=project, args=['artifact', 'checkout', 'target.bst', '--directory', checkoutdir])
result.assert_success()
assert(not os.path.exists(os.path.join(checkoutdir, 'pony.txt')))
@@ -262,7 +262,7 @@ def test_git_build(cli, tmpdir, datafiles):
# Build (with implicit fetch of subproject), checkout
result = cli.run(project=project, args=['build', 'target.bst'])
result.assert_success()
- result = cli.run(project=project, args=['checkout', 'target.bst', checkoutdir])
+ result = cli.run(project=project, args=['artifact', 'checkout', 'target.bst', '--directory', checkoutdir])
result.assert_success()
# Check that the checkout contains the expected files from both projects
@@ -303,7 +303,7 @@ def test_build_git_cross_junction_names(cli, tmpdir, datafiles):
# Build (with implicit fetch of subproject), checkout
result = cli.run(project=project, args=['build', 'base.bst:target.bst'])
result.assert_success()
- result = cli.run(project=project, args=['checkout', 'base.bst:target.bst', checkoutdir])
+ result = cli.run(project=project, args=['artifact', 'checkout', 'base.bst:target.bst', '--directory', checkoutdir])
result.assert_success()
# Check that the checkout contains the expected files from both projects
diff --git a/tests/frontend/buildcheckout.py b/tests/frontend/buildcheckout.py
index 287fb6034..8c7e22a85 100644
--- a/tests/frontend/buildcheckout.py
+++ b/tests/frontend/buildcheckout.py
@@ -44,10 +44,10 @@ def test_build_checkout(datafiles, cli, strict, hardlinks):
assert not os.listdir(builddir)
# Prepare checkout args
- checkout_args = strict_args(['checkout'], strict)
+ checkout_args = strict_args(['artifact', 'checkout'], strict)
if hardlinks == "hardlinks":
checkout_args += ['--hardlinks']
- checkout_args += ['target.bst', checkout]
+ checkout_args += ['target.bst', '--directory', checkout]
# Now check it out
result = cli.run(project=project, args=checkout_args)
@@ -138,7 +138,8 @@ def test_build_checkout_deps(datafiles, cli, deps):
assert not os.listdir(builddir)
# Now check it out
- result = cli.run(project=project, args=['checkout', element_name, '--deps', deps, checkout])
+ result = cli.run(project=project, args=['artifact', 'checkout', element_name,
+ '--deps', deps, '--directory', checkout])
result.assert_success()
# Verify output of this element
@@ -169,7 +170,7 @@ def test_build_checkout_unbuilt(datafiles, cli):
checkout = os.path.join(cli.directory, 'checkout')
# Check that checking out an unbuilt element fails nicely
- result = cli.run(project=project, args=['checkout', 'target.bst', checkout])
+ result = cli.run(project=project, args=['artifact', 'checkout', 'target.bst', '--directory', checkout])
result.assert_main_error(ErrorDomain.STREAM, "uncached-checkout-attempt")
@@ -185,7 +186,7 @@ def test_build_checkout_tarball(datafiles, cli):
assert os.path.isdir(builddir)
assert not os.listdir(builddir)
- checkout_args = ['checkout', '--tar', 'target.bst', checkout]
+ checkout_args = ['artifact', 'checkout', '--tar', checkout, 'target.bst']
result = cli.run(project=project, args=checkout_args)
result.assert_success()
@@ -207,7 +208,7 @@ def test_build_checkout_tarball_stdout(datafiles, cli):
assert os.path.isdir(builddir)
assert not os.listdir(builddir)
- checkout_args = ['checkout', '--tar', 'target.bst', '-']
+ checkout_args = ['artifact', 'checkout', '--tar', '-', 'target.bst']
result = cli.run(project=project, args=checkout_args, binary_capture=True)
result.assert_success()
@@ -233,13 +234,13 @@ def test_build_checkout_tarball_is_deterministic(datafiles, cli):
assert os.path.isdir(builddir)
assert not os.listdir(builddir)
- checkout_args = ['checkout', '--force', '--tar', 'target.bst']
+ checkout_args = ['artifact', 'checkout', '--force', 'target.bst']
- checkout_args1 = checkout_args + [tarball1]
+ checkout_args1 = checkout_args + ['--tar', tarball1]
result = cli.run(project=project, args=checkout_args1)
result.assert_success()
- checkout_args2 = checkout_args + [tarball2]
+ checkout_args2 = checkout_args + ['--tar', tarball2]
result = cli.run(project=project, args=checkout_args2)
result.assert_success()
@@ -276,10 +277,10 @@ def test_build_checkout_nonempty(datafiles, cli, hardlinks):
f.write("Hello")
# Prepare checkout args
- checkout_args = ['checkout']
+ checkout_args = ['artifact', 'checkout']
if hardlinks == "hardlinks":
checkout_args += ['--hardlinks']
- checkout_args += ['target.bst', checkout]
+ checkout_args += ['target.bst', '--directory', checkout]
# Now check it out
result = cli.run(project=project, args=checkout_args)
@@ -308,10 +309,10 @@ def test_build_checkout_force(datafiles, cli, hardlinks):
f.write("Hello")
# Prepare checkout args
- checkout_args = ['checkout', '--force']
+ checkout_args = ['artifact', 'checkout', '--force']
if hardlinks == "hardlinks":
checkout_args += ['--hardlinks']
- checkout_args += ['target.bst', checkout]
+ checkout_args += ['target.bst', '--directory', checkout]
# Now check it out
result = cli.run(project=project, args=checkout_args)
@@ -345,7 +346,7 @@ def test_build_checkout_force_tarball(datafiles, cli):
with open(tarball, "w") as f:
f.write("Hello")
- checkout_args = ['checkout', '--force', '--tar', 'target.bst', tarball]
+ checkout_args = ['artifact', 'checkout', '--force', '--tar', tarball, 'target.bst']
result = cli.run(project=project, args=checkout_args)
result.assert_success()
@@ -393,7 +394,7 @@ def test_fetch_build_checkout(cli, tmpdir, datafiles, strict, kind):
# Now check it out
result = cli.run(project=project, args=strict_args([
- 'checkout', element_name, checkout
+ 'artifact', 'checkout', element_name, '--directory', checkout
], strict))
result.assert_success()
@@ -537,7 +538,7 @@ def test_build_checkout_junction(cli, tmpdir, datafiles):
# Now check it out
result = cli.run(project=project, args=[
- 'checkout', 'junction-dep.bst', checkout
+ 'artifact', 'checkout', 'junction-dep.bst', '--directory', checkout
])
result.assert_success()
@@ -600,7 +601,7 @@ def test_build_checkout_workspaced_junction(cli, tmpdir, datafiles):
# Now check it out
result = cli.run(project=project, args=[
- 'checkout', 'junction-dep.bst', checkout
+ 'artifact', 'checkout', 'junction-dep.bst', '--directory', checkout
])
result.assert_success()
@@ -624,7 +625,8 @@ def test_build_checkout_cross_junction(datafiles, cli, tmpdir):
result = cli.run(project=project, args=['build', 'junction.bst:import-etc.bst'])
result.assert_success()
- result = cli.run(project=project, args=['checkout', 'junction.bst:import-etc.bst', checkout])
+ result = cli.run(project=project, args=['artifact', 'checkout', 'junction.bst:import-etc.bst',
+ '--directory', checkout])
result.assert_success()
filename = os.path.join(checkout, 'etc', 'animal.conf')
diff --git a/tests/frontend/completions.py b/tests/frontend/completions.py
index b0e08a3f0..8b549e3ba 100644
--- a/tests/frontend/completions.py
+++ b/tests/frontend/completions.py
@@ -11,7 +11,6 @@ DATA_DIR = os.path.join(
MAIN_COMMANDS = [
'artifact ',
'build ',
- 'checkout ',
'help ',
'init ',
'shell ',
@@ -56,6 +55,7 @@ SOURCE_COMMANDS = [
]
ARTIFACT_COMMANDS = [
+ 'checkout ',
'push ',
'pull ',
'log ',
@@ -86,7 +86,7 @@ MIXED_ELEMENTS = PROJECT_ELEMENTS + INVALID_ELEMENTS
def assert_completion(cli, cmd, word_idx, expected, cwd=None):
- result = cli.run(cwd=cwd, env={
+ result = cli.run(project='.', cwd=cwd, env={
'_BST_COMPLETION': 'complete',
'COMP_WORDS': cmd,
'COMP_CWORD': str(word_idx)
@@ -224,8 +224,9 @@ def test_option_directory(datafiles, cli, cmd, word_idx, expected, subdir):
['compose-all.bst ', 'compose-include-bin.bst ', 'compose-exclude-dev.bst '], 'files'),
# Also try multi arguments together
- ('project', 'bst --directory ../ checkout t ', 4, ['target.bst '], 'files'),
- ('project', 'bst --directory ../ checkout target.bst ', 5, ['bin-files/', 'dev-files/'], 'files'),
+ ('project', 'bst --directory ../ artifact checkout t ', 5, ['target.bst '], 'files'),
+ ('project', 'bst --directory ../ artifact checkout --directory ', 6,
+ ['bin-files/', 'dev-files/'], 'files'),
# When running in the project directory
('no-element-path', 'bst show ', 2,
@@ -248,8 +249,9 @@ def test_option_directory(datafiles, cli, cmd, word_idx, expected, subdir):
['compose-all.bst ', 'compose-include-bin.bst ', 'compose-exclude-dev.bst '], 'files'),
# Also try multi arguments together
- ('no-element-path', 'bst --directory ../ checkout t ', 4, ['target.bst '], 'files'),
- ('no-element-path', 'bst --directory ../ checkout target.bst ', 5, ['bin-files/', 'dev-files/'], 'files'),
+ ('no-element-path', 'bst --directory ../ artifact checkout t ', 5, ['target.bst '], 'files'),
+ ('no-element-path', 'bst --directory ../ artifact checkout --directory ', 6,
+ ['bin-files/', 'dev-files/'], 'files'),
# When element-path have sub-folders
('sub-folders', 'bst show base', 2, ['base/wanted.bst '], None),
@@ -281,6 +283,7 @@ def test_argument_element_invalid(datafiles, cli, project, cmd, word_idx, expect
('bst help artifact ', 3, ARTIFACT_COMMANDS),
('bst help in', 2, ['init ']),
('bst help source ', 3, SOURCE_COMMANDS),
+ ('bst help artifact ', 3, ARTIFACT_COMMANDS),
('bst help w', 2, ['workspace ']),
('bst help workspace ', 3, WORKSPACE_COMMANDS),
])
diff --git a/tests/frontend/compose_splits.py b/tests/frontend/compose_splits.py
index b5a2e760d..97558b653 100644
--- a/tests/frontend/compose_splits.py
+++ b/tests/frontend/compose_splits.py
@@ -24,7 +24,7 @@ def test_compose_splits(datafiles, cli, target):
# Now check it out
result = cli.run(project=project, args=[
- 'checkout', target, checkout
+ 'artifact', 'checkout', target, '--directory', checkout
])
result.assert_success()
diff --git a/tests/frontend/mirror.py b/tests/frontend/mirror.py
index ccfe2ca30..3cadd15f3 100644
--- a/tests/frontend/mirror.py
+++ b/tests/frontend/mirror.py
@@ -856,7 +856,7 @@ def test_mirror_fallback_git_only_submodules(cli, tmpdir, datafiles):
result.assert_success()
checkout = os.path.join(str(tmpdir), 'checkout')
- result = cli.run(project=project_dir, args=['checkout', element_name, checkout])
+ result = cli.run(project=project_dir, args=['artifact', 'checkout', element_name, '--directory', checkout])
result.assert_success()
assert os.path.exists(os.path.join(checkout, 'bin', 'bin', 'hello'))
@@ -952,7 +952,7 @@ def test_mirror_fallback_git_with_submodules(cli, tmpdir, datafiles):
result.assert_success()
checkout = os.path.join(str(tmpdir), 'checkout')
- result = cli.run(project=project_dir, args=['checkout', element_name, checkout])
+ result = cli.run(project=project_dir, args=['artifact', 'checkout', element_name, '--directory', checkout])
result.assert_success()
assert os.path.exists(os.path.join(checkout, 'bin', 'bin', 'hello'))
diff --git a/tests/frontend/workspace.py b/tests/frontend/workspace.py
index a6189458c..d08225353 100644
--- a/tests/frontend/workspace.py
+++ b/tests/frontend/workspace.py
@@ -656,7 +656,7 @@ def test_build(cli, tmpdir_factory, datafiles, kind, strict, from_workspace, gue
# Checkout the result
result = cli.run(project=project,
- args=args_dir + ['checkout'] + args_elm + [checkout])
+ args=args_dir + ['artifact', 'checkout', '--directory', checkout] + args_elm)
result.assert_success()
# Check that the pony.conf from the modified workspace exists
@@ -758,7 +758,7 @@ def test_detect_modifications(cli, tmpdir, datafiles, modification, strict):
# Checkout the result
result = cli.run(project=project, args=[
- 'checkout', element_name, checkout
+ 'artifact', 'checkout', element_name, '--directory', checkout
])
result.assert_success()
@@ -1034,7 +1034,7 @@ def test_cache_key_workspace_in_dependencies(cli, tmpdir, datafiles, strict):
# Checkout the result
result = cli.run(project=project, args=[
- 'checkout', back_dep_element_name, checkout
+ 'artifact', 'checkout', back_dep_element_name, '--directory', checkout
])
result.assert_success()
diff --git a/tests/integration/autotools.py b/tests/integration/autotools.py
index 1dc7eeacc..c7070ad29 100644
--- a/tests/integration/autotools.py
+++ b/tests/integration/autotools.py
@@ -28,7 +28,7 @@ def test_autotools_build(cli, tmpdir, datafiles):
result = cli.run(project=project, args=['build', element_name])
assert result.exit_code == 0
- result = cli.run(project=project, args=['checkout', element_name, checkout])
+ result = cli.run(project=project, args=['artifact', 'checkout', element_name, '--directory', checkout])
assert result.exit_code == 0
assert_contains(checkout, ['/usr', '/usr/lib', '/usr/bin',
@@ -51,7 +51,7 @@ def test_autotools_confroot_build(cli, tmpdir, datafiles):
result = cli.run(project=project, args=['build', element_name])
assert result.exit_code == 0
- result = cli.run(project=project, args=['checkout', element_name, checkout])
+ result = cli.run(project=project, args=['artifact', 'checkout', element_name, '--directory', checkout])
assert result.exit_code == 0
assert_contains(checkout, ['/usr', '/usr/lib', '/usr/bin',
diff --git a/tests/integration/cachedfail.py b/tests/integration/cachedfail.py
index d902bac48..2c79e6a90 100644
--- a/tests/integration/cachedfail.py
+++ b/tests/integration/cachedfail.py
@@ -54,7 +54,7 @@ def test_build_checkout_cached_fail(cli, tmpdir, datafiles):
# Now check it out
result = cli.run(project=project, args=[
- 'checkout', 'element.bst', checkout
+ 'artifact', 'checkout', 'element.bst', '--directory', checkout
])
result.assert_success()
diff --git a/tests/integration/cmake.py b/tests/integration/cmake.py
index 235dee321..e82ec6565 100644
--- a/tests/integration/cmake.py
+++ b/tests/integration/cmake.py
@@ -25,7 +25,7 @@ def test_cmake_build(cli, tmpdir, datafiles):
result = cli.run(project=project, args=['build', element_name])
assert result.exit_code == 0
- result = cli.run(project=project, args=['checkout', element_name, checkout])
+ result = cli.run(project=project, args=['artifact', 'checkout', element_name, '--directory', checkout])
assert result.exit_code == 0
assert_contains(checkout, ['/usr', '/usr/bin', '/usr/bin/hello'])
@@ -41,7 +41,7 @@ def test_cmake_confroot_build(cli, tmpdir, datafiles):
result = cli.run(project=project, args=['build', element_name])
assert result.exit_code == 0
- result = cli.run(project=project, args=['checkout', element_name, checkout])
+ result = cli.run(project=project, args=['artifact', 'checkout', element_name, '--directory', checkout])
assert result.exit_code == 0
assert_contains(checkout, ['/usr', '/usr/bin', '/usr/bin/hello'])
diff --git a/tests/integration/compose-symlinks.py b/tests/integration/compose-symlinks.py
index bf279fa6f..2599d8bcd 100644
--- a/tests/integration/compose-symlinks.py
+++ b/tests/integration/compose-symlinks.py
@@ -36,7 +36,8 @@ def test_compose_symlinks(cli, tmpdir, datafiles):
result = cli.run(project=project, args=['build', 'compose-symlinks/compose.bst'])
result.assert_success()
- result = cli.run(project=project, args=['checkout', 'compose-symlinks/compose.bst', checkout])
+ result = cli.run(project=project, args=['artifact', 'checkout', 'compose-symlinks/compose.bst',
+ '--directory', checkout])
result.assert_success()
assert set(walk_dir(checkout)) == set(['/sbin', '/usr', '/usr/sbin',
diff --git a/tests/integration/compose.py b/tests/integration/compose.py
index 36e1da7c4..6c18ea931 100644
--- a/tests/integration/compose.py
+++ b/tests/integration/compose.py
@@ -97,7 +97,7 @@ def test_compose_include(cli, tmpdir, datafiles, include_domains,
result = cli.run(project=project, args=['build', element_name])
assert result.exit_code == 0
- result = cli.run(project=project, args=['checkout', element_name, checkout])
+ result = cli.run(project=project, args=['artifact', 'checkout', element_name, '--directory', checkout])
assert result.exit_code == 0
assert set(walk_dir(checkout)) == set(expected)
diff --git a/tests/integration/import.py b/tests/integration/import.py
index 6925a0a47..842640515 100644
--- a/tests/integration/import.py
+++ b/tests/integration/import.py
@@ -53,7 +53,7 @@ def test_import(cli, tmpdir, datafiles, source, target, path, expected):
res = cli.run(project=project, args=['build', element_name])
assert res.exit_code == 0
- cli.run(project=project, args=['checkout', element_name, checkout])
+ cli.run(project=project, args=['artifact', 'checkout', element_name, '--directory', checkout])
assert res.exit_code == 0
assert set(walk_dir(checkout)) == set(expected)
diff --git a/tests/integration/make.py b/tests/integration/make.py
index 3b8d1e461..806b87463 100644
--- a/tests/integration/make.py
+++ b/tests/integration/make.py
@@ -28,7 +28,7 @@ def test_make_build(cli, tmpdir, datafiles):
result = cli.run(project=project, args=['build', element_name])
assert result.exit_code == 0
- result = cli.run(project=project, args=['checkout', element_name, checkout])
+ result = cli.run(project=project, args=['artifact', 'checkout', element_name, '--directory', checkout])
assert result.exit_code == 0
assert_contains(checkout, ['/usr', '/usr/bin',
diff --git a/tests/integration/manual.py b/tests/integration/manual.py
index c6a905ddc..2a3dc3bd6 100644
--- a/tests/integration/manual.py
+++ b/tests/integration/manual.py
@@ -52,7 +52,7 @@ def test_manual_element(cli, tmpdir, datafiles):
res = cli.run(project=project, args=['build', element_name])
assert res.exit_code == 0
- cli.run(project=project, args=['checkout', element_name, checkout])
+ cli.run(project=project, args=['artifact', 'checkout', element_name, '--directory', checkout])
assert res.exit_code == 0
with open(os.path.join(checkout, 'test')) as f:
@@ -86,7 +86,7 @@ def test_manual_element_environment(cli, tmpdir, datafiles):
res = cli.run(project=project, args=['build', element_name])
assert res.exit_code == 0
- cli.run(project=project, args=['checkout', element_name, checkout])
+ cli.run(project=project, args=['artifact', 'checkout', element_name, '--directory', checkout])
assert res.exit_code == 0
with open(os.path.join(checkout, 'test')) as f:
@@ -119,7 +119,7 @@ def test_manual_element_noparallel(cli, tmpdir, datafiles):
res = cli.run(project=project, args=['build', element_name])
assert res.exit_code == 0
- cli.run(project=project, args=['checkout', element_name, checkout])
+ cli.run(project=project, args=['artifact', 'checkout', element_name, '--directory', checkout])
assert res.exit_code == 0
with open(os.path.join(checkout, 'test')) as f:
diff --git a/tests/integration/pip_element.py b/tests/integration/pip_element.py
index 13ada09fd..523bc20f2 100644
--- a/tests/integration/pip_element.py
+++ b/tests/integration/pip_element.py
@@ -47,7 +47,7 @@ def test_pip_build(cli, tmpdir, datafiles):
result = cli.run(project=project, args=['build', element_name])
assert result.exit_code == 0
- result = cli.run(project=project, args=['checkout', element_name, checkout])
+ result = cli.run(project=project, args=['artifact', 'checkout', element_name, '--directory', checkout])
assert result.exit_code == 0
assert_contains(checkout, ['/usr', '/usr/lib', '/usr/bin',
diff --git a/tests/integration/pip_source.py b/tests/integration/pip_source.py
index d6cbb9893..3948fc41d 100644
--- a/tests/integration/pip_source.py
+++ b/tests/integration/pip_source.py
@@ -58,7 +58,7 @@ def test_pip_source_import(cli, tmpdir, datafiles, setup_pypi_repo):
result = cli.run(project=project, args=['build', element_name])
assert result.exit_code == 0
- result = cli.run(project=project, args=['checkout', element_name, checkout])
+ result = cli.run(project=project, args=['artifact', 'checkout', element_name, '--directory', checkout])
assert result.exit_code == 0
assert_contains(checkout, ['/.bst_pip_downloads',
diff --git a/tests/integration/script.py b/tests/integration/script.py
index 6203c323c..ff1b8aa11 100644
--- a/tests/integration/script.py
+++ b/tests/integration/script.py
@@ -49,7 +49,7 @@ def test_script(cli, tmpdir, datafiles):
res = cli.run(project=project, args=['build', element_name])
assert res.exit_code == 0
- res = cli.run(project=project, args=['checkout', element_name, checkout])
+ res = cli.run(project=project, args=['artifact', 'checkout', element_name, '--directory', checkout])
assert res.exit_code == 0
with open(os.path.join(checkout, 'test')) as f:
@@ -81,7 +81,7 @@ def test_script_root(cli, tmpdir, datafiles):
res = cli.run(project=project, args=['build', element_name])
assert res.exit_code == 0
- res = cli.run(project=project, args=['checkout', element_name, checkout])
+ res = cli.run(project=project, args=['artifact', 'checkout', element_name, '--directory', checkout])
assert res.exit_code == 0
with open(os.path.join(checkout, 'test')) as f:
@@ -135,7 +135,7 @@ def test_script_cwd(cli, tmpdir, datafiles):
res = cli.run(project=project, args=['build', element_name])
assert res.exit_code == 0
- res = cli.run(project=project, args=['checkout', element_name, checkout])
+ res = cli.run(project=project, args=['artifact', 'checkout', element_name, '--directory', checkout])
assert res.exit_code == 0
with open(os.path.join(checkout, 'test')) as f:
@@ -154,7 +154,7 @@ def test_script_layout(cli, tmpdir, datafiles):
res = cli.run(project=project, args=['build', element_name])
assert res.exit_code == 0
- cli.run(project=project, args=['checkout', element_name, checkout])
+ cli.run(project=project, args=['artifact', 'checkout', element_name, '--directory', checkout])
assert res.exit_code == 0
with open(os.path.join(checkout, 'test')) as f:
@@ -175,8 +175,8 @@ def test_regression_cache_corruption(cli, tmpdir, datafiles):
res = cli.run(project=project, args=['build', canary_element_name])
assert res.exit_code == 0
- res = cli.run(project=project, args=['checkout', canary_element_name,
- checkout_original])
+ res = cli.run(project=project, args=['artifact', 'checkout', canary_element_name,
+ '--directory', checkout_original])
assert res.exit_code == 0
with open(os.path.join(checkout_original, 'canary')) as f:
@@ -185,8 +185,8 @@ def test_regression_cache_corruption(cli, tmpdir, datafiles):
res = cli.run(project=project, args=['build', element_name])
assert res.exit_code == 0
- res = cli.run(project=project, args=['checkout', canary_element_name,
- checkout_after])
+ res = cli.run(project=project, args=['artifact', 'checkout', canary_element_name,
+ '--directory', checkout_after])
assert res.exit_code == 0
with open(os.path.join(checkout_after, 'canary')) as f:
@@ -215,8 +215,8 @@ def test_regression_cache_corruption_2(cli, tmpdir, datafiles):
res = cli.run(project=project, args=['build', canary_element_name])
assert res.exit_code == 0
- res = cli.run(project=project, args=['checkout', canary_element_name,
- checkout_original])
+ res = cli.run(project=project, args=['artifact', 'checkout', canary_element_name,
+ '--directory', checkout_original])
assert res.exit_code == 0
with open(os.path.join(checkout_original, 'canary')) as f:
@@ -225,8 +225,8 @@ def test_regression_cache_corruption_2(cli, tmpdir, datafiles):
res = cli.run(project=project, args=['build', element_name])
assert res.exit_code == 0
- res = cli.run(project=project, args=['checkout', canary_element_name,
- checkout_after])
+ res = cli.run(project=project, args=['artifact', 'checkout', canary_element_name,
+ '--directory', checkout_after])
assert res.exit_code == 0
with open(os.path.join(checkout_after, 'canary')) as f:
diff --git a/tests/integration/shell.py b/tests/integration/shell.py
index 983cab6b5..f77e101ae 100644
--- a/tests/integration/shell.py
+++ b/tests/integration/shell.py
@@ -328,7 +328,7 @@ def test_sysroot(cli, tmpdir, datafiles):
# Build and check out a sysroot
res = cli.run(project=project, args=['build', base_element])
res.assert_success()
- res = cli.run(project=project, args=['checkout', base_element, checkout_dir])
+ res = cli.run(project=project, args=['artifact', 'checkout', base_element, '--directory', checkout_dir])
res.assert_success()
# Mutate the sysroot
diff --git a/tests/integration/source-determinism.py b/tests/integration/source-determinism.py
index a14f3e5b0..e9a308deb 100644
--- a/tests/integration/source-determinism.py
+++ b/tests/integration/source-determinism.py
@@ -87,7 +87,7 @@ def test_deterministic_source_umask(cli, tmpdir, datafiles, kind, integration_ca
result = cli.run(project=project, args=['build', element_name])
result.assert_success()
- result = cli.run(project=project, args=['checkout', element_name, checkoutdir])
+ result = cli.run(project=project, args=['artifact', 'checkout', element_name, '--directory', checkoutdir])
result.assert_success()
with open(os.path.join(checkoutdir, 'ls-l'), 'r') as f:
@@ -150,7 +150,7 @@ def test_deterministic_source_local(cli, tmpdir, datafiles, integration_cache):
result = cli.run(project=project, args=['build', element_name])
result.assert_success()
- result = cli.run(project=project, args=['checkout', element_name, checkoutdir])
+ result = cli.run(project=project, args=['artifact', 'checkout', element_name, '--directory', checkoutdir])
result.assert_success()
with open(os.path.join(checkoutdir, 'ls-l'), 'r') as f:
diff --git a/tests/integration/stack.py b/tests/integration/stack.py
index e48e00c36..93b388038 100644
--- a/tests/integration/stack.py
+++ b/tests/integration/stack.py
@@ -26,7 +26,7 @@ def test_stack(cli, tmpdir, datafiles):
res = cli.run(project=project, args=['build', element_name])
assert res.exit_code == 0
- cli.run(project=project, args=['checkout', element_name, checkout])
+ cli.run(project=project, args=['artifact', 'checkout', element_name, '--directory', checkout])
assert res.exit_code == 0
with open(os.path.join(checkout, 'hi')) as f:
diff --git a/tests/integration/symlinks.py b/tests/integration/symlinks.py
index 7b8703caf..51bf6b11f 100644
--- a/tests/integration/symlinks.py
+++ b/tests/integration/symlinks.py
@@ -28,7 +28,7 @@ def test_absolute_symlinks_made_relative(cli, tmpdir, datafiles):
result = cli.run(project=project, args=['build', element_name])
assert result.exit_code == 0
- result = cli.run(project=project, args=['checkout', element_name, checkout])
+ result = cli.run(project=project, args=['artifact', 'checkout', element_name, '--directory', checkout])
assert result.exit_code == 0
symlink = os.path.join(checkout, 'opt', 'orgname')
@@ -52,7 +52,7 @@ def test_allow_overlaps_inside_symlink_with_dangling_target(cli, tmpdir, datafil
result = cli.run(project=project, args=['build', element_name])
assert result.exit_code == 0
- result = cli.run(project=project, args=['checkout', element_name, checkout])
+ result = cli.run(project=project, args=['artifact', 'checkout', element_name, '--directory', checkout])
assert result.exit_code == 0
# See the dangling-symlink*.bst elements for details on what we are testing.
@@ -73,6 +73,6 @@ def test_detect_symlink_overlaps_pointing_outside_sandbox(cli, tmpdir, datafiles
# ...but when we compose them together, the overlaps create paths that
# point outside the sandbox which BuildStream needs to detect before it
# tries to actually write there.
- result = cli.run(project=project, args=['checkout', element_name, checkout])
+ result = cli.run(project=project, args=['artifact', 'checkout', element_name, '--directory', checkout])
assert result.exit_code == -1
assert "Destination path resolves to a path outside of the staging area" in result.stderr
diff --git a/tests/sources/bzr.py b/tests/sources/bzr.py
index 9895180e0..a56005f5e 100644
--- a/tests/sources/bzr.py
+++ b/tests/sources/bzr.py
@@ -36,7 +36,7 @@ def test_fetch_checkout(cli, tmpdir, datafiles):
assert result.exit_code == 0
result = cli.run(project=project, args=['build', 'target.bst'])
assert result.exit_code == 0
- result = cli.run(project=project, args=['checkout', 'target.bst', checkoutdir])
+ result = cli.run(project=project, args=['artifact', 'checkout', 'target.bst', '--directory', checkoutdir])
assert result.exit_code == 0
# Assert we checked out the file as it was commited
diff --git a/tests/sources/deb.py b/tests/sources/deb.py
index b925fc9e9..b40358eaa 100644
--- a/tests/sources/deb.py
+++ b/tests/sources/deb.py
@@ -114,7 +114,7 @@ def test_stage_default_basedir(cli, tmpdir, datafiles):
result.assert_success()
result = cli.run(project=project, args=['build', 'target.bst'])
result.assert_success()
- result = cli.run(project=project, args=['checkout', 'target.bst', checkoutdir])
+ result = cli.run(project=project, args=['artifact', 'checkout', 'target.bst', '--directory', checkoutdir])
result.assert_success()
# Check that the content of the first directory is checked out (base-dir: '')
@@ -142,7 +142,7 @@ def test_stage_no_basedir(cli, tmpdir, datafiles):
result.assert_success()
result = cli.run(project=project, args=['build', 'target.bst'])
result.assert_success()
- result = cli.run(project=project, args=['checkout', 'target.bst', checkoutdir])
+ result = cli.run(project=project, args=['artifact', 'checkout', 'target.bst', '--directory', checkoutdir])
result.assert_success()
# Check that the full content of the tarball is checked out (base-dir: '')
@@ -170,7 +170,7 @@ def test_stage_explicit_basedir(cli, tmpdir, datafiles):
result.assert_success()
result = cli.run(project=project, args=['build', 'target.bst'])
result.assert_success()
- result = cli.run(project=project, args=['checkout', 'target.bst', checkoutdir])
+ result = cli.run(project=project, args=['artifact', 'checkout', 'target.bst', '--directory', checkoutdir])
result.assert_success()
# Check that the content of the first directory is checked out (base-dir: '')
diff --git a/tests/sources/git.py b/tests/sources/git.py
index f194e9f54..795908329 100644
--- a/tests/sources/git.py
+++ b/tests/sources/git.py
@@ -95,7 +95,7 @@ def test_submodule_fetch_checkout(cli, tmpdir, datafiles):
result.assert_success()
result = cli.run(project=project, args=['build', 'target.bst'])
result.assert_success()
- result = cli.run(project=project, args=['checkout', 'target.bst', checkoutdir])
+ result = cli.run(project=project, args=['artifact', 'checkout', 'target.bst', '--directory', checkoutdir])
result.assert_success()
# Assert we checked out both files at their expected location
@@ -134,7 +134,7 @@ def test_submodule_fetch_source_enable_explicit(cli, tmpdir, datafiles):
result.assert_success()
result = cli.run(project=project, args=['build', 'target.bst'])
result.assert_success()
- result = cli.run(project=project, args=['checkout', 'target.bst', checkoutdir])
+ result = cli.run(project=project, args=['artifact', 'checkout', 'target.bst', '--directory', checkoutdir])
result.assert_success()
# Assert we checked out both files at their expected location
@@ -173,7 +173,7 @@ def test_submodule_fetch_source_disable(cli, tmpdir, datafiles):
result.assert_success()
result = cli.run(project=project, args=['build', 'target.bst'])
result.assert_success()
- result = cli.run(project=project, args=['checkout', 'target.bst', checkoutdir])
+ result = cli.run(project=project, args=['artifact', 'checkout', 'target.bst', '--directory', checkoutdir])
result.assert_success()
# Assert we checked out both files at their expected location
@@ -212,7 +212,7 @@ def test_submodule_fetch_submodule_does_override(cli, tmpdir, datafiles):
result.assert_success()
result = cli.run(project=project, args=['build', 'target.bst'])
result.assert_success()
- result = cli.run(project=project, args=['checkout', 'target.bst', checkoutdir])
+ result = cli.run(project=project, args=['artifact', 'checkout', 'target.bst', '--directory', checkoutdir])
result.assert_success()
# Assert we checked out both files at their expected location
@@ -256,7 +256,7 @@ def test_submodule_fetch_submodule_individual_checkout(cli, tmpdir, datafiles):
result.assert_success()
result = cli.run(project=project, args=['build', 'target.bst'])
result.assert_success()
- result = cli.run(project=project, args=['checkout', 'target.bst', checkoutdir])
+ result = cli.run(project=project, args=['artifact', 'checkout', 'target.bst', '--directory', checkoutdir])
result.assert_success()
# Assert we checked out files at their expected location
@@ -301,7 +301,7 @@ def test_submodule_fetch_submodule_individual_checkout_explicit(cli, tmpdir, dat
result.assert_success()
result = cli.run(project=project, args=['build', 'target.bst'])
result.assert_success()
- result = cli.run(project=project, args=['checkout', 'target.bst', checkoutdir])
+ result = cli.run(project=project, args=['artifact', 'checkout', 'target.bst', '--directory', checkoutdir])
result.assert_success()
# Assert we checked out files at their expected location
@@ -341,7 +341,7 @@ def test_submodule_fetch_project_override(cli, tmpdir, datafiles):
result.assert_success()
result = cli.run(project=project, args=['build', 'target.bst'])
result.assert_success()
- result = cli.run(project=project, args=['checkout', 'target.bst', checkoutdir])
+ result = cli.run(project=project, args=['artifact', 'checkout', 'target.bst', '--directory', checkoutdir])
result.assert_success()
# Assert we checked out both files at their expected location
@@ -860,7 +860,7 @@ def test_git_describe(cli, tmpdir, datafiles, ref_storage, tag_type):
result = cli.run(project=project, args=['build', 'target.bst'])
result.assert_success()
- result = cli.run(project=project, args=['checkout', 'target.bst', checkout])
+ result = cli.run(project=project, args=['artifact', 'checkout', 'target.bst', '--directory', checkout])
result.assert_success()
if tag_type == 'annotated':
@@ -970,7 +970,7 @@ def test_git_describe_head_is_tagged(cli, tmpdir, datafiles, ref_storage, tag_ty
result = cli.run(project=project, args=['build', 'target.bst'])
result.assert_success()
- result = cli.run(project=project, args=['checkout', 'target.bst', checkout])
+ result = cli.run(project=project, args=['artifact', 'checkout', 'target.bst', '--directory', checkout])
result.assert_success()
if tag_type == 'annotated':
@@ -1061,7 +1061,7 @@ def test_git_describe_relevant_history(cli, tmpdir, datafiles):
result = cli.run(project=project, args=['build', 'target.bst'])
result.assert_success()
- result = cli.run(project=project, args=['checkout', 'target.bst', checkout])
+ result = cli.run(project=project, args=['artifact', 'checkout', 'target.bst', '--directory', checkout])
result.assert_success()
describe = subprocess.check_output(['git', 'describe'],
diff --git a/tests/sources/local.py b/tests/sources/local.py
index de12473d9..4a0851d72 100644
--- a/tests/sources/local.py
+++ b/tests/sources/local.py
@@ -77,7 +77,7 @@ def test_stage_file(cli, tmpdir, datafiles):
# Build, checkout
result = cli.run(project=project, args=['build', 'target.bst'])
result.assert_success()
- result = cli.run(project=project, args=['checkout', 'target.bst', checkoutdir])
+ result = cli.run(project=project, args=['artifact', 'checkout', 'target.bst', '--directory', checkoutdir])
result.assert_success()
# Check that the checkout contains the expected file
@@ -92,7 +92,7 @@ def test_stage_directory(cli, tmpdir, datafiles):
# Build, checkout
result = cli.run(project=project, args=['build', 'target.bst'])
result.assert_success()
- result = cli.run(project=project, args=['checkout', 'target.bst', checkoutdir])
+ result = cli.run(project=project, args=['artifact', 'checkout', 'target.bst', '--directory', checkoutdir])
result.assert_success()
# Check that the checkout contains the expected file and directory and other file
@@ -117,7 +117,7 @@ def test_stage_symlink(cli, tmpdir, datafiles):
# Build, checkout
result = cli.run(project=project, args=['build', 'target.bst'])
result.assert_success()
- result = cli.run(project=project, args=['checkout', 'target.bst', checkoutdir])
+ result = cli.run(project=project, args=['artifact', 'checkout', 'target.bst', '--directory', checkoutdir])
result.assert_success()
# Check that the checkout contains the expected file and directory and other file
diff --git a/tests/sources/patch.py b/tests/sources/patch.py
index 39d43369d..51ae69021 100644
--- a/tests/sources/patch.py
+++ b/tests/sources/patch.py
@@ -75,7 +75,7 @@ def test_stage_and_patch(cli, tmpdir, datafiles):
# Build, checkout
result = cli.run(project=project, args=['build', 'target.bst'])
result.assert_success()
- result = cli.run(project=project, args=['checkout', 'target.bst', checkoutdir])
+ result = cli.run(project=project, args=['artifact', 'checkout', 'target.bst', '--directory', checkoutdir])
result.assert_success()
# Test the file.txt was patched and changed
@@ -113,7 +113,7 @@ def test_stage_separate_patch_dir(cli, tmpdir, datafiles):
# Track, fetch, build, checkout
result = cli.run(project=project, args=['build', 'target.bst'])
result.assert_success()
- result = cli.run(project=project, args=['checkout', 'target.bst', checkoutdir])
+ result = cli.run(project=project, args=['artifact', 'checkout', 'target.bst', '--directory', checkoutdir])
result.assert_success()
# Test the file.txt was patched and changed
@@ -129,7 +129,7 @@ def test_stage_multiple_patches(cli, tmpdir, datafiles):
# Track, fetch, build, checkout
result = cli.run(project=project, args=['build', 'target.bst'])
result.assert_success()
- result = cli.run(project=project, args=['checkout', 'target.bst', checkoutdir])
+ result = cli.run(project=project, args=['artifact', 'checkout', 'target.bst', '--directory', checkoutdir])
result.assert_success()
# Test the file.txt was patched and changed
@@ -145,7 +145,7 @@ def test_patch_strip_level(cli, tmpdir, datafiles):
# Track, fetch, build, checkout
result = cli.run(project=project, args=['build', 'target.bst'])
result.assert_success()
- result = cli.run(project=project, args=['checkout', 'target.bst', checkoutdir])
+ result = cli.run(project=project, args=['artifact', 'checkout', 'target.bst', '--directory', checkoutdir])
result.assert_success()
# Test the file.txt was patched and changed
diff --git a/tests/sources/previous_source_access.py b/tests/sources/previous_source_access.py
index f090ac8a0..26640d180 100644
--- a/tests/sources/previous_source_access.py
+++ b/tests/sources/previous_source_access.py
@@ -35,7 +35,7 @@ def test_custom_transform_source(cli, tmpdir, datafiles):
])
destpath = os.path.join(cli.directory, 'checkout')
result = cli.run(project=project, args=[
- 'checkout', 'target.bst', destpath
+ 'artifact', 'checkout', 'target.bst', '--directory', destpath
])
result.assert_success()
# Assert that files from both sources exist, and that they have
diff --git a/tests/sources/remote.py b/tests/sources/remote.py
index 6062c9cbc..b8cf049b3 100644
--- a/tests/sources/remote.py
+++ b/tests/sources/remote.py
@@ -89,7 +89,7 @@ def test_simple_file_build(cli, tmpdir, datafiles):
result.assert_success()
result = cli.run(project=project, args=[
- 'checkout', 'target.bst', checkoutdir
+ 'artifact', 'checkout', 'target.bst', '--directory', checkoutdir
])
result.assert_success()
# Note that the url of the file in target.bst is actually /dir/file
@@ -122,7 +122,7 @@ def test_simple_file_custom_name_build(cli, tmpdir, datafiles):
result.assert_success()
result = cli.run(project=project, args=[
- 'checkout', 'target.bst', checkoutdir
+ 'artifact', 'checkout', 'target.bst', '--directory', checkoutdir
])
result.assert_success()
assert(not os.path.exists(os.path.join(checkoutdir, 'file')))
@@ -169,7 +169,7 @@ def test_executable(cli, tmpdir, datafiles):
])
result = cli.run(project=project, args=[
- 'checkout', 'target-custom-executable.bst', checkoutdir
+ 'artifact', 'checkout', 'target-custom-executable.bst', '--directory', checkoutdir
])
mode = os.stat(os.path.join(checkoutdir, 'some-custom-file')).st_mode
assert (mode & stat.S_IEXEC)
@@ -202,7 +202,7 @@ def test_use_netrc(cli, datafiles, server_type, tmpdir):
result.assert_success()
result = cli.run(project=project, args=['build', 'target.bst'])
result.assert_success()
- result = cli.run(project=project, args=['checkout', 'target.bst', checkoutdir])
+ result = cli.run(project=project, args=['artifact', 'checkout', 'target.bst', '--directory', checkoutdir])
result.assert_success()
checkout_file = os.path.join(checkoutdir, 'file')
diff --git a/tests/sources/tar.py b/tests/sources/tar.py
index 35eb8375e..406d6702b 100644
--- a/tests/sources/tar.py
+++ b/tests/sources/tar.py
@@ -139,7 +139,7 @@ def test_stage_default_basedir(cli, tmpdir, datafiles, srcdir):
result.assert_success()
result = cli.run(project=project, args=['build', 'target.bst'])
result.assert_success()
- result = cli.run(project=project, args=['checkout', 'target.bst', checkoutdir])
+ result = cli.run(project=project, args=['artifact', 'checkout', 'target.bst', '--directory', checkoutdir])
result.assert_success()
# Check that the content of the first directory is checked out (base-dir: '*')
@@ -168,7 +168,7 @@ def test_stage_no_basedir(cli, tmpdir, datafiles, srcdir):
result.assert_success()
result = cli.run(project=project, args=['build', 'target.bst'])
result.assert_success()
- result = cli.run(project=project, args=['checkout', 'target.bst', checkoutdir])
+ result = cli.run(project=project, args=['artifact', 'checkout', 'target.bst', '--directory', checkoutdir])
result.assert_success()
# Check that the full content of the tarball is checked out (base-dir: '')
@@ -197,7 +197,7 @@ def test_stage_explicit_basedir(cli, tmpdir, datafiles, srcdir):
result.assert_success()
result = cli.run(project=project, args=['build', 'target.bst'])
result.assert_success()
- result = cli.run(project=project, args=['checkout', 'target.bst', checkoutdir])
+ result = cli.run(project=project, args=['artifact', 'checkout', 'target.bst', '--directory', checkoutdir])
result.assert_success()
# Check that the content of the first directory is checked out (base-dir: '*')
@@ -233,7 +233,7 @@ def test_stage_contains_links(cli, tmpdir, datafiles):
result.assert_success()
result = cli.run(project=project, args=['build', 'target.bst'])
result.assert_success()
- result = cli.run(project=project, args=['checkout', 'target.bst', checkoutdir])
+ result = cli.run(project=project, args=['artifact', 'checkout', 'target.bst', '--directory', checkoutdir])
result.assert_success()
# Check that the content of the first directory is checked out (base-dir: '*')
@@ -262,7 +262,7 @@ def test_stage_default_basedir_lzip(cli, tmpdir, datafiles, srcdir):
result.assert_success()
result = cli.run(project=project, args=['build', 'target-lz.bst'])
result.assert_success()
- result = cli.run(project=project, args=['checkout', 'target-lz.bst', checkoutdir])
+ result = cli.run(project=project, args=['artifact', 'checkout', 'target-lz.bst', '--directory', checkoutdir])
result.assert_success()
# Check that the content of the first directory is checked out (base-dir: '*')
@@ -348,7 +348,7 @@ def test_use_netrc(cli, datafiles, server_type, tmpdir):
result.assert_success()
result = cli.run(project=project, args=['build', 'target.bst'])
result.assert_success()
- result = cli.run(project=project, args=['checkout', 'target.bst', checkoutdir])
+ result = cli.run(project=project, args=['artifact', 'checkout', 'target.bst', '--directory', checkoutdir])
result.assert_success()
original_dir = os.path.join(str(datafiles), 'content', 'a')
diff --git a/tests/sources/zip.py b/tests/sources/zip.py
index 36e033427..009862e1c 100644
--- a/tests/sources/zip.py
+++ b/tests/sources/zip.py
@@ -123,7 +123,7 @@ def test_stage_default_basedir(cli, tmpdir, datafiles):
result.assert_success()
result = cli.run(project=project, args=['build', 'target.bst'])
result.assert_success()
- result = cli.run(project=project, args=['checkout', 'target.bst', checkoutdir])
+ result = cli.run(project=project, args=['artifact', 'checkout', 'target.bst', '--directory', checkoutdir])
result.assert_success()
# Check that the content of the first directory is checked out (base-dir: '*')
@@ -151,7 +151,7 @@ def test_stage_no_basedir(cli, tmpdir, datafiles):
result.assert_success()
result = cli.run(project=project, args=['build', 'target.bst'])
result.assert_success()
- result = cli.run(project=project, args=['checkout', 'target.bst', checkoutdir])
+ result = cli.run(project=project, args=['artifact', 'checkout', 'target.bst', '--directory', checkoutdir])
result.assert_success()
# Check that the full content of the tarball is checked out (base-dir: '')
@@ -179,7 +179,7 @@ def test_stage_explicit_basedir(cli, tmpdir, datafiles):
result.assert_success()
result = cli.run(project=project, args=['build', 'target.bst'])
result.assert_success()
- result = cli.run(project=project, args=['checkout', 'target.bst', checkoutdir])
+ result = cli.run(project=project, args=['artifact', 'checkout', 'target.bst', '--directory', checkoutdir])
result.assert_success()
# Check that the content of the first directory is checked out (base-dir: '*')
@@ -221,7 +221,7 @@ def test_use_netrc(cli, datafiles, server_type, tmpdir):
result.assert_success()
result = cli.run(project=project, args=['build', 'target.bst'])
result.assert_success()
- result = cli.run(project=project, args=['checkout', 'target.bst', checkoutdir])
+ result = cli.run(project=project, args=['artifact', 'checkout', 'target.bst', '--directory', checkoutdir])
result.assert_success()
original_dir = os.path.join(str(datafiles), 'content', 'a')