summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Ennis <james.ennis@codethink.com>2019-01-22 15:08:17 +0000
committerJames Ennis <james.ennis@codethink.com>2019-01-22 15:08:17 +0000
commit9c2a6b9324d662f490f841443759e92fa2755674 (patch)
tree58133bc7dd8c95f0177e91750656a1b511e93362
parent638ceb8a081b76ab072f10ad876e528d95b95e42 (diff)
parentea2fbe4d69b7d3b214175620271a148510b75a19 (diff)
downloadbuildstream-9c2a6b9324d662f490f841443759e92fa2755674.tar.gz
Merge branch 'jennis/migrate_pull_push_commands' into 'master'
Move push/pull/checkout to the artifact subcommand group See merge request BuildStream/buildstream!1045
-rw-r--r--NEWS10
-rw-r--r--buildstream/_artifactcache.py2
-rw-r--r--buildstream/_frontend/cli.py335
-rw-r--r--buildstream/element.py4
-rw-r--r--buildstream/source.py2
-rwxr-xr-xcontrib/bst-docker-import2
-rw-r--r--doc/source/arch_remote_execution.rst2
-rw-r--r--doc/source/tutorial/first-project.rst2
-rw-r--r--doc/source/using_commands.rst85
-rw-r--r--doc/source/using_configuring_artifact_server.rst2
-rw-r--r--man/bst-artifact-checkout.127
-rw-r--r--man/bst-artifact-log.18
-rw-r--r--man/bst-artifact-pull.125
-rw-r--r--man/bst-artifact-push.128
-rw-r--r--man/bst-artifact-receive.119
-rw-r--r--man/bst-artifact-server.110
-rw-r--r--man/bst-artifact.125
-rw-r--r--man/bst-build.12
-rw-r--r--man/bst-checkout.19
-rw-r--r--man/bst-fetch.116
-rw-r--r--man/bst-help.12
-rw-r--r--man/bst-init.14
-rw-r--r--man/bst-pull.114
-rw-r--r--man/bst-push.113
-rw-r--r--man/bst-shell.115
-rw-r--r--man/bst-show.12
-rw-r--r--man/bst-source-bundle.125
-rw-r--r--man/bst-source-checkout.119
-rw-r--r--man/bst-source-fetch.133
-rw-r--r--man/bst-source-track.128
-rw-r--r--man/bst-source.121
-rw-r--r--man/bst-track.114
-rw-r--r--man/bst-workspace-close.12
-rw-r--r--man/bst-workspace-list.14
-rw-r--r--man/bst-workspace-open.12
-rw-r--r--man/bst-workspace-reset.12
-rw-r--r--man/bst-workspace.12
-rw-r--r--man/bst.154
-rw-r--r--tests/artifactcache/config.py2
-rw-r--r--tests/artifactcache/expiry.py5
-rw-r--r--tests/artifactcache/junctions.py4
-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.py29
-rw-r--r--tests/frontend/compose_splits.py2
-rw-r--r--tests/frontend/help.py3
-rw-r--r--tests/frontend/mirror.py4
-rw-r--r--tests/frontend/pull.py12
-rw-r--r--tests/frontend/push.py16
-rw-r--r--tests/frontend/workspace.py10
-rw-r--r--tests/integration/autotools.py4
-rw-r--r--tests/integration/build-tree.py5
-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/pullbuildtrees.py34
-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/sandboxes/remote-exec-config.py4
-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
82 files changed, 732 insertions, 485 deletions
diff --git a/NEWS b/NEWS
index 7ee63f952..2e13f1480 100644
--- a/NEWS
+++ b/NEWS
@@ -2,6 +2,16 @@
buildstream 1.3.1
=================
+ o BREAKING CHANGE: The top level commands `checkout`, `push` and `pull` have
+ been moved to the `bst artifact` subcommand group and are now obsolete.
+ For example, you must now use `bst artifact pull hello.bst`.
+
+ The behaviour of `checkout` has changed. The previously mandatory LOCATION
+ argument should now be specified with the `--directory` option. In addition
+ to this, `--tar` is no longer a flag, it is a mutually incompatible option
+ to `--directory`. For example, `bst artifact checkout foo.bst --tar foo.tar.gz`.
+
+
o Added `bst artifact log` subcommand for viewing build logs.
o BREAKING CHANGE: The bst source-bundle command has been removed. The
diff --git a/buildstream/_artifactcache.py b/buildstream/_artifactcache.py
index 16bde737b..9ccbebade 100644
--- a/buildstream/_artifactcache.py
+++ b/buildstream/_artifactcache.py
@@ -126,7 +126,7 @@ class ArtifactCache():
self._remotes_setup = True
# Initialize remote artifact caches. We allow the commandline to override
- # the user config in some cases (for example `bst push --remote=...`).
+ # the user config in some cases (for example `bst artifact push --remote=...`).
has_remote_caches = False
if remote_url:
self._set_remotes([ArtifactCacheSpec(remote_url, push=True)])
diff --git a/buildstream/_frontend/cli.py b/buildstream/_frontend/cli.py
index a0a01364d..e8f3ed557 100644
--- a/buildstream/_frontend/cli.py
+++ b/buildstream/_frontend/cli.py
@@ -369,78 +369,6 @@ def build(app, elements, all_, track_, track_save, track_all, track_except, trac
##################################################################
-# Pull Command #
-##################################################################
-@cli.command(short_help="Pull a built artifact")
-@click.option('--deps', '-d', default='none',
- type=click.Choice(['none', 'all']),
- help='The dependency artifacts to pull (default: none)')
-@click.option('--remote', '-r',
- help="The URL of the remote cache (defaults to the first configured cache)")
-@click.argument('elements', nargs=-1,
- type=click.Path(readable=False))
-@click.pass_obj
-def pull(app, elements, deps, remote):
- """Pull a built artifact from the configured remote artifact cache.
-
- By default the artifact will be pulled one of the configured caches
- if possible, following the usual priority order. If the `--remote` flag
- is given, only the specified cache will be queried.
-
- Specify `--deps` to control which artifacts to pull:
-
- \b
- none: No dependencies, just the element itself
- all: All dependencies
- """
-
- with app.initialized(session_name="Pull"):
- if not elements:
- guessed_target = app.context.guess_element()
- if guessed_target:
- elements = (guessed_target,)
-
- app.stream.pull(elements, selection=deps, remote=remote)
-
-
-##################################################################
-# Push Command #
-##################################################################
-@cli.command(short_help="Push a built artifact")
-@click.option('--deps', '-d', default='none',
- type=click.Choice(['none', 'all']),
- help='The dependencies to push (default: none)')
-@click.option('--remote', '-r', default=None,
- help="The URL of the remote cache (defaults to the first configured cache)")
-@click.argument('elements', nargs=-1,
- type=click.Path(readable=False))
-@click.pass_obj
-def push(app, elements, deps, remote):
- """Push a built artifact to a remote artifact cache.
-
- The default destination is the highest priority configured cache. You can
- override this by passing a different cache URL with the `--remote` flag.
-
- If bst has been configured to include build trees on artifact pulls,
- an attempt will be made to pull any required build trees to avoid the
- skipping of partial artifacts being pushed.
-
- Specify `--deps` to control which artifacts to push:
-
- \b
- none: No dependencies, just the element itself
- all: All dependencies
- """
- with app.initialized(session_name="Push"):
- if not elements:
- guessed_target = app.context.guess_element()
- if guessed_target:
- elements = (guessed_target,)
-
- app.stream.push(elements, selection=deps, remote=remote)
-
-
-##################################################################
# Show Command #
##################################################################
@cli.command(short_help="Show elements in the pipeline")
@@ -626,67 +554,6 @@ def shell(app, element, sysroot, mount, isolate, build_, cli_buildtree, command)
##################################################################
-# Checkout Command #
-##################################################################
-@cli.command(short_help="Checkout a built artifact")
-@click.option('--force', '-f', default=False, is_flag=True,
- help="Allow files to be overwritten")
-@click.option('--deps', '-d', default='run',
- type=click.Choice(['run', 'build', 'none']),
- help='The dependencies to checkout (default: run)')
-@click.option('--integrate/--no-integrate', default=True, is_flag=True,
- help="Whether to run integration commands")
-@click.option('--hardlinks', default=False, is_flag=True,
- help="Checkout hardlinks instead of copies (handle with care)")
-@click.option('--tar', default=False, is_flag=True,
- help="Create a tarball from the artifact contents instead "
- "of a file tree. If LOCATION is '-', the tarball "
- "will be dumped to the standard output.")
-@click.argument('element', required=False,
- type=click.Path(readable=False))
-@click.argument('location', type=click.Path(), required=False)
-@click.pass_obj
-def checkout(app, element, location, force, deps, integrate, hardlinks, tar):
- """Checkout a built artifact to the specified location
- """
- from ..element import Scope
-
- if not element and not location:
- click.echo("ERROR: LOCATION is not specified", err=True)
- sys.exit(-1)
-
- if element and not location:
- # Nasty hack to get around click's optional args
- location = element
- element = None
-
- if hardlinks and tar:
- click.echo("ERROR: options --hardlinks and --tar conflict", err=True)
- sys.exit(-1)
-
- if deps == "run":
- scope = Scope.RUN
- elif deps == "build":
- scope = Scope.BUILD
- elif deps == "none":
- scope = Scope.NONE
-
- with app.initialized():
- if not element:
- element = app.context.guess_element()
- if not element:
- raise AppError('Missing argument "ELEMENT".')
-
- app.stream.checkout(element,
- location=location,
- force=force,
- scope=scope,
- integrate=integrate,
- hardlinks=hardlinks,
- tar=tar)
-
-
-##################################################################
# Source Command #
##################################################################
@cli.group(short_help="Manipulate sources for an element")
@@ -1029,6 +896,147 @@ def artifact():
"""Manipulate cached artifacts"""
+#####################################################################
+# Artifact Checkout Command #
+#####################################################################
+@artifact.command(name='checkout', short_help="Checkout contents of an artifact")
+@click.option('--force', '-f', default=False, is_flag=True,
+ help="Allow files to be overwritten")
+@click.option('--deps', '-d', default=None,
+ type=click.Choice(['run', 'build', 'none']),
+ help='The dependencies to checkout (default: run)')
+@click.option('--integrate/--no-integrate', default=None, is_flag=True,
+ help="Whether to run integration commands")
+@click.option('--hardlinks', default=False, is_flag=True,
+ help="Checkout hardlinks instead of copying if possible")
+@click.option('--tar', default=None, metavar='LOCATION',
+ type=click.Path(),
+ help="Create a tarball from the artifact contents instead "
+ "of a file tree. If LOCATION is '-', the tarball "
+ "will be dumped to the standard output.")
+@click.option('--directory', default=None,
+ type=click.Path(file_okay=False),
+ help="The directory to checkout the artifact to")
+@click.argument('element', required=False,
+ type=click.Path(readable=False))
+@click.pass_obj
+def artifact_checkout(app, force, deps, integrate, hardlinks, tar, directory, element):
+ """Checkout contents of an artifact"""
+ from ..element import Scope
+
+ if hardlinks and tar is not None:
+ click.echo("ERROR: options --hardlinks and --tar conflict", err=True)
+ sys.exit(-1)
+
+ if tar is None and directory is None:
+ click.echo("ERROR: One of --directory or --tar must be provided", err=True)
+ sys.exit(-1)
+
+ if tar is not None and directory is not None:
+ click.echo("ERROR: options --directory and --tar conflict", err=True)
+ sys.exit(-1)
+
+ if tar is not None:
+ location = tar
+ tar = True
+ else:
+ location = os.getcwd() if directory is None else directory
+ tar = False
+
+ if deps == "build":
+ scope = Scope.BUILD
+ elif deps == "none":
+ scope = Scope.NONE
+ else:
+ scope = Scope.RUN
+
+ with app.initialized():
+ if not element:
+ element = app.context.guess_element()
+ if not element:
+ raise AppError('Missing argument "ELEMENT".')
+
+ app.stream.checkout(element,
+ location=location,
+ force=force,
+ scope=scope,
+ integrate=True if integrate is None else integrate,
+ hardlinks=hardlinks,
+ tar=tar)
+
+
+################################################################
+# Artifact Pull Command #
+################################################################
+@artifact.command(name="pull", short_help="Pull a built artifact")
+@click.option('--deps', '-d', default='none',
+ type=click.Choice(['none', 'all']),
+ help='The dependency artifacts to pull (default: none)')
+@click.option('--remote', '-r',
+ help="The URL of the remote cache (defaults to the first configured cache)")
+@click.argument('elements', nargs=-1,
+ type=click.Path(readable=False))
+@click.pass_obj
+def artifact_pull(app, elements, deps, remote):
+ """Pull a built artifact from the configured remote artifact cache.
+
+ By default the artifact will be pulled one of the configured caches
+ if possible, following the usual priority order. If the `--remote` flag
+ is given, only the specified cache will be queried.
+
+ Specify `--deps` to control which artifacts to pull:
+
+ \b
+ none: No dependencies, just the element itself
+ all: All dependencies
+ """
+
+ with app.initialized(session_name="Pull"):
+ if not elements:
+ guessed_target = app.context.guess_element()
+ if guessed_target:
+ elements = (guessed_target,)
+
+ app.stream.pull(elements, selection=deps, remote=remote)
+
+
+##################################################################
+# Artifact Push Command #
+##################################################################
+@artifact.command(name="push", short_help="Push a built artifact")
+@click.option('--deps', '-d', default='none',
+ type=click.Choice(['none', 'all']),
+ help='The dependencies to push (default: none)')
+@click.option('--remote', '-r', default=None,
+ help="The URL of the remote cache (defaults to the first configured cache)")
+@click.argument('elements', nargs=-1,
+ type=click.Path(readable=False))
+@click.pass_obj
+def artifact_push(app, elements, deps, remote):
+ """Push a built artifact to a remote artifact cache.
+
+ The default destination is the highest priority configured cache. You can
+ override this by passing a different cache URL with the `--remote` flag.
+
+ If bst has been configured to include build trees on artifact pulls,
+ an attempt will be made to pull any required build trees to avoid the
+ skipping of partial artifacts being pushed.
+
+ Specify `--deps` to control which artifacts to push:
+
+ \b
+ none: No dependencies, just the element itself
+ all: All dependencies
+ """
+ with app.initialized(session_name="Push"):
+ if not elements:
+ guessed_target = app.context.guess_element()
+ if guessed_target:
+ elements = (guessed_target,)
+
+ app.stream.push(elements, selection=deps, remote=remote)
+
+
################################################################
# Artifact Log Command #
################################################################
@@ -1135,3 +1143,64 @@ def fetch(app, elements, deps, track_, except_, track_cross_junctions):
def track(app, elements, deps, except_, cross_junctions):
click.echo("This command is now obsolete. Use `bst source track` instead.", err=True)
sys.exit(1)
+
+
+##################################################################
+# Checkout Command #
+##################################################################
+@cli.command(short_help="Checkout a built artifact", hidden=True)
+@click.option('--force', '-f', default=False, is_flag=True,
+ help="Allow files to be overwritten")
+@click.option('--deps', '-d', default='run',
+ type=click.Choice(['run', 'build', 'none']),
+ help='The dependencies to checkout (default: run)')
+@click.option('--integrate/--no-integrate', default=True, is_flag=True,
+ help="Whether to run integration commands")
+@click.option('--hardlinks', default=False, is_flag=True,
+ help="Checkout hardlinks instead of copies (handle with care)")
+@click.option('--tar', default=False, is_flag=True,
+ help="Create a tarball from the artifact contents instead "
+ "of a file tree. If LOCATION is '-', the tarball "
+ "will be dumped to the standard output.")
+@click.argument('element', required=False,
+ type=click.Path(readable=False))
+@click.argument('location', type=click.Path(), required=False)
+@click.pass_obj
+def checkout(app, element, location, force, deps, integrate, hardlinks, tar):
+ click.echo("This command is now obsolete. Use `bst artifact checkout` instead " +
+ "and use the --directory option to specify LOCATION", err=True)
+ sys.exit(1)
+
+
+################################################################
+# Pull Command #
+################################################################
+@cli.command(short_help="Pull a built artifact", hidden=True)
+@click.option('--deps', '-d', default='none',
+ type=click.Choice(['none', 'all']),
+ help='The dependency artifacts to pull (default: none)')
+@click.option('--remote', '-r',
+ help="The URL of the remote cache (defaults to the first configured cache)")
+@click.argument('elements', nargs=-1,
+ type=click.Path(readable=False))
+@click.pass_obj
+def pull(app, elements, deps, remote):
+ click.echo("This command is now obsolete. Use `bst artifact pull` instead.", err=True)
+ sys.exit(1)
+
+
+##################################################################
+# Push Command #
+##################################################################
+@cli.command(short_help="Push a built artifact", hidden=True)
+@click.option('--deps', '-d', default='none',
+ type=click.Choice(['none', 'all']),
+ help='The dependencies to push (default: none)')
+@click.option('--remote', '-r', default=None,
+ help="The URL of the remote cache (defaults to the first configured cache)")
+@click.argument('elements', nargs=-1,
+ type=click.Path(readable=False))
+@click.pass_obj
+def push(app, elements, deps, remote):
+ click.echo("This command is now obsolete. Use `bst artifact push` instead.", err=True)
+ sys.exit(1)
diff --git a/buildstream/element.py b/buildstream/element.py
index 89e3014c5..a243826ed 100644
--- a/buildstream/element.py
+++ b/buildstream/element.py
@@ -1334,11 +1334,11 @@ class Element(Plugin):
# _prepare_sandbox():
#
# This stages things for either _shell() (below) or also
- # is used to stage things by the `bst checkout` codepath
+ # is used to stage things by the `bst artifact checkout` codepath
#
@contextmanager
def _prepare_sandbox(self, scope, directory, shell=False, integrate=True, usebuildtree=False):
- # bst shell and bst checkout require a local sandbox.
+ # bst shell and bst artifact checkout require a local sandbox.
bare_directory = bool(directory)
with self.__sandbox(directory, config=self.__sandbox_config, allow_remote=False,
bare_directory=bare_directory) as sandbox:
diff --git a/buildstream/source.py b/buildstream/source.py
index f5cfeb1dd..9e9bad71c 100644
--- a/buildstream/source.py
+++ b/buildstream/source.py
@@ -396,7 +396,7 @@ class Source(Plugin):
If the backend in question supports resolving references from
a symbolic tracking branch or tag, then this should be implemented
- to perform this task on behalf of :ref:`bst track <invoking_track>`
+ to perform this task on behalf of :ref:`bst source track <invoking_source_track>`
commands.
This usually requires fetching new content from a remote origin
diff --git a/contrib/bst-docker-import b/contrib/bst-docker-import
index 2a853a077..3b6e326c0 100755
--- a/contrib/bst-docker-import
+++ b/contrib/bst-docker-import
@@ -90,7 +90,7 @@ element="$1"
checkout_tar="bst-checkout-$(basename "$element")-$RANDOM.tar"
echo "INFO: Checking out $element ..." >&2
-$bst_cmd checkout --tar "$element" "$checkout_tar" || die "Failed to checkout $element"
+$bst_cmd artifact checkout "$element" --tar "$checkout_tar" || die "Failed to checkout $element"
echo "INFO: Successfully checked out $element" >&2
echo "INFO: Importing Docker image ..." >&2
diff --git a/doc/source/arch_remote_execution.rst b/doc/source/arch_remote_execution.rst
index 4e66d7719..efefc84b5 100644
--- a/doc/source/arch_remote_execution.rst
+++ b/doc/source/arch_remote_execution.rst
@@ -25,7 +25,7 @@ After a successful build, BuildStream will push the completed artifact to the re
Use of sandboxes outside builds
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-Because staging requires *integration-commands* to be run, a sandbox is necessary for the *bst checkout* command to run.
+Because staging requires *integration-commands* to be run, a sandbox is necessary for the *bst artifact checkout* command to run.
A sandbox is also required for the *bst shell* command. Because the REAPI does not provide any mechanism for interactive use, *bst shell* will always use a local sandbox.
diff --git a/doc/source/tutorial/first-project.rst b/doc/source/tutorial/first-project.rst
index 18df85bb7..c83e74030 100644
--- a/doc/source/tutorial/first-project.rst
+++ b/doc/source/tutorial/first-project.rst
@@ -108,7 +108,7 @@ as ``buildable`` in the :ref:`bst build <invoking_build>` command above, has now
Observe the output
------------------
Now that we've finished building, we can checkout the output of the
-artifact we've created using :ref:`bst checkout <invoking_checkout>`
+artifact we've created using :ref:`bst artifact checkout <invoking_artifact_checkout>`
.. raw:: html
:file: ../sessions/first-project-checkout.html
diff --git a/doc/source/using_commands.rst b/doc/source/using_commands.rst
index 90d86dcbb..312b907f8 100644
--- a/doc/source/using_commands.rst
+++ b/doc/source/using_commands.rst
@@ -9,7 +9,8 @@ invoked on the command line, where, in most cases, this will be from the
project's main directory.
-----
+Top-level commands
+------------------
.. The bst options e.g. bst --version, or bst --verbose etc.
.. _invoking_bst:
@@ -21,6 +22,13 @@ project's main directory.
----
+.. _invoking_artifact:
+
+.. click:: buildstream._frontend.cli:artifact
+ :prog: bst artifact
+
+----
+
.. the `bst init` command
.. _invoking_init:
@@ -37,62 +45,89 @@ project's main directory.
----
-.. _invoking_fetch:
+.. _invoking_show:
-.. click:: buildstream._frontend.cli:fetch
- :prog: bst fetch
+.. click:: buildstream._frontend.cli:show
+ :prog: bst show
----
-.. _invoking_track:
+.. _invoking_shell:
-.. click:: buildstream._frontend.cli:track
- :prog: bst track
+.. click:: buildstream._frontend.cli:shell
+ :prog: bst shell
----
-.. _invoking_pull:
+.. _invoking_source:
-.. click:: buildstream._frontend.cli:pull
- :prog: bst pull
+.. click:: buildstream._frontend.cli:source
+ :prog: bst source
----
-.. _invoking_push:
+.. _invoking_workspace:
+
+.. click:: buildstream._frontend.cli:workspace
+ :prog: bst workspace
+
+
+Artifact subcommands
+--------------------
+
+.. _invoking_artifact_checkout:
-.. click:: buildstream._frontend.cli:push
- :prog: bst push
+.. click:: buildstream._frontend.cli:artifact_checkout
+ :prog: bst artifact checkout
----
-.. _invoking_show:
+.. _invoking_artifact_log:
-.. click:: buildstream._frontend.cli:show
- :prog: bst show
+.. click:: buildstream._frontend.cli:artifact_log
+ :prog: bst artifact log
----
-.. _invoking_shell:
+.. _invoking_artifact_pull:
-.. click:: buildstream._frontend.cli:shell
- :prog: bst shell
+.. click:: buildstream._frontend.cli:artifact_pull
+ :prog: bst artifact pull
----
-.. _invoking_checkout:
+.. _invoking_artifact_push:
+
+.. click:: buildstream._frontend.cli:artifact_push
+ :prog: bst artifact push
+
+
+Source subcommands
+------------------
-.. click:: buildstream._frontend.cli:checkout
- :prog: bst checkout
+.. _invoking_source_fetch:
+
+.. click:: buildstream._frontend.cli:source_fetch
+ :prog: bst source fetch
----
-.. _invoking_workspace:
+.. _invoking_source_track:
-.. click:: buildstream._frontend.cli:workspace
- :prog: bst workspace
+.. click:: buildstream._frontend.cli:source_track
+ :prog: bst source track
----
+.. _invoking_source_checkout:
+
+.. click:: buildstream._frontend.cli:source_checkout
+ :prog: bst source checkout
+
+
+Workspace subcommands
+---------------------
+
.. _invoking_workspace_open:
.. click:: buildstream._frontend.cli:workspace_open
diff --git a/doc/source/using_configuring_artifact_server.rst b/doc/source/using_configuring_artifact_server.rst
index bcf7d0e16..da61f0f80 100644
--- a/doc/source/using_configuring_artifact_server.rst
+++ b/doc/source/using_configuring_artifact_server.rst
@@ -40,7 +40,7 @@ them in a specific order:
When an artifact is built locally, BuildStream will try to push it to all the
caches which have the ``push: true`` flag set. You can also manually push
-artifacts to a specific cache using the :ref:`bst push command <invoking_push>`.
+artifacts to a specific cache using the :ref:`bst artifact push command <invoking_artifact_push>`.
Artifacts are identified using the element's :ref:`cache key <cachekeys>` so
the builds provided by a cache should be interchangable with those provided
diff --git a/man/bst-artifact-checkout.1 b/man/bst-artifact-checkout.1
new file mode 100644
index 000000000..9d1bf5534
--- /dev/null
+++ b/man/bst-artifact-checkout.1
@@ -0,0 +1,27 @@
+.TH "BST ARTIFACT CHECKOUT" "1" "22-Jan-2019" "" "bst artifact checkout Manual"
+.SH NAME
+bst\-artifact\-checkout \- Checkout contents of an artifact
+.SH SYNOPSIS
+.B bst artifact checkout
+[OPTIONS] [ELEMENT]
+.SH DESCRIPTION
+Checkout contents of an artifact
+.SH OPTIONS
+.TP
+\fB\-f,\fP \-\-force
+Allow files to be overwritten
+.TP
+\fB\-d,\fP \-\-deps [run|build|none]
+The dependencies to checkout (default: run)
+.TP
+\fB\-\-integrate\fP / \-\-no\-integrate
+Whether to run integration commands
+.TP
+\fB\-\-hardlinks\fP
+Checkout hardlinks instead of copying if possible
+.TP
+\fB\-\-tar\fP LOCATION
+Create a tarball from the artifact contents instead of a file tree. If LOCATION is '-', the tarball will be dumped to the standard output.
+.TP
+\fB\-\-directory\fP DIRECTORY
+The directory to checkout the artifact to \ No newline at end of file
diff --git a/man/bst-artifact-log.1 b/man/bst-artifact-log.1
new file mode 100644
index 000000000..d5911da9f
--- /dev/null
+++ b/man/bst-artifact-log.1
@@ -0,0 +1,8 @@
+.TH "BST ARTIFACT LOG" "1" "22-Jan-2019" "" "bst artifact log Manual"
+.SH NAME
+bst\-artifact\-log \- Show logs of an artifact
+.SH SYNOPSIS
+.B bst artifact log
+[OPTIONS] [ARTIFACTS]...
+.SH DESCRIPTION
+Show logs of all artifacts \ No newline at end of file
diff --git a/man/bst-artifact-pull.1 b/man/bst-artifact-pull.1
new file mode 100644
index 000000000..5ac21ad94
--- /dev/null
+++ b/man/bst-artifact-pull.1
@@ -0,0 +1,25 @@
+.TH "BST ARTIFACT PULL" "1" "22-Jan-2019" "" "bst artifact pull Manual"
+.SH NAME
+bst\-artifact\-pull \- Pull a built artifact
+.SH SYNOPSIS
+.B bst artifact pull
+[OPTIONS] [ELEMENTS]...
+.SH DESCRIPTION
+Pull a built artifact from the configured remote artifact cache.
+.PP
+By default the artifact will be pulled one of the configured caches
+if possible, following the usual priority order. If the `--remote` flag
+is given, only the specified cache will be queried.
+.PP
+Specify `--deps` to control which artifacts to pull:
+.PP
+
+ none: No dependencies, just the element itself
+ all: All dependencies
+.SH OPTIONS
+.TP
+\fB\-d,\fP \-\-deps [none|all]
+The dependency artifacts to pull (default: none)
+.TP
+\fB\-r,\fP \-\-remote TEXT
+The URL of the remote cache (defaults to the first configured cache) \ No newline at end of file
diff --git a/man/bst-artifact-push.1 b/man/bst-artifact-push.1
new file mode 100644
index 000000000..5ede66917
--- /dev/null
+++ b/man/bst-artifact-push.1
@@ -0,0 +1,28 @@
+.TH "BST ARTIFACT PUSH" "1" "22-Jan-2019" "" "bst artifact push Manual"
+.SH NAME
+bst\-artifact\-push \- Push a built artifact
+.SH SYNOPSIS
+.B bst artifact push
+[OPTIONS] [ELEMENTS]...
+.SH DESCRIPTION
+Push a built artifact to a remote artifact cache.
+.PP
+The default destination is the highest priority configured cache. You can
+override this by passing a different cache URL with the `--remote` flag.
+.PP
+If bst has been configured to include build trees on artifact pulls,
+an attempt will be made to pull any required build trees to avoid the
+skipping of partial artifacts being pushed.
+.PP
+Specify `--deps` to control which artifacts to push:
+.PP
+
+ none: No dependencies, just the element itself
+ all: All dependencies
+.SH OPTIONS
+.TP
+\fB\-d,\fP \-\-deps [none|all]
+The dependencies to push (default: none)
+.TP
+\fB\-r,\fP \-\-remote TEXT
+The URL of the remote cache (defaults to the first configured cache) \ No newline at end of file
diff --git a/man/bst-artifact-receive.1 b/man/bst-artifact-receive.1
deleted file mode 100644
index 2874ded5b..000000000
--- a/man/bst-artifact-receive.1
+++ /dev/null
@@ -1,19 +0,0 @@
-.TH "BST-ARTIFACT-RECEIVE" "1" "26-Apr-2018" "" "bst-artifact-receive Manual"
-.SH NAME
-bst-artifact-receive \- Receive pushed artifacts over ssh
-.SH SYNOPSIS
-.B bst-artifact-receive
-[OPTIONS] REPO
-.SH DESCRIPTION
-A BuildStream sister program for receiving artifacts send to a shared artifact cache
-
-.SH OPTIONS
-.TP
-\fB\-v,\fP \-\-verbose
-Verbose mode
-.TP
-\fB\-d,\fP \-\-debug
-Debug mode
-.TP
-\fB\-\-pull\-url\fP TEXT
-Clients who try to pull over SSH will be redirected here [required] \ No newline at end of file
diff --git a/man/bst-artifact-server.1 b/man/bst-artifact-server.1
index c488810ab..1cd8a6ef5 100644
--- a/man/bst-artifact-server.1
+++ b/man/bst-artifact-server.1
@@ -1,4 +1,4 @@
-.TH "BST-ARTIFACT-SERVER" "1" "29-Nov-2018" "" "bst-artifact-server Manual"
+.TH "BST-ARTIFACT-SERVER" "1" "22-Jan-2019" "" "bst-artifact-server Manual"
.SH NAME
bst-artifact-server \- CAS Artifact Server
.SH SYNOPSIS
@@ -19,4 +19,10 @@ Public server certificate for TLS (PEM-encoded)
Public client certificates for TLS (PEM-encoded)
.TP
\fB\-\-enable\-push\fP
-Allow clients to upload blobs and update artifact cache \ No newline at end of file
+Allow clients to upload blobs and update artifact cache
+.TP
+\fB\-\-head\-room\-min\fP INTEGER
+Disk head room minimum in bytes
+.TP
+\fB\-\-head\-room\-max\fP INTEGER
+Disk head room maximum in bytes \ No newline at end of file
diff --git a/man/bst-artifact.1 b/man/bst-artifact.1
new file mode 100644
index 000000000..b14798711
--- /dev/null
+++ b/man/bst-artifact.1
@@ -0,0 +1,25 @@
+.TH "BST ARTIFACT" "1" "22-Jan-2019" "" "bst artifact Manual"
+.SH NAME
+bst\-artifact \- Manipulate cached artifacts
+.SH SYNOPSIS
+.B bst artifact
+[OPTIONS] COMMAND [ARGS]...
+.SH DESCRIPTION
+Manipulate cached artifacts
+.SH COMMANDS
+.PP
+\fBcheckout\fP
+ Checkout contents of an artifact
+ See \fBbst artifact-checkout(1)\fP for full documentation on the \fBcheckout\fP command.
+.PP
+\fBpull\fP
+ Pull a built artifact
+ See \fBbst artifact-pull(1)\fP for full documentation on the \fBpull\fP command.
+.PP
+\fBpush\fP
+ Push a built artifact
+ See \fBbst artifact-push(1)\fP for full documentation on the \fBpush\fP command.
+.PP
+\fBlog\fP
+ Show logs of an artifact
+ See \fBbst artifact-log(1)\fP for full documentation on the \fBlog\fP command. \ No newline at end of file
diff --git a/man/bst-build.1 b/man/bst-build.1
index df7b508fd..ae024c5db 100644
--- a/man/bst-build.1
+++ b/man/bst-build.1
@@ -1,4 +1,4 @@
-.TH "BST BUILD" "1" "29-Nov-2018" "" "bst build Manual"
+.TH "BST BUILD" "1" "22-Jan-2019" "" "bst build Manual"
.SH NAME
bst\-build \- Build elements in a pipeline
.SH SYNOPSIS
diff --git a/man/bst-checkout.1 b/man/bst-checkout.1
index dbe7873f0..2482f94ef 100644
--- a/man/bst-checkout.1
+++ b/man/bst-checkout.1
@@ -1,18 +1,15 @@
-.TH "BST CHECKOUT" "1" "29-Nov-2018" "" "bst checkout Manual"
+.TH "BST CHECKOUT" "1" "22-Jan-2019" "" "bst checkout Manual"
.SH NAME
bst\-checkout \- Checkout a built artifact
.SH SYNOPSIS
.B bst checkout
-[OPTIONS] ELEMENT LOCATION
-.SH DESCRIPTION
-Checkout a built artifact to the specified location
-
+[OPTIONS] [ELEMENT] [LOCATION]
.SH OPTIONS
.TP
\fB\-f,\fP \-\-force
Allow files to be overwritten
.TP
-\fB\-d,\fP \-\-deps [run|none]
+\fB\-d,\fP \-\-deps [run|build|none]
The dependencies to checkout (default: run)
.TP
\fB\-\-integrate\fP / \-\-no\-integrate
diff --git a/man/bst-fetch.1 b/man/bst-fetch.1
index 968193777..12ebea8b0 100644
--- a/man/bst-fetch.1
+++ b/man/bst-fetch.1
@@ -1,23 +1,9 @@
-.TH "BST FETCH" "1" "29-Nov-2018" "" "bst fetch Manual"
+.TH "BST FETCH" "1" "22-Jan-2019" "" "bst fetch Manual"
.SH NAME
bst\-fetch \- Fetch sources in a pipeline
.SH SYNOPSIS
.B bst fetch
[OPTIONS] [ELEMENTS]...
-.SH DESCRIPTION
-Fetch sources required to build the pipeline
-.PP
-By default this will only try to fetch sources which are
-required for the build plan of the specified target element,
-omitting sources for any elements which are already built
-and available in the artifact cache.
-.PP
-Specify `--deps` to control which sources to fetch:
-.PP
-
- none: No dependencies, just the element itself
- plan: Only dependencies required for the build plan
- all: All dependencies
.SH OPTIONS
.TP
\fB\-\-except\fP PATH
diff --git a/man/bst-help.1 b/man/bst-help.1
index 2ee9805ac..43f26cb0d 100644
--- a/man/bst-help.1
+++ b/man/bst-help.1
@@ -1,4 +1,4 @@
-.TH "BST HELP" "1" "29-Nov-2018" "" "bst help Manual"
+.TH "BST HELP" "1" "22-Jan-2019" "" "bst help Manual"
.SH NAME
bst\-help \- Print usage information
.SH SYNOPSIS
diff --git a/man/bst-init.1 b/man/bst-init.1
index 15330aa6d..561dadea5 100644
--- a/man/bst-init.1
+++ b/man/bst-init.1
@@ -1,4 +1,4 @@
-.TH "BST INIT" "1" "29-Nov-2018" "" "bst init Manual"
+.TH "BST INIT" "1" "22-Jan-2019" "" "bst init Manual"
.SH NAME
bst\-init \- Initialize a new BuildStream project
.SH SYNOPSIS
@@ -18,7 +18,7 @@ interactive session.
The project name to use
.TP
\fB\-\-format\-version\fP INTEGER
-The required format version (default: 18)
+The required format version (default: 20)
.TP
\fB\-\-element\-path\fP PATH
The subdirectory to store elements in (default: elements)
diff --git a/man/bst-pull.1 b/man/bst-pull.1
index 73f892e73..2c4c72863 100644
--- a/man/bst-pull.1
+++ b/man/bst-pull.1
@@ -1,21 +1,9 @@
-.TH "BST PULL" "1" "29-Nov-2018" "" "bst pull Manual"
+.TH "BST PULL" "1" "22-Jan-2019" "" "bst pull Manual"
.SH NAME
bst\-pull \- Pull a built artifact
.SH SYNOPSIS
.B bst pull
[OPTIONS] [ELEMENTS]...
-.SH DESCRIPTION
-Pull a built artifact from the configured remote artifact cache.
-.PP
-By default the artifact will be pulled one of the configured caches
-if possible, following the usual priority order. If the `--remote` flag
-is given, only the specified cache will be queried.
-.PP
-Specify `--deps` to control which artifacts to pull:
-.PP
-
- none: No dependencies, just the element itself
- all: All dependencies
.SH OPTIONS
.TP
\fB\-d,\fP \-\-deps [none|all]
diff --git a/man/bst-push.1 b/man/bst-push.1
index 2b566ddd2..2aa5144e2 100644
--- a/man/bst-push.1
+++ b/man/bst-push.1
@@ -1,20 +1,9 @@
-.TH "BST PUSH" "1" "29-Nov-2018" "" "bst push Manual"
+.TH "BST PUSH" "1" "22-Jan-2019" "" "bst push Manual"
.SH NAME
bst\-push \- Push a built artifact
.SH SYNOPSIS
.B bst push
[OPTIONS] [ELEMENTS]...
-.SH DESCRIPTION
-Push a built artifact to a remote artifact cache.
-.PP
-The default destination is the highest priority configured cache. You can
-override this by passing a different cache URL with the `--remote` flag.
-.PP
-Specify `--deps` to control which artifacts to push:
-.PP
-
- none: No dependencies, just the element itself
- all: All dependencies
.SH OPTIONS
.TP
\fB\-d,\fP \-\-deps [none|all]
diff --git a/man/bst-shell.1 b/man/bst-shell.1
index 3cc02f973..5f806e453 100644
--- a/man/bst-shell.1
+++ b/man/bst-shell.1
@@ -1,9 +1,9 @@
-.TH "BST SHELL" "1" "29-Nov-2018" "" "bst shell Manual"
+.TH "BST SHELL" "1" "22-Jan-2019" "" "bst shell Manual"
.SH NAME
bst\-shell \- Shell into an element's sandbox environment
.SH SYNOPSIS
.B bst shell
-[OPTIONS] ELEMENT [COMMAND]...
+[OPTIONS] [ELEMENT] [COMMAND]...
.SH DESCRIPTION
Run a command in the target element's sandbox environment
.PP
@@ -11,6 +11,12 @@ This will stage a temporary sysroot for running the target
element, assuming it has already been built and all required
artifacts are in the local cache.
.PP
+Use '--' to separate a command from the options to bst,
+otherwise bst may respond to them instead. e.g.
+.PP
+
+ bst shell example.bst -- df -h
+.PP
Use the --build option to create a temporary sysroot for
building the element instead.
.PP
@@ -32,4 +38,7 @@ An existing sysroot
Mount a file or directory into the sandbox
.TP
\fB\-\-isolate\fP
-Create an isolated build sandbox \ No newline at end of file
+Create an isolated build sandbox
+.TP
+\fB\-t,\fP \-\-use\-buildtree [ask|try|always|never]
+Defaults to ask but if set to always the function will fail if a build tree is not available \ No newline at end of file
diff --git a/man/bst-show.1 b/man/bst-show.1
index 74344edc8..7804bc5f3 100644
--- a/man/bst-show.1
+++ b/man/bst-show.1
@@ -1,4 +1,4 @@
-.TH "BST SHOW" "1" "29-Nov-2018" "" "bst show Manual"
+.TH "BST SHOW" "1" "22-Jan-2019" "" "bst show Manual"
.SH NAME
bst\-show \- Show elements in the pipeline
.SH SYNOPSIS
diff --git a/man/bst-source-bundle.1 b/man/bst-source-bundle.1
deleted file mode 100644
index 3806c26e6..000000000
--- a/man/bst-source-bundle.1
+++ /dev/null
@@ -1,25 +0,0 @@
-.TH "BST SOURCE-BUNDLE" "1" "29-Nov-2018" "" "bst source-bundle Manual"
-.SH NAME
-bst\-source-bundle \- Produce a build bundle to be manually executed
-.SH SYNOPSIS
-.B bst source-bundle
-[OPTIONS] ELEMENT
-.SH DESCRIPTION
-Produce a source bundle to be manually executed
-
-.SH OPTIONS
-.TP
-\fB\-\-except\fP PATH
-Elements to except from the tarball
-.TP
-\fB\-\-compression\fP [none|gz|bz2|xz]
-Compress the tar file using the given algorithm.
-.TP
-\fB\-\-track\fP
-Track new source references before bundling
-.TP
-\fB\-f,\fP \-\-force
-Overwrite an existing tarball
-.TP
-\fB\-\-directory\fP TEXT
-The directory to write the tarball to \ No newline at end of file
diff --git a/man/bst-source-checkout.1 b/man/bst-source-checkout.1
index 115a77afb..7afbc9394 100644
--- a/man/bst-source-checkout.1
+++ b/man/bst-source-checkout.1
@@ -1,14 +1,17 @@
-.TH "BST SOURCE-CHECKOUT" "1" "29-Nov-2018" "" "bst source-checkout Manual"
+.TH "BST SOURCE CHECKOUT" "1" "22-Jan-2019" "" "bst source checkout Manual"
.SH NAME
-bst\-source-checkout \- Checkout sources for an element
+bst\-source\-checkout \- Checkout sources for an element
.SH SYNOPSIS
-.B bst source-checkout
-[OPTIONS] ELEMENT LOCATION
+.B bst source checkout
+[OPTIONS] [ELEMENT] [LOCATION]
.SH DESCRIPTION
Checkout sources of an element to the specified location
.SH OPTIONS
.TP
+\fB\-f,\fP \-\-force
+Allow files to be overwritten
+.TP
\fB\-\-except\fP PATH
Except certain dependencies
.TP
@@ -16,4 +19,10 @@ Except certain dependencies
The dependencies whose sources to checkout (default: none)
.TP
\fB\-\-fetch\fP
-Fetch elements if they are not fetched \ No newline at end of file
+Fetch elements if they are not fetched
+.TP
+\fB\-\-tar\fP
+Create a tarball from the element's sources instead of a file tree.
+.TP
+\fB\-\-include\-build\-scripts\fP
+.PP \ No newline at end of file
diff --git a/man/bst-source-fetch.1 b/man/bst-source-fetch.1
new file mode 100644
index 000000000..6168f5f92
--- /dev/null
+++ b/man/bst-source-fetch.1
@@ -0,0 +1,33 @@
+.TH "BST SOURCE FETCH" "1" "22-Jan-2019" "" "bst source fetch Manual"
+.SH NAME
+bst\-source\-fetch \- Fetch sources in a pipeline
+.SH SYNOPSIS
+.B bst source fetch
+[OPTIONS] [ELEMENTS]...
+.SH DESCRIPTION
+Fetch sources required to build the pipeline
+.PP
+By default this will only try to fetch sources which are
+required for the build plan of the specified target element,
+omitting sources for any elements which are already built
+and available in the artifact cache.
+.PP
+Specify `--deps` to control which sources to fetch:
+.PP
+
+ none: No dependencies, just the element itself
+ plan: Only dependencies required for the build plan
+ all: All dependencies
+.SH OPTIONS
+.TP
+\fB\-\-except\fP PATH
+Except certain dependencies from fetching
+.TP
+\fB\-d,\fP \-\-deps [none|plan|all]
+The dependencies to fetch (default: plan)
+.TP
+\fB\-\-track\fP
+Track new source references before fetching
+.TP
+\fB\-J,\fP \-\-track\-cross\-junctions
+Allow tracking to cross junction boundaries \ No newline at end of file
diff --git a/man/bst-source-track.1 b/man/bst-source-track.1
new file mode 100644
index 000000000..0fb3af3b5
--- /dev/null
+++ b/man/bst-source-track.1
@@ -0,0 +1,28 @@
+.TH "BST SOURCE TRACK" "1" "22-Jan-2019" "" "bst source track Manual"
+.SH NAME
+bst\-source\-track \- Track new source references
+.SH SYNOPSIS
+.B bst source track
+[OPTIONS] [ELEMENTS]...
+.SH DESCRIPTION
+Consults the specified tracking branches for new versions available
+to build and updates the project with any newly available references.
+.PP
+By default this will track just the specified element, but you can also
+update a whole tree of dependencies in one go.
+.PP
+Specify `--deps` to control which sources to track:
+.PP
+
+ none: No dependencies, just the specified elements
+ all: All dependencies of all specified elements
+.SH OPTIONS
+.TP
+\fB\-\-except\fP PATH
+Except certain dependencies from tracking
+.TP
+\fB\-d,\fP \-\-deps [none|all]
+The dependencies to track (default: none)
+.TP
+\fB\-J,\fP \-\-cross\-junctions
+Allow crossing junction boundaries \ No newline at end of file
diff --git a/man/bst-source.1 b/man/bst-source.1
new file mode 100644
index 000000000..09df7510e
--- /dev/null
+++ b/man/bst-source.1
@@ -0,0 +1,21 @@
+.TH "BST SOURCE" "1" "22-Jan-2019" "" "bst source Manual"
+.SH NAME
+bst\-source \- Manipulate sources for an element
+.SH SYNOPSIS
+.B bst source
+[OPTIONS] COMMAND [ARGS]...
+.SH DESCRIPTION
+Manipulate sources for an element
+.SH COMMANDS
+.PP
+\fBfetch\fP
+ Fetch sources in a pipeline
+ See \fBbst source-fetch(1)\fP for full documentation on the \fBfetch\fP command.
+.PP
+\fBtrack\fP
+ Track new source references
+ See \fBbst source-track(1)\fP for full documentation on the \fBtrack\fP command.
+.PP
+\fBcheckout\fP
+ Checkout sources for an element
+ See \fBbst source-checkout(1)\fP for full documentation on the \fBcheckout\fP command. \ No newline at end of file
diff --git a/man/bst-track.1 b/man/bst-track.1
index fd8530676..a57c0f11a 100644
--- a/man/bst-track.1
+++ b/man/bst-track.1
@@ -1,21 +1,9 @@
-.TH "BST TRACK" "1" "29-Nov-2018" "" "bst track Manual"
+.TH "BST TRACK" "1" "22-Jan-2019" "" "bst track Manual"
.SH NAME
bst\-track \- Track new source references
.SH SYNOPSIS
.B bst track
[OPTIONS] [ELEMENTS]...
-.SH DESCRIPTION
-Consults the specified tracking branches for new versions available
-to build and updates the project with any newly available references.
-.PP
-By default this will track just the specified element, but you can also
-update a whole tree of dependencies in one go.
-.PP
-Specify `--deps` to control which sources to track:
-.PP
-
- none: No dependencies, just the specified elements
- all: All dependencies of all specified elements
.SH OPTIONS
.TP
\fB\-\-except\fP PATH
diff --git a/man/bst-workspace-close.1 b/man/bst-workspace-close.1
index 0858f21a3..e8112e239 100644
--- a/man/bst-workspace-close.1
+++ b/man/bst-workspace-close.1
@@ -1,4 +1,4 @@
-.TH "BST WORKSPACE CLOSE" "1" "29-Nov-2018" "" "bst workspace close Manual"
+.TH "BST WORKSPACE CLOSE" "1" "22-Jan-2019" "" "bst workspace close Manual"
.SH NAME
bst\-workspace\-close \- Close workspaces
.SH SYNOPSIS
diff --git a/man/bst-workspace-list.1 b/man/bst-workspace-list.1
index c4fb5bf3f..aca6c71db 100644
--- a/man/bst-workspace-list.1
+++ b/man/bst-workspace-list.1
@@ -1,8 +1,8 @@
-.TH "BST WORKSPACE LIST" "1" "29-Nov-2018" "" "bst workspace list Manual"
+.TH "BST WORKSPACE LIST" "1" "22-Jan-2019" "" "bst workspace list Manual"
.SH NAME
bst\-workspace\-list \- List open workspaces
.SH SYNOPSIS
.B bst workspace list
[OPTIONS]
.SH DESCRIPTION
-List open workspaces
+List open workspaces \ No newline at end of file
diff --git a/man/bst-workspace-open.1 b/man/bst-workspace-open.1
index 319888426..3018443c6 100644
--- a/man/bst-workspace-open.1
+++ b/man/bst-workspace-open.1
@@ -1,4 +1,4 @@
-.TH "BST WORKSPACE OPEN" "1" "29-Nov-2018" "" "bst workspace open Manual"
+.TH "BST WORKSPACE OPEN" "1" "22-Jan-2019" "" "bst workspace open Manual"
.SH NAME
bst\-workspace\-open \- Open a new workspace
.SH SYNOPSIS
diff --git a/man/bst-workspace-reset.1 b/man/bst-workspace-reset.1
index 8f5ca0e4a..df374f5eb 100644
--- a/man/bst-workspace-reset.1
+++ b/man/bst-workspace-reset.1
@@ -1,4 +1,4 @@
-.TH "BST WORKSPACE RESET" "1" "29-Nov-2018" "" "bst workspace reset Manual"
+.TH "BST WORKSPACE RESET" "1" "22-Jan-2019" "" "bst workspace reset Manual"
.SH NAME
bst\-workspace\-reset \- Reset a workspace to its original state
.SH SYNOPSIS
diff --git a/man/bst-workspace.1 b/man/bst-workspace.1
index 2b4881cfc..896cb709b 100644
--- a/man/bst-workspace.1
+++ b/man/bst-workspace.1
@@ -1,4 +1,4 @@
-.TH "BST WORKSPACE" "1" "29-Nov-2018" "" "bst workspace Manual"
+.TH "BST WORKSPACE" "1" "22-Jan-2019" "" "bst workspace Manual"
.SH NAME
bst\-workspace \- Manipulate developer workspaces
.SH SYNOPSIS
diff --git a/man/bst.1 b/man/bst.1
index 61d0efdee..f6c84dee0 100644
--- a/man/bst.1
+++ b/man/bst.1
@@ -1,6 +1,6 @@
-.TH "BST" "1" "29-Nov-2018" "" "bst Manual"
+.TH "BST" "1" "22-Jan-2019" "" "bst Manual"
.SH NAME
-bst \- Build and manipulate BuildStream projects...
+bst \- None
.SH SYNOPSIS
.B bst
[OPTIONS] COMMAND [ARGS]...
@@ -81,6 +81,26 @@ Include an element's build tree when pulling remote element artifacts
Build elements in a pipeline
See \fBbst-build(1)\fP for full documentation on the \fBbuild\fP command.
.PP
+\fBshow\fP
+ Show elements in the pipeline
+ See \fBbst-show(1)\fP for full documentation on the \fBshow\fP command.
+.PP
+\fBshell\fP
+ Shell into an element's sandbox environment
+ See \fBbst-shell(1)\fP for full documentation on the \fBshell\fP command.
+.PP
+\fBsource\fP
+ Manipulate sources for an element
+ See \fBbst-source(1)\fP for full documentation on the \fBsource\fP command.
+.PP
+\fBworkspace\fP
+ Manipulate developer workspaces
+ See \fBbst-workspace(1)\fP for full documentation on the \fBworkspace\fP command.
+.PP
+\fBartifact\fP
+ Manipulate cached artifacts
+ See \fBbst-artifact(1)\fP for full documentation on the \fBartifact\fP command.
+.PP
\fBfetch\fP
Fetch sources in a pipeline
See \fBbst-fetch(1)\fP for full documentation on the \fBfetch\fP command.
@@ -89,34 +109,14 @@ Include an element's build tree when pulling remote element artifacts
Track new source references
See \fBbst-track(1)\fP for full documentation on the \fBtrack\fP command.
.PP
+\fBcheckout\fP
+ Checkout a built artifact
+ See \fBbst-checkout(1)\fP for full documentation on the \fBcheckout\fP command.
+.PP
\fBpull\fP
Pull a built artifact
See \fBbst-pull(1)\fP for full documentation on the \fBpull\fP command.
.PP
\fBpush\fP
Push a built artifact
- See \fBbst-push(1)\fP for full documentation on the \fBpush\fP command.
-.PP
-\fBshow\fP
- Show elements in the pipeline
- See \fBbst-show(1)\fP for full documentation on the \fBshow\fP command.
-.PP
-\fBshell\fP
- Shell into an element's sandbox environment
- See \fBbst-shell(1)\fP for full documentation on the \fBshell\fP command.
-.PP
-\fBcheckout\fP
- Checkout a built artifact
- See \fBbst-checkout(1)\fP for full documentation on the \fBcheckout\fP command.
-.PP
-\fBsource-checkout\fP
- Checkout sources for an element
- See \fBbst-source-checkout(1)\fP for full documentation on the \fBsource-checkout\fP command.
-.PP
-\fBworkspace\fP
- Manipulate developer workspaces
- See \fBbst-workspace(1)\fP for full documentation on the \fBworkspace\fP command.
-.PP
-\fBsource-bundle\fP
- Produce a build bundle to be manually executed
- See \fBbst-source-bundle(1)\fP for full documentation on the \fBsource-bundle\fP command. \ No newline at end of file
+ See \fBbst-push(1)\fP for full documentation on the \fBpush\fP command. \ No newline at end of file
diff --git a/tests/artifactcache/config.py b/tests/artifactcache/config.py
index 8c8c4b48c..fecb3dd2e 100644
--- a/tests/artifactcache/config.py
+++ b/tests/artifactcache/config.py
@@ -137,5 +137,5 @@ def test_missing_certs(cli, datafiles, config_key, config_value):
# Use `pull` here to ensure we try to initialize the remotes, triggering the error
#
# This does not happen for a simple `bst show`.
- result = cli.run(project=project, args=['pull', 'element.bst'])
+ result = cli.run(project=project, args=['artifact', 'pull', 'element.bst'])
result.assert_main_error(ErrorDomain.LOAD, LoadErrorReason.INVALID_DATA)
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/artifactcache/junctions.py b/tests/artifactcache/junctions.py
index 378d007a0..c6d6921c8 100644
--- a/tests/artifactcache/junctions.py
+++ b/tests/artifactcache/junctions.py
@@ -58,7 +58,7 @@ def test_push_pull(cli, tmpdir, datafiles):
project_set_artifacts(base_project, base_share.repo)
# Now try bst push
- result = cli.run(project=project, args=['push', '--deps', 'all', 'target.bst'])
+ result = cli.run(project=project, args=['artifact', 'push', '--deps', 'all', 'target.bst'])
assert result.exit_code == 0
# And finally assert that the artifacts are in the right shares
@@ -78,7 +78,7 @@ def test_push_pull(cli, tmpdir, datafiles):
assert state != 'cached'
# Now try bst pull
- result = cli.run(project=project, args=['pull', '--deps', 'all', 'target.bst'])
+ result = cli.run(project=project, args=['artifact', 'pull', '--deps', 'all', 'target.bst'])
assert result.exit_code == 0
# And assert that they are again in the local cache, without having built
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 0e4c6ad7e..8b549e3ba 100644
--- a/tests/frontend/completions.py
+++ b/tests/frontend/completions.py
@@ -11,11 +11,8 @@ DATA_DIR = os.path.join(
MAIN_COMMANDS = [
'artifact ',
'build ',
- 'checkout ',
'help ',
'init ',
- 'pull ',
- 'push ',
'shell ',
'show ',
'source ',
@@ -57,6 +54,13 @@ SOURCE_COMMANDS = [
'track ',
]
+ARTIFACT_COMMANDS = [
+ 'checkout ',
+ 'push ',
+ 'pull ',
+ 'log ',
+]
+
WORKSPACE_COMMANDS = [
'close ',
'list ',
@@ -82,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)
@@ -120,8 +124,7 @@ def assert_completion_failed(cli, cmd, word_idx, expected, cwd=None):
@pytest.mark.parametrize("cmd,word_idx,expected", [
('bst', 0, []),
('bst ', 1, MAIN_COMMANDS),
- ('bst pu', 1, ['pull ', 'push ']),
- ('bst pul', 1, ['pull ']),
+ ('bst artifact ', 2, ARTIFACT_COMMANDS),
('bst source ', 2, SOURCE_COMMANDS),
('bst w ', 1, ['workspace ']),
('bst workspace ', 2, WORKSPACE_COMMANDS),
@@ -221,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,
@@ -245,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),
@@ -275,10 +280,10 @@ def test_argument_element_invalid(datafiles, cli, project, cmd, word_idx, expect
@pytest.mark.parametrize("cmd,word_idx,expected", [
('bst he', 1, ['help ']),
('bst help ', 2, MAIN_COMMANDS),
+ ('bst help artifact ', 3, ARTIFACT_COMMANDS),
('bst help in', 2, ['init ']),
- ('bst help p', 2, ['pull ', 'push ']),
- ('bst help p', 2, ['pull ', 'push ']),
('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/help.py b/tests/frontend/help.py
index e3b406f56..331eb43c0 100644
--- a/tests/frontend/help.py
+++ b/tests/frontend/help.py
@@ -18,10 +18,9 @@ def test_help_main(cli):
@pytest.mark.parametrize("command", [
+ ('artifact'),
('build'),
('checkout'),
- ('pull'),
- ('push'),
('shell'),
('show'),
('source'),
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/pull.py b/tests/frontend/pull.py
index c883e2030..254b6d584 100644
--- a/tests/frontend/pull.py
+++ b/tests/frontend/pull.py
@@ -70,7 +70,7 @@ def test_push_pull_all(cli, tmpdir, datafiles):
assert cli.get_element_state(project, element_name) != 'cached'
# Now try bst pull
- result = cli.run(project=project, args=['pull', '--deps', 'all', 'target.bst'])
+ result = cli.run(project=project, args=['artifact', 'pull', '--deps', 'all', 'target.bst'])
result.assert_success()
# And assert that it's again in the local cache, without having built
@@ -111,7 +111,7 @@ def test_pull_secondary_cache(cli, tmpdir, datafiles):
assert cli.get_element_state(project, 'target.bst') != 'cached'
# Now try bst pull
- result = cli.run(project=project, args=['pull', 'target.bst'])
+ result = cli.run(project=project, args=['artifact', 'pull', 'target.bst'])
result.assert_success()
# And assert that it's again in the local cache, without having built,
@@ -146,7 +146,7 @@ def test_push_pull_specific_remote(cli, tmpdir, datafiles):
# Now try `bst push` to the good_share.
result = cli.run(project=project, args=[
- 'push', 'target.bst', '--remote', good_share.repo
+ 'artifact', 'push', 'target.bst', '--remote', good_share.repo
])
result.assert_success()
@@ -161,7 +161,7 @@ def test_push_pull_specific_remote(cli, tmpdir, datafiles):
artifacts = os.path.join(cli.directory, 'artifacts')
shutil.rmtree(artifacts)
- result = cli.run(project=project, args=['pull', 'target.bst', '--remote',
+ result = cli.run(project=project, args=['artifact', 'pull', 'target.bst', '--remote',
good_share.repo])
result.assert_success()
@@ -216,7 +216,7 @@ def test_push_pull_non_strict(cli, tmpdir, datafiles):
assert cli.get_element_state(project, 'target.bst') == 'waiting'
# Now try bst pull
- result = cli.run(project=project, args=['pull', '--deps', 'all', 'target.bst'])
+ result = cli.run(project=project, args=['artifact', 'pull', '--deps', 'all', 'target.bst'])
result.assert_success()
# And assert that the target is again in the local cache, without having built
@@ -291,7 +291,7 @@ def test_push_pull_cross_junction(cli, tmpdir, datafiles):
assert cli.get_element_state(project, 'junction.bst:import-etc.bst') == 'buildable'
# Now try bst pull
- result = cli.run(project=project, args=['pull', 'junction.bst:import-etc.bst'])
+ result = cli.run(project=project, args=['artifact', 'pull', 'junction.bst:import-etc.bst'])
result.assert_success()
# And assert that it's again in the local cache, without having built
diff --git a/tests/frontend/push.py b/tests/frontend/push.py
index 153d43340..6ed163a93 100644
--- a/tests/frontend/push.py
+++ b/tests/frontend/push.py
@@ -82,7 +82,7 @@ def test_push(cli, tmpdir, datafiles):
with create_artifact_share(os.path.join(str(tmpdir), 'artifactshare2')) as share2:
# Try pushing with no remotes configured. This should fail.
- result = cli.run(project=project, args=['push', 'target.bst'])
+ result = cli.run(project=project, args=['artifact', 'push', 'target.bst'])
result.assert_main_error(ErrorDomain.STREAM, None)
# Configure bst to pull but not push from a cache and run `bst push`.
@@ -90,7 +90,7 @@ def test_push(cli, tmpdir, datafiles):
cli.configure({
'artifacts': {'url': share1.repo, 'push': False},
})
- result = cli.run(project=project, args=['push', 'target.bst'])
+ result = cli.run(project=project, args=['artifact', 'push', 'target.bst'])
result.assert_main_error(ErrorDomain.STREAM, None)
# Configure bst to push to one of the caches and run `bst push`. This works.
@@ -100,7 +100,7 @@ def test_push(cli, tmpdir, datafiles):
{'url': share2.repo, 'push': True},
]
})
- result = cli.run(project=project, args=['push', 'target.bst'])
+ result = cli.run(project=project, args=['artifact', 'push', 'target.bst'])
assert_not_shared(cli, share1, project, 'target.bst')
assert_shared(cli, share2, project, 'target.bst')
@@ -114,7 +114,7 @@ def test_push(cli, tmpdir, datafiles):
{'url': share2.repo, 'push': True},
]
})
- result = cli.run(project=project, args=['push', 'target.bst'])
+ result = cli.run(project=project, args=['artifact', 'push', 'target.bst'])
assert_shared(cli, share1, project, 'target.bst')
assert_shared(cli, share2, project, 'target.bst')
@@ -156,7 +156,7 @@ def test_push_all(cli, tmpdir, datafiles):
# Now try bst push all the deps
result = cli.run(project=project, args=[
- 'push', 'target.bst',
+ 'artifact', 'push', 'target.bst',
'--deps', 'all'
])
result.assert_success()
@@ -346,7 +346,7 @@ def test_recently_pulled_artifact_does_not_expire(cli, datafiles, tmpdir):
assert cli.get_element_state(project, 'element1.bst') != 'cached'
# Pull the element1 from the remote cache (this should update its mtime)
- result = cli.run(project=project, args=['pull', 'element1.bst', '--remote',
+ result = cli.run(project=project, args=['artifact', 'pull', 'element1.bst', '--remote',
share.repo])
result.assert_success()
@@ -386,7 +386,7 @@ def test_push_cross_junction(cli, tmpdir, datafiles):
cli.configure({
'artifacts': {'url': share.repo, 'push': True},
})
- result = cli.run(project=project, args=['push', 'junction.bst:import-etc.bst'])
+ result = cli.run(project=project, args=['artifact', 'push', 'junction.bst:import-etc.bst'])
cache_key = cli.get_element_key(project, 'junction.bst:import-etc.bst')
assert share.has_artifact('subtest', 'import-etc.bst', cache_key)
@@ -407,7 +407,7 @@ def test_push_already_cached(caplog, cli, tmpdir, datafiles):
result.assert_success()
assert "SKIPPED Push" not in result.stderr
- result = cli.run(project=project, args=['push', 'target.bst'])
+ result = cli.run(project=project, args=['artifact', 'push', 'target.bst'])
result.assert_success()
assert not result.get_pushed_elements(), "No elements should have been pushed since the cache was populated"
diff --git a/tests/frontend/workspace.py b/tests/frontend/workspace.py
index 2995bf967..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()
@@ -1106,10 +1106,10 @@ def test_external_push_pull(cli, datafiles, tmpdir_factory, guess_element):
'artifacts': {'url': share.repo, 'push': True}
})
- result = cli.run(project=project, args=['-C', workspace, 'push'] + arg_elm)
+ result = cli.run(project=project, args=['-C', workspace, 'artifact', 'push'] + arg_elm)
result.assert_success()
- result = cli.run(project=project, args=['-C', workspace, 'pull', '--deps', 'all'] + arg_elm)
+ result = cli.run(project=project, args=['-C', workspace, 'artifact', 'pull', '--deps', 'all'] + arg_elm)
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/build-tree.py b/tests/integration/build-tree.py
index 8c0628da8..b50d84152 100644
--- a/tests/integration/build-tree.py
+++ b/tests/integration/build-tree.py
@@ -130,7 +130,8 @@ def test_buildtree_pulled(cli, tmpdir, datafiles):
assert cli.get_element_state(project, element_name) != 'cached'
# Pull from cache, ensuring cli options is set to pull the buildtree
- result = cli.run(project=project, args=['--pull-buildtrees', 'pull', '--deps', 'all', element_name])
+ result = cli.run(project=project,
+ args=['--pull-buildtrees', 'artifact', 'pull', '--deps', 'all', element_name])
result.assert_success()
# Check it's using the cached build tree
@@ -164,7 +165,7 @@ def test_buildtree_options(cli, tmpdir, datafiles):
assert cli.get_element_state(project, element_name) != 'cached'
# Pull from cache, but do not include buildtrees.
- result = cli.run(project=project, args=['pull', '--deps', 'all', element_name])
+ result = cli.run(project=project, args=['artifact', 'pull', '--deps', 'all', element_name])
result.assert_success()
# The above is the simplest way I know to create a local cache without any buildtrees.
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/pullbuildtrees.py b/tests/integration/pullbuildtrees.py
index 36ac52885..e7ee90eee 100644
--- a/tests/integration/pullbuildtrees.py
+++ b/tests/integration/pullbuildtrees.py
@@ -55,12 +55,12 @@ def test_pullbuildtrees(cli, tmpdir, datafiles):
# Pull artifact with default config, assert that pulling again
# doesn't create a pull job, then assert with buildtrees user
# config set creates a pull job.
- result = cli.run(project=project, args=['pull', element_name])
+ result = cli.run(project=project, args=['artifact', 'pull', element_name])
assert element_name in result.get_pulled_elements()
- result = cli.run(project=project, args=['pull', element_name])
+ result = cli.run(project=project, args=['artifact', 'pull', element_name])
assert element_name not in result.get_pulled_elements()
cli.configure({'cache': {'pull-buildtrees': True}})
- result = cli.run(project=project, args=['pull', element_name])
+ result = cli.run(project=project, args=['artifact', 'pull', element_name])
assert element_name in result.get_pulled_elements()
default_state(cli, tmpdir, share1)
@@ -68,13 +68,13 @@ def test_pullbuildtrees(cli, tmpdir, datafiles):
# with buildtrees cli flag set creates a pull job.
# Also assert that the buildtree is added to the artifact's
# extract dir
- result = cli.run(project=project, args=['pull', element_name])
+ result = cli.run(project=project, args=['artifact', 'pull', element_name])
assert element_name in result.get_pulled_elements()
elementdigest = share1.has_artifact('test', element_name, cli.get_element_key(project, element_name))
buildtreedir = os.path.join(str(tmpdir), 'artifacts', 'extract', 'test', 'autotools-amhello',
elementdigest.hash, 'buildtree')
assert not os.path.isdir(buildtreedir)
- result = cli.run(project=project, args=['--pull-buildtrees', 'pull', element_name])
+ result = cli.run(project=project, args=['--pull-buildtrees', 'artifact', 'pull', element_name])
assert element_name in result.get_pulled_elements()
assert os.path.isdir(buildtreedir)
default_state(cli, tmpdir, share1)
@@ -83,21 +83,21 @@ def test_pullbuildtrees(cli, tmpdir, datafiles):
# that pulling with the same user config doesn't creates a pull job,
# or when buildtrees cli flag is set.
cli.configure({'cache': {'pull-buildtrees': True}})
- result = cli.run(project=project, args=['pull', element_name])
+ result = cli.run(project=project, args=['artifact', 'pull', element_name])
assert element_name in result.get_pulled_elements()
- result = cli.run(project=project, args=['pull', element_name])
+ result = cli.run(project=project, args=['artifact', 'pull', element_name])
assert element_name not in result.get_pulled_elements()
- result = cli.run(project=project, args=['--pull-buildtrees', 'pull', element_name])
+ result = cli.run(project=project, args=['--pull-buildtrees', 'artifact', 'pull', element_name])
assert element_name not in result.get_pulled_elements()
default_state(cli, tmpdir, share1)
# Pull artifact with default config and buildtrees cli flag set, then assert
# that pulling with pullbuildtrees set in user config doesn't create a pull
# job.
- result = cli.run(project=project, args=['--pull-buildtrees', 'pull', element_name])
+ result = cli.run(project=project, args=['--pull-buildtrees', 'artifact', 'pull', element_name])
assert element_name in result.get_pulled_elements()
cli.configure({'cache': {'pull-buildtrees': True}})
- result = cli.run(project=project, args=['pull', element_name])
+ result = cli.run(project=project, args=['artifact', 'pull', element_name])
assert element_name not in result.get_pulled_elements()
default_state(cli, tmpdir, share1)
@@ -105,10 +105,10 @@ def test_pullbuildtrees(cli, tmpdir, datafiles):
# can't be pushed to an artifact share, then assert that a complete build element
# can be. This will attempt a partial pull from share1 and then a partial push
# to share2
- result = cli.run(project=project, args=['pull', element_name])
+ result = cli.run(project=project, args=['artifact', 'pull', element_name])
assert element_name in result.get_pulled_elements()
cli.configure({'artifacts': {'url': share2.repo, 'push': True}})
- result = cli.run(project=project, args=['push', element_name])
+ result = cli.run(project=project, args=['artifact', 'push', element_name])
assert element_name not in result.get_pushed_elements()
assert not share2.has_artifact('test', element_name, cli.get_element_key(project, element_name))
@@ -116,10 +116,10 @@ def test_pullbuildtrees(cli, tmpdir, datafiles):
# successfully pushed to the remote. This will attempt to pull the buildtree
# from share1 and then a 'complete' push to share2
cli.configure({'artifacts': {'url': share1.repo, 'push': False}})
- result = cli.run(project=project, args=['--pull-buildtrees', 'pull', element_name])
+ result = cli.run(project=project, args=['--pull-buildtrees', 'artifact', 'pull', element_name])
assert element_name in result.get_pulled_elements()
cli.configure({'artifacts': {'url': share2.repo, 'push': True}})
- result = cli.run(project=project, args=['push', element_name])
+ result = cli.run(project=project, args=['artifact', 'push', element_name])
assert element_name in result.get_pushed_elements()
assert share2.has_artifact('test', element_name, cli.get_element_key(project, element_name))
default_state(cli, tmpdir, share1)
@@ -128,10 +128,10 @@ def test_pullbuildtrees(cli, tmpdir, datafiles):
# if pull-buildtrees is set, however as share3 is the only defined remote and is empty,
# assert that no element artifact buildtrees are pulled (no available remote buildtree) and thus the
# artifact cannot be pushed.
- result = cli.run(project=project, args=['pull', element_name])
+ result = cli.run(project=project, args=['artifact', 'pull', element_name])
assert element_name in result.get_pulled_elements()
cli.configure({'artifacts': {'url': share3.repo, 'push': True}})
- result = cli.run(project=project, args=['--pull-buildtrees', 'push', element_name])
+ result = cli.run(project=project, args=['--pull-buildtrees', 'artifact', 'push', element_name])
assert "Attempting to fetch missing artifact buildtrees" in result.stderr
assert element_name not in result.get_pulled_elements()
assert not os.path.isdir(buildtreedir)
@@ -143,7 +143,7 @@ def test_pullbuildtrees(cli, tmpdir, datafiles):
# to the empty share3. This gives the ability to attempt push currently partial artifacts to a remote,
# without exlipictly requiring a bst pull.
cli.configure({'artifacts': [{'url': share1.repo, 'push': False}, {'url': share3.repo, 'push': True}]})
- result = cli.run(project=project, args=['--pull-buildtrees', 'push', element_name])
+ result = cli.run(project=project, args=['--pull-buildtrees', 'artifact', 'push', element_name])
assert "Attempting to fetch missing artifact buildtrees" in result.stderr
assert element_name in result.get_pulled_elements()
assert os.path.isdir(buildtreedir)
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/sandboxes/remote-exec-config.py b/tests/sandboxes/remote-exec-config.py
index 31cb072f2..9cf0a8f08 100644
--- a/tests/sandboxes/remote-exec-config.py
+++ b/tests/sandboxes/remote-exec-config.py
@@ -42,7 +42,7 @@ def test_old_and_new_configs(cli, datafiles):
# Use `pull` here to ensure we try to initialize the remotes, triggering the error
#
# This does not happen for a simple `bst show`.
- result = cli.run(project=project, args=['pull', 'element.bst'])
+ result = cli.run(project=project, args=['artifact', 'pull', 'element.bst'])
result.assert_main_error(ErrorDomain.LOAD, LoadErrorReason.INVALID_DATA, "specify one")
@@ -97,5 +97,5 @@ def test_empty_config(cli, datafiles):
# Use `pull` here to ensure we try to initialize the remotes, triggering the error
#
# This does not happen for a simple `bst show`.
- result = cli.run(project=project, args=['pull', 'element.bst'])
+ result = cli.run(project=project, args=['artifact', 'pull', 'element.bst'])
result.assert_main_error(ErrorDomain.LOAD, LoadErrorReason.INVALID_DATA, "specify one")
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')