You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@buildstream.apache.org by tv...@apache.org on 2022/01/18 01:53:13 UTC

[buildstream] branch tristan/test-notparallel created (now 1ebeb02)

This is an automated email from the ASF dual-hosted git repository.

tvb pushed a change to branch tristan/test-notparallel
in repository https://gitbox.apache.org/repos/asf/buildstream.git.


      at 1ebeb02  tests/format/variables.py: Adding test for special "notparallel" behavior

This branch includes the following new commits:

     new 1ebeb02  tests/format/variables.py: Adding test for special "notparallel" behavior

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


[buildstream] 01/01: tests/format/variables.py: Adding test for special "notparallel" behavior

Posted by tv...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

tvb pushed a commit to branch tristan/test-notparallel
in repository https://gitbox.apache.org/repos/asf/buildstream.git

commit 1ebeb02e5a4eca928603dfb49f396895a66d9cbd
Author: Tristan van Berkom <tr...@codethink.co.uk>
AuthorDate: Tue Jan 18 10:52:37 2022 +0900

    tests/format/variables.py: Adding test for special "notparallel" behavior
---
 tests/format/variables.py                          | 13 +++++++++++++
 tests/format/variables/notparallel/notparallel.bst |  4 ++++
 tests/format/variables/notparallel/project.conf    |  4 ++++
 3 files changed, 21 insertions(+)

diff --git a/tests/format/variables.py b/tests/format/variables.py
index 38f3503..9228081 100644
--- a/tests/format/variables.py
+++ b/tests/format/variables.py
@@ -243,3 +243,16 @@ def test_partial_context_junctions(cli, datafiles):
     result.assert_success()
     result_vars = _yaml.load_data(result.output)
     assert result_vars.get_str("eltvar") == "/bar/foo/baz"
+
+
+@pytest.mark.datafiles(os.path.join(DATA_DIR, "notparallel"))
+def test_notparallel(cli, datafiles):
+    project = str(datafiles)
+
+    # Run `bst show`
+    result = cli.run(project=project, args=["show", "--format", "%{vars}", "notparallel.bst"])
+    result.assert_success()
+
+    # Test that setting notparallel variable forces max-jobs to 1
+    result_vars = _yaml.load_data(result.output)
+    assert result_vars.get_str("max-jobs") == "1"
diff --git a/tests/format/variables/notparallel/notparallel.bst b/tests/format/variables/notparallel/notparallel.bst
new file mode 100644
index 0000000..f82a580
--- /dev/null
+++ b/tests/format/variables/notparallel/notparallel.bst
@@ -0,0 +1,4 @@
+kind: manual
+
+variables:
+  notparallel: true
diff --git a/tests/format/variables/notparallel/project.conf b/tests/format/variables/notparallel/project.conf
new file mode 100644
index 0000000..e797fe4
--- /dev/null
+++ b/tests/format/variables/notparallel/project.conf
@@ -0,0 +1,4 @@
+# Basic project configuration that doesnt override anything
+#
+name: zebra
+min-version: 2.0