summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbst-marge-bot <marge-bot@buildstream.build>2019-10-07 16:37:26 +0000
committerbst-marge-bot <marge-bot@buildstream.build>2019-10-07 16:37:26 +0000
commitd67c70c7c01c56b47bb08b04b0dff931d8690a83 (patch)
tree675c0b4f4ce5b2d67b262f82e376e3aecf63860f
parenta57f27e396f9c19bd553687e8ae85b3b0d01e6e0 (diff)
parente72a8c2c5baad2d1dd7abbf497d7dac212de32cf (diff)
downloadbuildstream-d67c70c7c01c56b47bb08b04b0dff931d8690a83.tar.gz
Merge branch 'chiaratolentino/fix-docs' into 'master'
Fix incorrectly displaying bst output in docs Closes #1141 See merge request BuildStream/buildstream!1626
-rw-r--r--doc/Makefile4
-rwxr-xr-xdoc/bst2html.py7
-rw-r--r--doc/sessions/autotools.run2
-rw-r--r--doc/sessions/developing.run2
-rw-r--r--doc/sessions/first-project.run2
-rw-r--r--doc/sessions/flatpak-autotools.run2
-rw-r--r--doc/sessions/integration-commands.run2
-rw-r--r--doc/sessions/junctions.run2
-rw-r--r--doc/source/hacking/writing_documentation.rst2
-rw-r--r--tox.ini1
10 files changed, 14 insertions, 12 deletions
diff --git a/doc/Makefile b/doc/Makefile
index e837c8167..ba8934bde 100644
--- a/doc/Makefile
+++ b/doc/Makefile
@@ -112,9 +112,7 @@ sessions-prep:
# Specify BST_FORCE_SESSION_REBUILD=1 to force rebuild all session html files.
#
sessions: sessions-prep
- for file in $(wildcard sessions/*.run); do \
- PYTHONPATH=$(PYTHONPATH) $(BST2HTML) $(BST2HTMLOPTS) $$file; \
- done
+ $(foreach file,$(wildcard sessions/*.run),PYTHONPATH=$(PYTHONPATH) $(BST2HTML) $(BST2HTMLOPTS) $(file) ; )
sessions-clean:
rm -rf source/sessions
diff --git a/doc/bst2html.py b/doc/bst2html.py
index b3204b8d8..cfaf05513 100755
--- a/doc/bst2html.py
+++ b/doc/bst2html.py
@@ -218,8 +218,11 @@ def run_bst_command(config_file, directory, command):
click.echo("Running bst command in directory '{}': bst {}".format(directory, command), err=True)
argv = ['python3', '-m', 'buildstream', '--colors', '--config', config_file] + shlex.split(command)
- p = subprocess.Popen(argv, cwd=directory, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
- out, _ = p.communicate()
+ try:
+ out = subprocess.check_output(argv, cwd=directory, stderr=subprocess.STDOUT)
+ except subprocess.CalledProcessError as e:
+ click.echo("Command failed:\n{}".format(e.output.decode('utf-8').strip()))
+ sys.exit(1)
return out.decode('utf-8').strip()
diff --git a/doc/sessions/autotools.run b/doc/sessions/autotools.run
index d6263acb7..db2fb6319 100644
--- a/doc/sessions/autotools.run
+++ b/doc/sessions/autotools.run
@@ -2,7 +2,7 @@
commands:
# Make it fetch first
- directory: ../examples/autotools
- command: fetch hello.bst
+ command: source fetch hello.bst
# Capture a `bst show` of the variables
- directory: ../examples/autotools
diff --git a/doc/sessions/developing.run b/doc/sessions/developing.run
index 4cbb40c32..021df36e3 100644
--- a/doc/sessions/developing.run
+++ b/doc/sessions/developing.run
@@ -2,7 +2,7 @@
commands:
# Make it fetch first
- directory: ../examples/developing/
- command: fetch hello.bst
+ command: source fetch hello.bst
# Capture workspace open output
- directory: ../examples/developing/
diff --git a/doc/sessions/first-project.run b/doc/sessions/first-project.run
index f2500a9d0..c2d2067c4 100644
--- a/doc/sessions/first-project.run
+++ b/doc/sessions/first-project.run
@@ -28,7 +28,7 @@ commands:
# Checkout the output
- directory: ../examples/first-project
output: ../source/sessions/first-project-checkout.html
- command: checkout hello.bst here
+ command: artifact checkout --directory here hello.bst
# Checkout the output
- directory: ../examples/first-project
diff --git a/doc/sessions/flatpak-autotools.run b/doc/sessions/flatpak-autotools.run
index be4451a9a..247de1991 100644
--- a/doc/sessions/flatpak-autotools.run
+++ b/doc/sessions/flatpak-autotools.run
@@ -8,7 +8,7 @@ workaround-symlinks:
commands:
# Make it fetch first
- directory: ../examples/flatpak-autotools
- command: fetch hello.bst
+ command: source fetch hello.bst
# Capture a build output
- directory: ../examples/flatpak-autotools
diff --git a/doc/sessions/integration-commands.run b/doc/sessions/integration-commands.run
index 35d2433e1..a20f70e13 100644
--- a/doc/sessions/integration-commands.run
+++ b/doc/sessions/integration-commands.run
@@ -2,7 +2,7 @@
commands:
# Make it fetch first
- directory: ../examples/integration-commands
- command: fetch hello.bst
+ command: source fetch hello.bst
# Capture a build output
- directory: ../examples/integration-commands
diff --git a/doc/sessions/junctions.run b/doc/sessions/junctions.run
index 74c3a4f57..fc9014203 100644
--- a/doc/sessions/junctions.run
+++ b/doc/sessions/junctions.run
@@ -17,4 +17,4 @@ commands:
# Remove the workspace
- directory: ../examples/junctions
- command: workspace close --remove-dirs hello-junction.bst:hello.bst
+ command: workspace close --remove-dir hello-junction.bst:hello.bst
diff --git a/doc/source/hacking/writing_documentation.rst b/doc/source/hacking/writing_documentation.rst
index c1a32af9a..a234c7c7d 100644
--- a/doc/source/hacking/writing_documentation.rst
+++ b/doc/source/hacking/writing_documentation.rst
@@ -278,7 +278,7 @@ regenerate them locally in order to build the docs.
# Make it fetch first
- directory: ../examples/foo
- command: fetch hello.bst
+ command: source fetch hello.bst
# Capture a build output
- directory: ../examples/foo
diff --git a/tox.ini b/tox.ini
index 66782e1c4..50699177e 100644
--- a/tox.ini
+++ b/tox.ini
@@ -124,6 +124,7 @@ deps =
pytest
-rrequirements/requirements.txt
-rrequirements/plugin-requirements.txt
+ git+https://gitlab.com/BuildStream/bst-plugins-experimental.git@705a45315e18338f91299977fd2ef44e51fd8bd7#egg=bst_plugins_experimental[ostree]
passenv =
BST_FORCE_SESSION_REBUILD
BST_SOURCE_CACHE