summaryrefslogtreecommitdiff
path: root/tests/remoteexecution/buildtree.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/remoteexecution/buildtree.py')
-rw-r--r--tests/remoteexecution/buildtree.py46
1 files changed, 7 insertions, 39 deletions
diff --git a/tests/remoteexecution/buildtree.py b/tests/remoteexecution/buildtree.py
index 86efb29f1..7c763e1fb 100644
--- a/tests/remoteexecution/buildtree.py
+++ b/tests/remoteexecution/buildtree.py
@@ -21,9 +21,7 @@ import os
import shutil
import pytest
-from buildstream.testing import (
- cli_remote_execution as cli,
-) # pylint: disable=unused-import
+from buildstream.testing import cli_remote_execution as cli # pylint: disable=unused-import
from tests.testutils import create_artifact_share
@@ -44,16 +42,10 @@ def test_buildtree_remote(cli, tmpdir, datafiles):
with create_artifact_share(share_path) as share:
cli.configure(
- {
- "artifacts": {"url": share.repo, "push": True},
- "cache": {"pull-buildtrees": False},
- }
+ {"artifacts": {"url": share.repo, "push": True}, "cache": {"pull-buildtrees": False},}
)
- res = cli.run(
- project=project,
- args=["--cache-buildtrees", "always", "build", element_name],
- )
+ res = cli.run(project=project, args=["--cache-buildtrees", "always", "build", element_name],)
res.assert_success()
# remove local cache
@@ -61,45 +53,21 @@ def test_buildtree_remote(cli, tmpdir, datafiles):
shutil.rmtree(os.path.join(str(tmpdir), "cache", "artifacts"))
# pull without buildtree
- res = cli.run(
- project=project, args=["artifact", "pull", "--deps", "all", element_name]
- )
+ res = cli.run(project=project, args=["artifact", "pull", "--deps", "all", element_name])
res.assert_success()
# check shell doesn't work
- res = cli.run(
- project=project,
- args=["shell", "--build", element_name, "--", "cat", "test"],
- )
+ res = cli.run(project=project, args=["shell", "--build", element_name, "--", "cat", "test"],)
res.assert_shell_error()
# pull with buildtree
- res = cli.run(
- project=project,
- args=[
- "--pull-buildtrees",
- "artifact",
- "pull",
- "--deps",
- "all",
- element_name,
- ],
- )
+ res = cli.run(project=project, args=["--pull-buildtrees", "artifact", "pull", "--deps", "all", element_name,],)
res.assert_success()
# check it works this time
res = cli.run(
project=project,
- args=[
- "shell",
- "--build",
- element_name,
- "--use-buildtree",
- "always",
- "--",
- "cat",
- "test",
- ],
+ args=["shell", "--build", element_name, "--use-buildtree", "always", "--", "cat", "test",],
)
res.assert_success()
assert "Hi" in res.output