summaryrefslogtreecommitdiff
path: root/tests/frontend
diff options
context:
space:
mode:
Diffstat (limited to 'tests/frontend')
-rw-r--r--tests/frontend/cross_junction_workspace.py2
-rw-r--r--tests/frontend/fetch.py16
-rw-r--r--tests/frontend/help.py3
-rw-r--r--tests/frontend/logging.py4
-rw-r--r--tests/frontend/mirror.py30
-rw-r--r--tests/frontend/show.py2
-rw-r--r--tests/frontend/source_checkout.py16
-rw-r--r--tests/frontend/track.py48
-rw-r--r--tests/frontend/track_cross_junction.py11
-rw-r--r--tests/frontend/workspace.py4
-rw-r--r--tests/frontend/yamlcache.py4
11 files changed, 71 insertions, 69 deletions
diff --git a/tests/frontend/cross_junction_workspace.py b/tests/frontend/cross_junction_workspace.py
index ad2a62626..a10eb7421 100644
--- a/tests/frontend/cross_junction_workspace.py
+++ b/tests/frontend/cross_junction_workspace.py
@@ -35,7 +35,7 @@ def prepare_junction_project(cli, tmpdir):
'sources': [sub_repo.source_config(ref=sub_ref)]},
str(main_project.join("sub.bst")))
- args = ['fetch', 'sub.bst']
+ args = ['source', 'fetch', 'sub.bst']
result = cli.run(project=str(main_project), args=args)
result.assert_success()
diff --git a/tests/frontend/fetch.py b/tests/frontend/fetch.py
index e896f4a67..96c4a9335 100644
--- a/tests/frontend/fetch.py
+++ b/tests/frontend/fetch.py
@@ -41,7 +41,7 @@ def test_fetch(cli, tmpdir, datafiles, kind):
assert cli.get_element_state(project, element_name) == 'fetch needed'
# Now try to fetch it
- result = cli.run(project=project, args=['fetch', element_name])
+ result = cli.run(project=project, args=['source', 'fetch', element_name])
result.assert_success()
# Assert that we are now buildable because the source is
@@ -55,7 +55,7 @@ def test_fetch_consistency_error(cli, tmpdir, datafiles):
# When the error occurs outside of the scheduler at load time,
# then the SourceError is reported directly as the main error.
- result = cli.run(project=project, args=['fetch', 'error.bst'])
+ result = cli.run(project=project, args=['source', 'fetch', 'error.bst'])
result.assert_main_error(ErrorDomain.SOURCE, 'the-consistency-error')
@@ -70,7 +70,7 @@ def test_fetch_consistency_bug(cli, tmpdir, datafiles):
# for a fetch command, we could report this to the user
# more gracefully as a BUG message.
#
- result = cli.run(project=project, args=['fetch', 'bug.bst'])
+ result = cli.run(project=project, args=['source', 'fetch', 'bug.bst'])
assert result.exc is not None
assert str(result.exc) == "Something went terribly wrong"
@@ -121,7 +121,7 @@ def test_unfetched_junction(cli, tmpdir, datafiles, ref_storage):
# Now try to fetch it, this should automatically result in fetching
# the junction itself.
- result = cli.run(project=project, args=['fetch', 'junction-dep.bst'])
+ result = cli.run(project=project, args=['source', 'fetch', 'junction-dep.bst'])
result.assert_success()
@@ -155,7 +155,7 @@ def test_inconsistent_junction(cli, tmpdir, datafiles, ref_storage):
# Now try to fetch it, this will bail with the appropriate error
# informing the user to track the junction first
- result = cli.run(project=project, args=['fetch', 'junction-dep.bst'])
+ result = cli.run(project=project, args=['source', 'fetch', 'junction-dep.bst'])
result.assert_main_error(ErrorDomain.LOAD, LoadErrorReason.SUBPROJECT_INCONSISTENT)
@@ -188,10 +188,10 @@ def test_fetch_cross_junction(cli, tmpdir, datafiles, ref_storage, kind):
generate_junction(tmpdir, subproject_path, junction_path, store_ref=(ref_storage == 'inline'))
if ref_storage == 'project.refs':
- result = cli.run(project=project, args=['track', 'junction.bst'])
+ result = cli.run(project=project, args=['source', 'track', 'junction.bst'])
result.assert_success()
- result = cli.run(project=project, args=['track', 'junction.bst:import-etc.bst'])
+ result = cli.run(project=project, args=['source', 'track', 'junction.bst:import-etc.bst'])
result.assert_success()
- result = cli.run(project=project, args=['fetch', 'junction.bst:import-etc.bst'])
+ result = cli.run(project=project, args=['source', 'fetch', 'junction.bst:import-etc.bst'])
result.assert_success()
diff --git a/tests/frontend/help.py b/tests/frontend/help.py
index 2a0c502e3..e3b406f56 100644
--- a/tests/frontend/help.py
+++ b/tests/frontend/help.py
@@ -20,12 +20,11 @@ def test_help_main(cli):
@pytest.mark.parametrize("command", [
('build'),
('checkout'),
- ('fetch'),
('pull'),
('push'),
('shell'),
('show'),
- ('track'),
+ ('source'),
('workspace')
])
def test_help(cli, command):
diff --git a/tests/frontend/logging.py b/tests/frontend/logging.py
index 733c7e85d..be4b4213b 100644
--- a/tests/frontend/logging.py
+++ b/tests/frontend/logging.py
@@ -38,7 +38,7 @@ def test_default_logging(cli, tmpdir, datafiles):
element_name))
# Now try to fetch it
- result = cli.run(project=project, args=['fetch', element_name])
+ result = cli.run(project=project, args=['source', 'fetch', element_name])
result.assert_success()
m = re.search("\[\d\d:\d\d:\d\d\]\[\]\[\] SUCCESS Checking sources", result.stderr)
@@ -74,7 +74,7 @@ def test_custom_logging(cli, tmpdir, datafiles):
element_name))
# Now try to fetch it
- result = cli.run(project=project, args=['fetch', element_name])
+ result = cli.run(project=project, args=['source', 'fetch', element_name])
result.assert_success()
m = re.search("\d\d:\d\d:\d\d,\d\d:\d\d:\d\d.\d{6},\d\d:\d\d:\d\d,,,SUCCESS,Checking sources", result.stderr)
diff --git a/tests/frontend/mirror.py b/tests/frontend/mirror.py
index 91a874335..ccfe2ca30 100644
--- a/tests/frontend/mirror.py
+++ b/tests/frontend/mirror.py
@@ -135,7 +135,7 @@ def test_mirror_fetch(cli, tmpdir, datafiles, kind):
# No obvious ways of checking that the mirror has been fetched
# But at least we can be sure it succeeds
- result = cli.run(project=project_dir, args=['fetch', element_name])
+ result = cli.run(project=project_dir, args=['source', 'fetch', element_name])
result.assert_success()
@@ -211,7 +211,7 @@ def test_mirror_fetch_ref_storage(cli, tmpdir, datafiles, ref_storage, mirror):
project_file = os.path.join(project_dir, 'project.conf')
_yaml.dump(project, project_file)
- result = cli.run(project=project_dir, args=['fetch', element_name])
+ result = cli.run(project=project_dir, args=['source', 'fetch', element_name])
result.assert_success()
@@ -268,7 +268,7 @@ def test_mirror_fetch_upstream_absent(cli, tmpdir, datafiles, kind):
project_file = os.path.join(project_dir, 'project.conf')
_yaml.dump(project, project_file)
- result = cli.run(project=project_dir, args=['fetch', element_name])
+ result = cli.run(project=project_dir, args=['source', 'fetch', element_name])
result.assert_success()
@@ -287,7 +287,7 @@ def test_mirror_fetch_multi(cli, tmpdir, datafiles):
project = generate_project()
_yaml.dump(project, project_file)
- result = cli.run(project=project_dir, args=['fetch', element_name])
+ result = cli.run(project=project_dir, args=['source', 'fetch', element_name])
result.assert_success()
with open(output_file) as f:
contents = f.read()
@@ -310,7 +310,7 @@ def test_mirror_fetch_default_cmdline(cli, tmpdir, datafiles):
project = generate_project()
_yaml.dump(project, project_file)
- result = cli.run(project=project_dir, args=['--default-mirror', 'arrakis', 'fetch', element_name])
+ result = cli.run(project=project_dir, args=['--default-mirror', 'arrakis', 'source', 'fetch', element_name])
result.assert_success()
with open(output_file) as f:
contents = f.read()
@@ -349,7 +349,7 @@ def test_mirror_fetch_default_userconfig(cli, tmpdir, datafiles):
}
cli.configure(userconfig)
- result = cli.run(project=project_dir, args=['fetch', element_name])
+ result = cli.run(project=project_dir, args=['source', 'fetch', element_name])
result.assert_success()
with open(output_file) as f:
contents = f.read()
@@ -388,7 +388,7 @@ def test_mirror_fetch_default_cmdline_overrides_config(cli, tmpdir, datafiles):
}
cli.configure(userconfig)
- result = cli.run(project=project_dir, args=['--default-mirror', 'arrakis', 'fetch', element_name])
+ result = cli.run(project=project_dir, args=['--default-mirror', 'arrakis', 'source', 'fetch', element_name])
result.assert_success()
with open(output_file) as f:
contents = f.read()
@@ -459,7 +459,7 @@ def test_mirror_track_upstream_present(cli, tmpdir, datafiles, kind):
project_file = os.path.join(project_dir, 'project.conf')
_yaml.dump(project, project_file)
- result = cli.run(project=project_dir, args=['track', element_name])
+ result = cli.run(project=project_dir, args=['source', 'track', element_name])
result.assert_success()
# Tracking tries upstream first. Check the ref is from upstream.
@@ -525,7 +525,7 @@ def test_mirror_track_upstream_absent(cli, tmpdir, datafiles, kind):
project_file = os.path.join(project_dir, 'project.conf')
_yaml.dump(project, project_file)
- result = cli.run(project=project_dir, args=['track', element_name])
+ result = cli.run(project=project_dir, args=['source', 'track', element_name])
result.assert_success()
# Check that tracking fell back to the mirror
@@ -604,7 +604,7 @@ def test_mirror_from_includes(cli, tmpdir, datafiles, kind):
# Now make the upstream unavailable.
os.rename(upstream_repo.repo, '{}.bak'.format(upstream_repo.repo))
- result = cli.run(project=project_dir, args=['fetch', element_name])
+ result = cli.run(project=project_dir, args=['source', 'fetch', element_name])
result.assert_success()
@@ -678,11 +678,11 @@ def test_mirror_junction_from_includes(cli, tmpdir, datafiles, kind):
# Now make the upstream unavailable.
os.rename(upstream_repo.repo, '{}.bak'.format(upstream_repo.repo))
- result = cli.run(project=project_dir, args=['fetch', element_name])
+ result = cli.run(project=project_dir, args=['source', 'fetch', element_name])
result.assert_main_error(ErrorDomain.STREAM, None)
# Now make the upstream available again.
os.rename('{}.bak'.format(upstream_repo.repo), upstream_repo.repo)
- result = cli.run(project=project_dir, args=['fetch', element_name])
+ result = cli.run(project=project_dir, args=['source', 'fetch', element_name])
result.assert_success()
@@ -762,7 +762,7 @@ def test_mirror_git_submodule_fetch(cli, tmpdir, datafiles):
project_file = os.path.join(project_dir, 'project.conf')
_yaml.dump(project, project_file)
- result = cli.run(project=project_dir, args=['fetch', element_name])
+ result = cli.run(project=project_dir, args=['source', 'fetch', element_name])
result.assert_success()
@@ -849,7 +849,7 @@ def test_mirror_fallback_git_only_submodules(cli, tmpdir, datafiles):
# Now make the upstream unavailable.
os.rename(upstream_bin_repo.repo, '{}.bak'.format(upstream_bin_repo.repo))
- result = cli.run(project=project_dir, args=['fetch', element_name])
+ result = cli.run(project=project_dir, args=['source', 'fetch', element_name])
result.assert_success()
result = cli.run(project=project_dir, args=['build', element_name])
@@ -945,7 +945,7 @@ def test_mirror_fallback_git_with_submodules(cli, tmpdir, datafiles):
# Now make the upstream unavailable.
os.rename(upstream_main_repo.repo, '{}.bak'.format(upstream_main_repo.repo))
- result = cli.run(project=project_dir, args=['fetch', element_name])
+ result = cli.run(project=project_dir, args=['source', 'fetch', element_name])
result.assert_success()
result = cli.run(project=project_dir, args=['build', element_name])
diff --git a/tests/frontend/show.py b/tests/frontend/show.py
index d6e153e2b..57f04e46d 100644
--- a/tests/frontend/show.py
+++ b/tests/frontend/show.py
@@ -236,7 +236,7 @@ def test_fetched_junction(cli, tmpdir, datafiles, element_name):
_yaml.dump(element, element_path)
result = cli.run(project=project, silent=True, args=[
- 'fetch', 'junction.bst'])
+ 'source', 'fetch', 'junction.bst'])
result.assert_success()
diff --git a/tests/frontend/source_checkout.py b/tests/frontend/source_checkout.py
index f6067498d..d7ff86d70 100644
--- a/tests/frontend/source_checkout.py
+++ b/tests/frontend/source_checkout.py
@@ -50,7 +50,7 @@ def test_source_checkout(datafiles, cli, tmpdir_factory, with_workspace, guess_e
else:
ws_cmd = []
- args = ws_cmd + ['source-checkout', '--deps', 'none'] + elm_cmd + [checkout]
+ args = ws_cmd + ['source', 'checkout', '--deps', 'none'] + elm_cmd + [checkout]
result = cli.run(project=project, args=args)
result.assert_success()
@@ -67,7 +67,7 @@ def test_source_checkout_force(datafiles, cli, force_flag):
os.makedirs(os.path.join(checkout, 'some-thing'))
# Path(os.path.join(checkout, 'some-file')).touch()
- result = cli.run(project=project, args=['source-checkout', force_flag, target, '--deps', 'none', checkout])
+ result = cli.run(project=project, args=['source', 'checkout', force_flag, target, '--deps', 'none', checkout])
result.assert_success()
assert os.path.exists(os.path.join(checkout, 'checkout-deps', 'etc', 'buildstream', 'config'))
@@ -79,7 +79,7 @@ def test_source_checkout_tar(datafiles, cli):
checkout = os.path.join(cli.directory, 'source-checkout.tar')
target = 'checkout-deps.bst'
- result = cli.run(project=project, args=['source-checkout', '--tar', target, '--deps', 'none', checkout])
+ result = cli.run(project=project, args=['source', 'checkout', '--tar', target, '--deps', 'none', checkout])
result.assert_success()
assert os.path.exists(checkout)
@@ -97,7 +97,7 @@ def test_source_checkout_deps(datafiles, cli, deps):
checkout = os.path.join(cli.directory, 'source-checkout')
target = 'checkout-deps.bst'
- result = cli.run(project=project, args=['source-checkout', target, '--deps', deps, checkout])
+ result = cli.run(project=project, args=['source', 'checkout', target, '--deps', deps, checkout])
result.assert_success()
# Sources of the target
@@ -125,7 +125,7 @@ def test_source_checkout_except(datafiles, cli):
checkout = os.path.join(cli.directory, 'source-checkout')
target = 'checkout-deps.bst'
- result = cli.run(project=project, args=['source-checkout', target,
+ result = cli.run(project=project, args=['source', 'checkout', target,
'--deps', 'all',
'--except', 'import-bin.bst',
checkout])
@@ -159,7 +159,7 @@ def test_source_checkout_fetch(datafiles, cli, fetch):
# cached already
assert cli.get_element_state(project, target) == 'fetch needed'
- args = ['source-checkout']
+ args = ['source', 'checkout']
if fetch:
args += ['--fetch']
args += [target, checkout]
@@ -179,7 +179,7 @@ def test_source_checkout_build_scripts(cli, tmpdir, datafiles):
normal_name = 'source-bundle-source-bundle-hello'
checkout = os.path.join(str(tmpdir), 'source-checkout')
- args = ['source-checkout', '--include-build-scripts', element_name, checkout]
+ args = ['source', 'checkout', '--include-build-scripts', element_name, checkout]
result = cli.run(project=project_path, args=args)
result.assert_success()
@@ -196,7 +196,7 @@ def test_source_checkout_tar_buildscripts(cli, tmpdir, datafiles):
normal_name = 'source-bundle-source-bundle-hello'
tar_file = os.path.join(str(tmpdir), 'source-checkout.tar')
- args = ['source-checkout', '--include-build-scripts', '--tar', element_name, tar_file]
+ args = ['source', 'checkout', '--include-build-scripts', '--tar', element_name, tar_file]
result = cli.run(project=project_path, args=args)
result.assert_success()
diff --git a/tests/frontend/track.py b/tests/frontend/track.py
index c7921fe4c..82e8ec4ce 100644
--- a/tests/frontend/track.py
+++ b/tests/frontend/track.py
@@ -52,14 +52,14 @@ def test_track(cli, tmpdir, datafiles, ref_storage, kind):
assert cli.get_element_state(project, element_name) == 'no reference'
# Now first try to track it
- result = cli.run(project=project, args=['track', element_name])
+ result = cli.run(project=project, args=['source', 'track', element_name])
result.assert_success()
# And now fetch it: The Source has probably already cached the
# latest ref locally, but it is not required to have cached
# the associated content of the latest ref at track time, that
# is the job of fetch.
- result = cli.run(project=project, args=['fetch', element_name])
+ result = cli.run(project=project, args=['source', 'fetch', element_name])
result.assert_success()
# Assert that we are now buildable because the source is
@@ -99,7 +99,7 @@ def test_track_recurse(cli, tmpdir, datafiles, kind):
# Now first try to track it
result = cli.run(project=project, args=[
- 'track', '--deps', 'all',
+ 'source', 'track', '--deps', 'all',
element_target_name])
result.assert_success()
@@ -108,7 +108,7 @@ def test_track_recurse(cli, tmpdir, datafiles, kind):
# the associated content of the latest ref at track time, that
# is the job of fetch.
result = cli.run(project=project, args=[
- 'fetch', '--deps', 'all',
+ 'source', 'fetch', '--deps', 'all',
element_target_name])
result.assert_success()
@@ -142,13 +142,13 @@ def test_track_single(cli, tmpdir, datafiles):
# Now first try to track only one element
result = cli.run(project=project, args=[
- 'track', '--deps', 'none',
+ 'source', 'track', '--deps', 'none',
element_target_name])
result.assert_success()
# And now fetch it
result = cli.run(project=project, args=[
- 'fetch', '--deps', 'none',
+ 'source', 'fetch', '--deps', 'none',
element_target_name])
result.assert_success()
@@ -183,7 +183,7 @@ def test_track_recurse_except(cli, tmpdir, datafiles, kind):
# Now first try to track it
result = cli.run(project=project, args=[
- 'track', '--deps', 'all', '--except', element_dep_name,
+ 'source', 'track', '--deps', 'all', '--except', element_dep_name,
element_target_name])
result.assert_success()
@@ -192,7 +192,7 @@ def test_track_recurse_except(cli, tmpdir, datafiles, kind):
# the associated content of the latest ref at track time, that
# is the job of fetch.
result = cli.run(project=project, args=[
- 'fetch', '--deps', 'none',
+ 'source', 'fetch', '--deps', 'none',
element_target_name])
result.assert_success()
@@ -231,9 +231,9 @@ def test_track_optional(cli, tmpdir, datafiles, ref_storage):
#
# We want to track and persist the ref separately in this test
#
- result = cli.run(project=project, args=['--option', 'test', 'False', 'track', 'target.bst'])
+ result = cli.run(project=project, args=['--option', 'test', 'False', 'source', 'track', 'target.bst'])
result.assert_success()
- result = cli.run(project=project, args=['--option', 'test', 'True', 'track', 'target.bst'])
+ result = cli.run(project=project, args=['--option', 'test', 'True', 'source', 'track', 'target.bst'])
result.assert_success()
# Now fetch the key for both options
@@ -309,7 +309,7 @@ def test_track_cross_junction(cli, tmpdir, datafiles, cross_junction, ref_storag
assert get_subproject_element_state() == 'no reference'
# Track recursively across the junction
- args = ['track', '--deps', 'all']
+ args = ['source', 'track', '--deps', 'all']
if cross_junction == 'cross':
args += ['--cross-junctions']
args += ['target.bst']
@@ -350,7 +350,7 @@ def test_track_consistency_error(cli, tmpdir, datafiles):
project = os.path.join(datafiles.dirname, datafiles.basename)
# Track the element causing a consistency error
- result = cli.run(project=project, args=['track', 'error.bst'])
+ result = cli.run(project=project, args=['source', 'track', 'error.bst'])
result.assert_main_error(ErrorDomain.STREAM, None)
result.assert_task_error(ErrorDomain.SOURCE, 'the-consistency-error')
@@ -360,7 +360,7 @@ def test_track_consistency_bug(cli, tmpdir, datafiles):
project = os.path.join(datafiles.dirname, datafiles.basename)
# Track the element causing an unhandled exception
- result = cli.run(project=project, args=['track', 'bug.bst'])
+ result = cli.run(project=project, args=['source', 'track', 'bug.bst'])
# We expect BuildStream to fail gracefully, with no recorded exception.
result.assert_main_error(ErrorDomain.STREAM, None)
@@ -396,7 +396,7 @@ def test_inconsistent_junction(cli, tmpdir, datafiles, ref_storage):
# Now try to track it, this will bail with the appropriate error
# informing the user to track the junction first
- result = cli.run(project=project, args=['track', 'junction-dep.bst'])
+ result = cli.run(project=project, args=['source', 'track', 'junction-dep.bst'])
result.assert_main_error(ErrorDomain.LOAD, LoadErrorReason.SUBPROJECT_INCONSISTENT)
@@ -433,7 +433,7 @@ def test_junction_element(cli, tmpdir, datafiles, ref_storage):
result.assert_main_error(ErrorDomain.LOAD, LoadErrorReason.SUBPROJECT_INCONSISTENT)
# Now track the junction itself
- result = cli.run(project=project, args=['track', 'junction.bst'])
+ result = cli.run(project=project, args=['source', 'track', 'junction.bst'])
result.assert_success()
# Now assert element state (via bst show under the hood) of the dep again
@@ -464,13 +464,13 @@ def test_cross_junction(cli, tmpdir, datafiles, ref_storage, kind):
subproject_path, junction_path, store_ref=False)
# Track the junction itself first.
- result = cli.run(project=project, args=['track', 'junction.bst'])
+ result = cli.run(project=project, args=['source', 'track', 'junction.bst'])
result.assert_success()
assert cli.get_element_state(project, 'junction.bst:import-etc-repo.bst') == 'no reference'
# Track the cross junction element. -J is not given, it is implied.
- result = cli.run(project=project, args=['track', 'junction.bst:import-etc-repo.bst'])
+ result = cli.run(project=project, args=['source', 'track', 'junction.bst:import-etc-repo.bst'])
if ref_storage == 'inline':
# This is not allowed to track cross junction without project.refs.
@@ -520,14 +520,14 @@ def test_track_include(cli, tmpdir, datafiles, ref_storage, kind):
assert cli.get_element_state(project, element_name) == 'no reference'
# Now first try to track it
- result = cli.run(project=project, args=['track', element_name])
+ result = cli.run(project=project, args=['source', 'track', element_name])
result.assert_success()
# And now fetch it: The Source has probably already cached the
# latest ref locally, but it is not required to have cached
# the associated content of the latest ref at track time, that
# is the job of fetch.
- result = cli.run(project=project, args=['fetch', element_name])
+ result = cli.run(project=project, args=['source', 'fetch', element_name])
result.assert_success()
# Assert that we are now buildable because the source is
@@ -585,14 +585,14 @@ def test_track_include_junction(cli, tmpdir, datafiles, ref_storage, kind):
generate_junction(str(tmpdir.join('junction_repo')),
subproject_path, junction_path, store_ref=True)
- result = cli.run(project=project, args=['track', 'junction.bst'])
+ result = cli.run(project=project, args=['source', 'track', 'junction.bst'])
result.assert_success()
# Assert that a fetch is needed
assert cli.get_element_state(project, element_name) == 'no reference'
# Now first try to track it
- result = cli.run(project=project, args=['track', element_name])
+ result = cli.run(project=project, args=['source', 'track', element_name])
# Assert there was a project.refs created, depending on the configuration
if ref_storage == 'inline':
@@ -607,7 +607,7 @@ def test_track_include_junction(cli, tmpdir, datafiles, ref_storage, kind):
# latest ref locally, but it is not required to have cached
# the associated content of the latest ref at track time, that
# is the job of fetch.
- result = cli.run(project=project, args=['fetch', element_name])
+ result = cli.run(project=project, args=['source', 'fetch', element_name])
result.assert_success()
# Assert that we are now buildable because the source is
@@ -633,7 +633,7 @@ def test_track_junction_included(cli, tmpdir, datafiles, ref_storage, kind):
generate_junction(str(tmpdir.join('junction_repo')),
subproject_path, junction_path, store_ref=False)
- result = cli.run(project=project, args=['track', 'junction.bst'])
+ result = cli.run(project=project, args=['source', 'track', 'junction.bst'])
result.assert_success()
@@ -663,7 +663,7 @@ def test_track_error_cannot_write_file(cli, tmpdir, datafiles, kind):
read_mask = stat.S_IWUSR | stat.S_IWGRP | stat.S_IWOTH
os.chmod(element_path, stat.S_IMODE(st.st_mode) & ~read_mask)
- result = cli.run(project=project, args=['track', element_name])
+ result = cli.run(project=project, args=['source', 'track', element_name])
result.assert_main_error(ErrorDomain.STREAM, None)
result.assert_task_error(ErrorDomain.SOURCE, 'save-ref-error')
finally:
diff --git a/tests/frontend/track_cross_junction.py b/tests/frontend/track_cross_junction.py
index 423edbdef..4bbf2db18 100644
--- a/tests/frontend/track_cross_junction.py
+++ b/tests/frontend/track_cross_junction.py
@@ -100,7 +100,7 @@ def test_cross_junction_multiple_projects(cli, tmpdir, datafiles, kind):
generate_junction(tmpdir.join('repo_b'), project_b_path, junction_b_path, store_ref=False)
# Track the junctions.
- result = cli.run(project=project, args=['track', junction_a, junction_b])
+ result = cli.run(project=project, args=['source', 'track', junction_a, junction_b])
result.assert_success()
# Import elements from a and b in to main.
@@ -111,7 +111,10 @@ def test_cross_junction_multiple_projects(cli, tmpdir, datafiles, kind):
all_bst = generate_simple_stack(project, 'all', [imported_a, imported_b, element_c])
# Track without following junctions. But explicitly also track the elements in project a.
- result = cli.run(project=project, args=['track', '--deps', 'all', all_bst, '{}:{}'.format(junction_a, stack_a)])
+ result = cli.run(project=project, args=['source', 'track',
+ '--deps', 'all',
+ all_bst,
+ '{}:{}'.format(junction_a, stack_a)])
result.assert_success()
# Elements in project b should not be tracked. But elements in project a and main should.
@@ -137,14 +140,14 @@ def test_track_exceptions(cli, tmpdir, datafiles, kind):
junction_a_path = os.path.join(project, 'elements', junction_a)
generate_junction(tmpdir.join('repo_a'), project_a_path, junction_a_path, store_ref=False)
- result = cli.run(project=project, args=['track', junction_a])
+ result = cli.run(project=project, args=['source', 'track', junction_a])
result.assert_success()
imported_b = generate_cross_element(project, project_a, element_b)
indirection = generate_simple_stack(project, 'indirection', [imported_b])
result = cli.run(project=project,
- args=['track', '--deps', 'all',
+ args=['source', 'track', '--deps', 'all',
'--except', indirection,
'{}:{}'.format(junction_a, all_bst), imported_b])
result.assert_success()
diff --git a/tests/frontend/workspace.py b/tests/frontend/workspace.py
index c95eabccd..00c0bd835 100644
--- a/tests/frontend/workspace.py
+++ b/tests/frontend/workspace.py
@@ -1078,7 +1078,7 @@ def test_external_fetch(cli, datafiles, tmpdir_factory, subdir, guess_element):
else:
call_dir = workspace
- result = cli.run(project=project, args=['-C', call_dir, 'fetch'] + arg_elm)
+ result = cli.run(project=project, args=['-C', call_dir, 'source', 'fetch'] + arg_elm)
result.assert_success()
# We already fetched it by opening the workspace, but we're also checking
@@ -1122,7 +1122,7 @@ def test_external_track(cli, datafiles, tmpdir_factory, guess_element):
# The workspace is necessarily already tracked, so we only care that
# there's no weird errors.
- result = cli.run(project=project, args=['-C', workspace, 'track'] + arg_elm)
+ result = cli.run(project=project, args=['-C', workspace, 'source', 'track'] + arg_elm)
result.assert_success()
diff --git a/tests/frontend/yamlcache.py b/tests/frontend/yamlcache.py
index b6788a07e..20388593e 100644
--- a/tests/frontend/yamlcache.py
+++ b/tests/frontend/yamlcache.py
@@ -82,7 +82,7 @@ def test_yamlcache_used(cli, tmpdir, ref_storage, with_junction, move_project):
# Generate the project
project = generate_project(str(tmpdir), ref_storage, with_junction)
if with_junction == 'junction':
- result = cli.run(project=project, args=['fetch', '--track', 'junction.bst'])
+ result = cli.run(project=project, args=['source', 'fetch', '--track', 'junction.bst'])
result.assert_success()
# bst show to put it in the cache
@@ -118,7 +118,7 @@ def test_yamlcache_changed_file(cli, tmpdir, ref_storage, with_junction):
# Generate the project
project = generate_project(str(tmpdir), ref_storage, with_junction)
if with_junction == 'junction':
- result = cli.run(project=project, args=['fetch', '--track', 'junction.bst'])
+ result = cli.run(project=project, args=['source', 'fetch', '--track', 'junction.bst'])
result.assert_success()
# bst show to put it in the cache