Javier Jardón pushed to branch jjardon/fedora_29 at BuildStream / buildstream
Commits:
-
9b6c18e4
by Chandan Singh at 2019-02-12T10:20:52Z
-
126bc006
by Chandan Singh at 2019-02-12T10:23:44Z
-
dbce3434
by Chandan Singh at 2019-02-12T12:19:57Z
-
24d29a17
by Javier Jardón at 2019-02-12T12:27:42Z
-
80dcf65d
by Javier Jardón at 2019-02-12T12:27:42Z
-
58b84905
by Javier Jardón at 2019-02-12T12:27:42Z
25 changed files:
- .gitlab-ci.yml
- buildstream/_frontend/cli.py
- buildstream/_frontend/widget.py
- man/bst-artifact-checkout.1
- man/bst-artifact-log.1
- man/bst-artifact-pull.1
- man/bst-artifact-push.1
- man/bst-artifact-server.1
- man/bst-artifact.1
- man/bst-build.1
- man/bst-help.1
- man/bst-init.1
- man/bst-shell.1
- man/bst-show.1
- man/bst-source-checkout.1
- man/bst-source-fetch.1
- man/bst-source-track.1
- man/bst-source.1
- man/bst-workspace-close.1
- man/bst-workspace-list.1
- man/bst-workspace-open.1
- man/bst-workspace-reset.1
- man/bst-workspace.1
- man/bst.1
- tests/frontend/show.py
Changes:
... | ... | @@ -53,26 +53,20 @@ tests-fedora-28: |
53 | 53 |
image: registry.gitlab.com/buildstream/buildstream-docker-images/testsuite-fedora:28-master-46405991
|
54 | 54 |
<<: *tests
|
55 | 55 |
|
56 |
-tests-ubuntu-18.04:
|
|
57 |
- image: registry.gitlab.com/buildstream/buildstream-docker-images/testsuite-ubuntu:18.04-master-46405991
|
|
56 |
+tests-fedora-29:
|
|
57 |
+ image: registry.gitlab.com/buildstream/buildstream-docker-images/testsuite-fedora:29-master-47052095
|
|
58 | 58 |
<<: *tests
|
59 | 59 |
|
60 |
-tests-python-3.7-stretch:
|
|
61 |
- image: registry.gitlab.com/buildstream/buildstream-docker-images/testsuite-python:3.7-stretch-master-46405991
|
|
60 |
+tests-ubuntu-18.04:
|
|
61 |
+ image: registry.gitlab.com/buildstream/buildstream-docker-images/testsuite-ubuntu:18.04-master-46405991
|
|
62 | 62 |
<<: *tests
|
63 | 63 |
|
64 |
- variables:
|
|
65 |
- # Note that we explicitly specify TOXENV in this case because this
|
|
66 |
- # image has both 3.6 and 3.7 versions. python3.6 cannot be removed because
|
|
67 |
- # some of our base dependencies declare it as their runtime dependency.
|
|
68 |
- TOXENV: py37
|
|
69 |
- |
|
70 | 64 |
tests-centos-7.6:
|
71 | 65 |
<<: *tests
|
72 | 66 |
image: registry.gitlab.com/buildstream/buildstream-docker-images/testsuite-centos:7.6.1810-master-46405991
|
73 | 67 |
|
74 |
-overnight-fedora-28-aarch64:
|
|
75 |
- image: registry.gitlab.com/buildstream/buildstream-docker-images/testsuite-fedora:aarch64-28-master-46405991
|
|
68 |
+overnight-fedora-29-aarch64:
|
|
69 |
+ image: registry.gitlab.com/buildstream/buildstream-docker-images/testsuite-fedora:aarch64-29-master-47052095
|
|
76 | 70 |
tags:
|
77 | 71 |
- aarch64
|
78 | 72 |
<<: *tests
|
... | ... | @@ -91,7 +85,7 @@ overnight-fedora-28-aarch64: |
91 | 85 |
tests-unix:
|
92 | 86 |
# Use fedora here, to a) run a test on fedora and b) ensure that we
|
93 | 87 |
# can get rid of ostree - this is not possible with debian-8
|
94 |
- image: registry.gitlab.com/buildstream/buildstream-docker-images/testsuite-fedora:28-master-46405991
|
|
88 |
+ image: registry.gitlab.com/buildstream/buildstream-docker-images/testsuite-fedora:29-master-47052095
|
|
95 | 89 |
<<: *tests
|
96 | 90 |
variables:
|
97 | 91 |
BST_FORCE_BACKEND: "unix"
|
... | ... | @@ -109,7 +103,7 @@ tests-unix: |
109 | 103 |
|
110 | 104 |
tests-fedora-missing-deps:
|
111 | 105 |
# Ensure that tests behave nicely while missing bwrap and ostree
|
112 |
- image: registry.gitlab.com/buildstream/buildstream-docker-images/testsuite-fedora:28-master-46405991
|
|
106 |
+ image: registry.gitlab.com/buildstream/buildstream-docker-images/testsuite-fedora:29-master-47052095
|
|
113 | 107 |
<<: *tests
|
114 | 108 |
|
115 | 109 |
script:
|
... | ... | @@ -128,7 +122,7 @@ tests-fedora-update-deps: |
128 | 122 |
# Check if the tests pass after updating requirements to their latest
|
129 | 123 |
# allowed version.
|
130 | 124 |
allow_failure: true
|
131 |
- image: registry.gitlab.com/buildstream/buildstream-docker-images/testsuite-fedora:28-master-46405991
|
|
125 |
+ image: registry.gitlab.com/buildstream/buildstream-docker-images/testsuite-fedora:29-master-47052095
|
|
132 | 126 |
<<: *tests
|
133 | 127 |
|
134 | 128 |
script:
|
... | ... | @@ -289,6 +283,7 @@ coverage: |
289 | 283 |
dependencies:
|
290 | 284 |
- tests-debian-9
|
291 | 285 |
- tests-fedora-28
|
286 |
+ - tests-fedora-29
|
|
292 | 287 |
- tests-fedora-missing-deps
|
293 | 288 |
- tests-ubuntu-18.04
|
294 | 289 |
- tests-unix
|
... | ... | @@ -440,6 +440,9 @@ def show(app, elements, deps, except_, order, format_): |
440 | 440 |
%{public} Public domain data
|
441 | 441 |
%{workspaced} If the element is workspaced
|
442 | 442 |
%{workspace-dirs} A list of workspace directories
|
443 |
+ %{deps} A list of all dependencies
|
|
444 |
+ %{build-deps} A list of build dependencies
|
|
445 |
+ %{runtime-deps} A list of runtime dependencies
|
|
443 | 446 |
|
444 | 447 |
The value of the %{symbol} without the leading '%' character is understood
|
445 | 448 |
as a pythonic formatting string, so python formatting features apply,
|
... | ... | @@ -27,7 +27,7 @@ from ruamel import yaml |
27 | 27 |
import click
|
28 | 28 |
|
29 | 29 |
from . import Profile
|
30 |
-from .. import Element, Consistency
|
|
30 |
+from .. import Element, Consistency, Scope
|
|
31 | 31 |
from .. import _yaml
|
32 | 32 |
from .. import __version__ as bst_version
|
33 | 33 |
from .._exceptions import ImplError
|
... | ... | @@ -435,6 +435,27 @@ class LogLine(Widget): |
435 | 435 |
line = p.fmt_subst(
|
436 | 436 |
line, 'workspace-dirs', '')
|
437 | 437 |
|
438 |
+ # Dependencies
|
|
439 |
+ if "%{deps" in format_:
|
|
440 |
+ deps = [e.name for e in element.dependencies(Scope.ALL, recurse=False)]
|
|
441 |
+ line = p.fmt_subst(
|
|
442 |
+ line, 'deps',
|
|
443 |
+ yaml.safe_dump(deps, default_style=None).rstrip('\n'))
|
|
444 |
+ |
|
445 |
+ # Build Dependencies
|
|
446 |
+ if "%{build-deps" in format_:
|
|
447 |
+ build_deps = [e.name for e in element.dependencies(Scope.BUILD, recurse=False)]
|
|
448 |
+ line = p.fmt_subst(
|
|
449 |
+ line, 'build-deps',
|
|
450 |
+ yaml.safe_dump(build_deps, default_style=False).rstrip('\n'))
|
|
451 |
+ |
|
452 |
+ # Runtime Dependencies
|
|
453 |
+ if "%{runtime-deps" in format_:
|
|
454 |
+ runtime_deps = [e.name for e in element.dependencies(Scope.RUN, recurse=False)]
|
|
455 |
+ line = p.fmt_subst(
|
|
456 |
+ line, 'runtime-deps',
|
|
457 |
+ yaml.safe_dump(runtime_deps, default_style=False).rstrip('\n'))
|
|
458 |
+ |
|
438 | 459 |
report += line + '\n'
|
439 | 460 |
|
440 | 461 |
return report.rstrip('\n')
|
1 |
-.TH "BST ARTIFACT CHECKOUT" "1" "24-Jan-2019" "" "bst artifact checkout Manual"
|
|
1 |
+.TH "BST ARTIFACT CHECKOUT" "1" "12-Feb-2019" "" "bst artifact checkout Manual"
|
|
2 | 2 |
.SH NAME
|
3 | 3 |
bst\-artifact\-checkout \- Checkout contents of an artifact
|
4 | 4 |
.SH SYNOPSIS
|
1 |
-.TH "BST ARTIFACT LOG" "1" "24-Jan-2019" "" "bst artifact log Manual"
|
|
1 |
+.TH "BST ARTIFACT LOG" "1" "12-Feb-2019" "" "bst artifact log Manual"
|
|
2 | 2 |
.SH NAME
|
3 | 3 |
bst\-artifact\-log \- Show logs of an artifact
|
4 | 4 |
.SH SYNOPSIS
|
1 |
-.TH "BST ARTIFACT PULL" "1" "24-Jan-2019" "" "bst artifact pull Manual"
|
|
1 |
+.TH "BST ARTIFACT PULL" "1" "12-Feb-2019" "" "bst artifact pull Manual"
|
|
2 | 2 |
.SH NAME
|
3 | 3 |
bst\-artifact\-pull \- Pull a built artifact
|
4 | 4 |
.SH SYNOPSIS
|
1 |
-.TH "BST ARTIFACT PUSH" "1" "24-Jan-2019" "" "bst artifact push Manual"
|
|
1 |
+.TH "BST ARTIFACT PUSH" "1" "12-Feb-2019" "" "bst artifact push Manual"
|
|
2 | 2 |
.SH NAME
|
3 | 3 |
bst\-artifact\-push \- Push a built artifact
|
4 | 4 |
.SH SYNOPSIS
|
1 |
-.TH "BST-ARTIFACT-SERVER" "1" "24-Jan-2019" "" "bst-artifact-server Manual"
|
|
1 |
+.TH "BST-ARTIFACT-SERVER" "1" "12-Feb-2019" "" "bst-artifact-server Manual"
|
|
2 | 2 |
.SH NAME
|
3 | 3 |
bst-artifact-server \- CAS Artifact Server
|
4 | 4 |
.SH SYNOPSIS
|
1 |
-.TH "BST ARTIFACT" "1" "24-Jan-2019" "" "bst artifact Manual"
|
|
1 |
+.TH "BST ARTIFACT" "1" "12-Feb-2019" "" "bst artifact Manual"
|
|
2 | 2 |
.SH NAME
|
3 | 3 |
bst\-artifact \- Manipulate cached artifacts
|
4 | 4 |
.SH SYNOPSIS
|
1 |
-.TH "BST BUILD" "1" "24-Jan-2019" "" "bst build Manual"
|
|
1 |
+.TH "BST BUILD" "1" "12-Feb-2019" "" "bst build Manual"
|
|
2 | 2 |
.SH NAME
|
3 | 3 |
bst\-build \- Build elements in a pipeline
|
4 | 4 |
.SH SYNOPSIS
|
... | ... | @@ -32,3 +32,6 @@ Allow tracking to cross junction boundaries |
32 | 32 |
.TP
|
33 | 33 |
\fB\-\-track\-save\fP
|
34 | 34 |
Deprecated: This is ignored
|
35 |
+.TP
|
|
36 |
+\fB\-r,\fP \-\-remote TEXT
|
|
37 |
+The URL of the remote cache (defaults to the first configured cache)
|
1 |
-.TH "BST HELP" "1" "24-Jan-2019" "" "bst help Manual"
|
|
1 |
+.TH "BST HELP" "1" "12-Feb-2019" "" "bst help Manual"
|
|
2 | 2 |
.SH NAME
|
3 | 3 |
bst\-help \- Print usage information
|
4 | 4 |
.SH SYNOPSIS
|
1 |
-.TH "BST INIT" "1" "24-Jan-2019" "" "bst init Manual"
|
|
1 |
+.TH "BST INIT" "1" "12-Feb-2019" "" "bst init Manual"
|
|
2 | 2 |
.SH NAME
|
3 | 3 |
bst\-init \- Initialize a new BuildStream project
|
4 | 4 |
.SH SYNOPSIS
|
1 |
-.TH "BST SHELL" "1" "24-Jan-2019" "" "bst shell Manual"
|
|
1 |
+.TH "BST SHELL" "1" "12-Feb-2019" "" "bst shell Manual"
|
|
2 | 2 |
.SH NAME
|
3 | 3 |
bst\-shell \- Shell into an element's sandbox environment
|
4 | 4 |
.SH SYNOPSIS
|
1 |
-.TH "BST SHOW" "1" "24-Jan-2019" "" "bst show Manual"
|
|
1 |
+.TH "BST SHOW" "1" "12-Feb-2019" "" "bst show Manual"
|
|
2 | 2 |
.SH NAME
|
3 | 3 |
bst\-show \- Show elements in the pipeline
|
4 | 4 |
.SH SYNOPSIS
|
... | ... | @@ -43,6 +43,9 @@ the following symbols can be used in the format string: |
43 | 43 |
%{public} Public domain data
|
44 | 44 |
%{workspaced} If the element is workspaced
|
45 | 45 |
%{workspace-dirs} A list of workspace directories
|
46 |
+ %{deps} A list of all dependencies
|
|
47 |
+ %{build-deps} A list of build dependencies
|
|
48 |
+ %{runtime-deps} A list of runtime dependencies
|
|
46 | 49 |
.PP
|
47 | 50 |
The value of the %{symbol} without the leading '%' character is understood
|
48 | 51 |
as a pythonic formatting string, so python formatting features apply,
|
1 |
-.TH "BST SOURCE CHECKOUT" "1" "24-Jan-2019" "" "bst source checkout Manual"
|
|
1 |
+.TH "BST SOURCE CHECKOUT" "1" "12-Feb-2019" "" "bst source checkout Manual"
|
|
2 | 2 |
.SH NAME
|
3 | 3 |
bst\-source\-checkout \- Checkout sources for an element
|
4 | 4 |
.SH SYNOPSIS
|
1 |
-.TH "BST SOURCE FETCH" "1" "24-Jan-2019" "" "bst source fetch Manual"
|
|
1 |
+.TH "BST SOURCE FETCH" "1" "12-Feb-2019" "" "bst source fetch Manual"
|
|
2 | 2 |
.SH NAME
|
3 | 3 |
bst\-source\-fetch \- Fetch sources in a pipeline
|
4 | 4 |
.SH SYNOPSIS
|
1 |
-.TH "BST SOURCE TRACK" "1" "24-Jan-2019" "" "bst source track Manual"
|
|
1 |
+.TH "BST SOURCE TRACK" "1" "12-Feb-2019" "" "bst source track Manual"
|
|
2 | 2 |
.SH NAME
|
3 | 3 |
bst\-source\-track \- Track new source references
|
4 | 4 |
.SH SYNOPSIS
|
1 |
-.TH "BST SOURCE" "1" "24-Jan-2019" "" "bst source Manual"
|
|
1 |
+.TH "BST SOURCE" "1" "12-Feb-2019" "" "bst source Manual"
|
|
2 | 2 |
.SH NAME
|
3 | 3 |
bst\-source \- Manipulate sources for an element
|
4 | 4 |
.SH SYNOPSIS
|
1 |
-.TH "BST WORKSPACE CLOSE" "1" "24-Jan-2019" "" "bst workspace close Manual"
|
|
1 |
+.TH "BST WORKSPACE CLOSE" "1" "12-Feb-2019" "" "bst workspace close Manual"
|
|
2 | 2 |
.SH NAME
|
3 | 3 |
bst\-workspace\-close \- Close workspaces
|
4 | 4 |
.SH SYNOPSIS
|
1 |
-.TH "BST WORKSPACE LIST" "1" "24-Jan-2019" "" "bst workspace list Manual"
|
|
1 |
+.TH "BST WORKSPACE LIST" "1" "12-Feb-2019" "" "bst workspace list Manual"
|
|
2 | 2 |
.SH NAME
|
3 | 3 |
bst\-workspace\-list \- List open workspaces
|
4 | 4 |
.SH SYNOPSIS
|
1 |
-.TH "BST WORKSPACE OPEN" "1" "24-Jan-2019" "" "bst workspace open Manual"
|
|
1 |
+.TH "BST WORKSPACE OPEN" "1" "12-Feb-2019" "" "bst workspace open Manual"
|
|
2 | 2 |
.SH NAME
|
3 | 3 |
bst\-workspace\-open \- Open a new workspace
|
4 | 4 |
.SH SYNOPSIS
|
1 |
-.TH "BST WORKSPACE RESET" "1" "24-Jan-2019" "" "bst workspace reset Manual"
|
|
1 |
+.TH "BST WORKSPACE RESET" "1" "12-Feb-2019" "" "bst workspace reset Manual"
|
|
2 | 2 |
.SH NAME
|
3 | 3 |
bst\-workspace\-reset \- Reset a workspace to its original state
|
4 | 4 |
.SH SYNOPSIS
|
1 |
-.TH "BST WORKSPACE" "1" "24-Jan-2019" "" "bst workspace Manual"
|
|
1 |
+.TH "BST WORKSPACE" "1" "12-Feb-2019" "" "bst workspace Manual"
|
|
2 | 2 |
.SH NAME
|
3 | 3 |
bst\-workspace \- Manipulate developer workspaces
|
4 | 4 |
.SH SYNOPSIS
|
1 |
-.TH "BST" "1" "24-Jan-2019" "" "bst Manual"
|
|
1 |
+.TH "BST" "1" "12-Feb-2019" "" "bst Manual"
|
|
2 | 2 |
.SH NAME
|
3 | 3 |
bst \- Build and manipulate BuildStream projects...
|
4 | 4 |
.SH SYNOPSIS
|
... | ... | @@ -400,3 +400,28 @@ def test_exceed_max_recursion_depth(cli, tmpdir, dependency_depth): |
400 | 400 |
assert result.exit_code == -1
|
401 | 401 |
|
402 | 402 |
shutil.rmtree(project_path)
|
403 |
+ |
|
404 |
+ |
|
405 |
+###############################################################
|
|
406 |
+# Testing format symbols #
|
|
407 |
+###############################################################
|
|
408 |
+@pytest.mark.datafiles(os.path.join(DATA_DIR, 'project'))
|
|
409 |
+@pytest.mark.parametrize("dep_kind, expected_deps", [
|
|
410 |
+ ('%{deps}', '[import-dev.bst, import-bin.bst]'),
|
|
411 |
+ ('%{build-deps}', '[import-dev.bst]'),
|
|
412 |
+ ('%{runtime-deps}', '[import-bin.bst]')
|
|
413 |
+])
|
|
414 |
+def test_format_deps(cli, datafiles, dep_kind, expected_deps):
|
|
415 |
+ project = os.path.join(datafiles.dirname, datafiles.basename)
|
|
416 |
+ target = 'checkout-deps.bst'
|
|
417 |
+ result = cli.run(project=project, silent=True, args=[
|
|
418 |
+ 'show',
|
|
419 |
+ '--deps', 'none',
|
|
420 |
+ '--format', '%{name}: ' + dep_kind,
|
|
421 |
+ target])
|
|
422 |
+ result.assert_success()
|
|
423 |
+ |
|
424 |
+ expected = '{name}: {deps}'.format(name=target, deps=expected_deps)
|
|
425 |
+ if result.output.strip() != expected:
|
|
426 |
+ raise AssertionError("Expected output:\n{}\nInstead received output:\n{}"
|
|
427 |
+ .format(expected, result.output))
|