summaryrefslogtreecommitdiff
path: root/src/buildstream/testing
diff options
context:
space:
mode:
Diffstat (limited to 'src/buildstream/testing')
-rw-r--r--src/buildstream/testing/_utils/junction.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/buildstream/testing/_utils/junction.py b/src/buildstream/testing/_utils/junction.py
index e4dbd5984..6f45ad590 100644
--- a/src/buildstream/testing/_utils/junction.py
+++ b/src/buildstream/testing/_utils/junction.py
@@ -19,7 +19,7 @@ from .site import HAVE_GIT, GIT, GIT_ENV
# Returns:
# (str): The ref
#
-def generate_junction(tmpdir, subproject_path, junction_path, *, store_ref=True):
+def generate_junction(tmpdir, subproject_path, junction_path, *, store_ref=True, options={}):
# Create a repo to hold the subproject and generate
# a junction element for it
#
@@ -29,6 +29,10 @@ def generate_junction(tmpdir, subproject_path, junction_path, *, store_ref=True)
source_ref = None
element = {"kind": "junction", "sources": [repo.source_config(ref=source_ref)]}
+
+ if options:
+ element["config"] = {"options": options}
+
_yaml.roundtrip_dump(element, junction_path)
return ref