diff options
82 files changed, 356 insertions, 0 deletions
diff --git a/tests/format/junctions.py b/tests/format/junctions.py index 2e3900fe1..f5858f7e2 100644 --- a/tests/format/junctions.py +++ b/tests/format/junctions.py @@ -510,6 +510,17 @@ def test_override_twice(cli, tmpdir, datafiles): "target.bst", ["target.bst [line 6 column 2]", "target.bst [line 4 column 2]", "target.bst [line 5 column 2]"], ), + # Test a project which uses an internal subsubproject, but also uses that same subsubproject twice + # at the toplevel, this test ensures we also get the provenance of the internal project in the error. + ( + "internal-and-conflict", + "target.bst", + [ + "subproject.bst:subtarget.bst [line 10 column 2]", + "target.bst [line 5 column 2]", + "target.bst [line 6 column 2]", + ], + ), ], ids=[ "simple", @@ -520,6 +531,7 @@ def test_override_twice(cli, tmpdir, datafiles): "plugin", "incomplete-duplicates", "incomplete-nested-duplicates", + "internal", ], ) def test_conflict(cli, tmpdir, datafiles, project_dir, target, provenances): @@ -645,3 +657,39 @@ def test_duplicates_not_found(cli, tmpdir, datafiles, project_dir, provenance): # Check that provenance was provided if expected assert provenance in result.stderr + + +# +# Test internal projects +# +@pytest.mark.datafiles(DATA_DIR) +@pytest.mark.parametrize( + "project_dir,expected_files", + [ + # Test a project which repeats a subproject which is also + # internal to another subproject. + ("internal-simple", ["subsub.txt", "subsub-again.txt"]), + # Test a project which repeats a subproject which is also + # internal to two other subprojects. + ("internal-double", ["subsub1.txt", "subsub2.txt", "subsub-again.txt"]), + # Test a project which repeats a subproject which is also + # internal to another subproject, which marks it internal using a link. + ("internal-link", ["subsub.txt", "subsub-again.txt"]), + # Test a project which repeats a subproject which is also internal to another + # subproject, and also overrides that same internal subproject. + ("internal-override", ["subsub-override.txt", "subsub-again.txt"]), + ], + ids=["simple", "double", "link", "override"], +) +def test_internal(cli, tmpdir, datafiles, project_dir, expected_files): + project = os.path.join(str(datafiles), project_dir) + checkoutdir = os.path.join(str(tmpdir), "checkout") + + result = cli.run(project=project, args=["build", "target.bst"]) + result.assert_success() + result = cli.run(project=project, args=["artifact", "checkout", "target.bst", "--directory", checkoutdir]) + result.assert_success() + + # Check that the checkout contains the expected file + for expected in expected_files: + assert os.path.exists(os.path.join(checkoutdir, expected)) diff --git a/tests/format/junctions/internal-and-conflict/project.conf b/tests/format/junctions/internal-and-conflict/project.conf new file mode 100644 index 000000000..20636c446 --- /dev/null +++ b/tests/format/junctions/internal-and-conflict/project.conf @@ -0,0 +1,2 @@ +name: test +min-version: 2.0 diff --git a/tests/format/junctions/internal-and-conflict/subproject.bst b/tests/format/junctions/internal-and-conflict/subproject.bst new file mode 100644 index 000000000..c88189cb0 --- /dev/null +++ b/tests/format/junctions/internal-and-conflict/subproject.bst @@ -0,0 +1,4 @@ +kind: junction +sources: +- kind: local + path: subproject diff --git a/tests/format/junctions/internal-and-conflict/subproject/project.conf b/tests/format/junctions/internal-and-conflict/subproject/project.conf new file mode 100644 index 000000000..1d44ec886 --- /dev/null +++ b/tests/format/junctions/internal-and-conflict/subproject/project.conf @@ -0,0 +1,6 @@ +name: subtest +min-version: 2.0 + +junctions: + internal: + - subsubproject.bst diff --git a/tests/format/junctions/internal-and-conflict/subproject/subsubproject.bst b/tests/format/junctions/internal-and-conflict/subproject/subsubproject.bst new file mode 100644 index 000000000..f535ab0e0 --- /dev/null +++ b/tests/format/junctions/internal-and-conflict/subproject/subsubproject.bst @@ -0,0 +1,4 @@ +kind: junction +sources: +- kind: local + path: subsubproject diff --git a/tests/format/junctions/internal-and-conflict/subproject/subsubproject/project.conf b/tests/format/junctions/internal-and-conflict/subproject/subsubproject/project.conf new file mode 100644 index 000000000..d11bcbb30 --- /dev/null +++ b/tests/format/junctions/internal-and-conflict/subproject/subsubproject/project.conf @@ -0,0 +1,2 @@ +name: subsubtest +min-version: 2.0 diff --git a/tests/format/junctions/internal-and-conflict/subproject/subsubproject/subsub.txt b/tests/format/junctions/internal-and-conflict/subproject/subsubproject/subsub.txt new file mode 100644 index 000000000..f73f3093f --- /dev/null +++ b/tests/format/junctions/internal-and-conflict/subproject/subsubproject/subsub.txt @@ -0,0 +1 @@ +file diff --git a/tests/format/junctions/internal-and-conflict/subproject/subsubproject/target.bst b/tests/format/junctions/internal-and-conflict/subproject/subsubproject/target.bst new file mode 100644 index 000000000..afafac601 --- /dev/null +++ b/tests/format/junctions/internal-and-conflict/subproject/subsubproject/target.bst @@ -0,0 +1,4 @@ +kind: import +sources: +- kind: local + path: subsub.txt diff --git a/tests/format/junctions/internal-and-conflict/subproject/subtarget.bst b/tests/format/junctions/internal-and-conflict/subproject/subtarget.bst new file mode 100644 index 000000000..5e6a76bac --- /dev/null +++ b/tests/format/junctions/internal-and-conflict/subproject/subtarget.bst @@ -0,0 +1,10 @@ +kind: compose + +# Use a build dependency on our internal subsubproject target. +# +# There is currently no validation for this but it may be +# introduced in the future. For correctness of this test, +# use a build dependency. +# +build-depends: +- subsubproject.bst:target.bst diff --git a/tests/format/junctions/internal-and-conflict/subsubproject-again.bst b/tests/format/junctions/internal-and-conflict/subsubproject-again.bst new file mode 100644 index 000000000..308642704 --- /dev/null +++ b/tests/format/junctions/internal-and-conflict/subsubproject-again.bst @@ -0,0 +1,4 @@ +kind: junction +sources: +- kind: local + path: subsubproject-again diff --git a/tests/format/junctions/internal-and-conflict/subsubproject-again/project.conf b/tests/format/junctions/internal-and-conflict/subsubproject-again/project.conf new file mode 100644 index 000000000..d11bcbb30 --- /dev/null +++ b/tests/format/junctions/internal-and-conflict/subsubproject-again/project.conf @@ -0,0 +1,2 @@ +name: subsubtest +min-version: 2.0 diff --git a/tests/format/junctions/internal-and-conflict/subsubproject-again/subsub-again.txt b/tests/format/junctions/internal-and-conflict/subsubproject-again/subsub-again.txt new file mode 100644 index 000000000..f73f3093f --- /dev/null +++ b/tests/format/junctions/internal-and-conflict/subsubproject-again/subsub-again.txt @@ -0,0 +1 @@ +file diff --git a/tests/format/junctions/internal-and-conflict/subsubproject-again/target.bst b/tests/format/junctions/internal-and-conflict/subsubproject-again/target.bst new file mode 100644 index 000000000..1a90211de --- /dev/null +++ b/tests/format/junctions/internal-and-conflict/subsubproject-again/target.bst @@ -0,0 +1,4 @@ +kind: import +sources: +- kind: local + path: subsub-again.txt diff --git a/tests/format/junctions/internal-and-conflict/subsubproject-conflict.bst b/tests/format/junctions/internal-and-conflict/subsubproject-conflict.bst new file mode 100644 index 000000000..e4715ea1d --- /dev/null +++ b/tests/format/junctions/internal-and-conflict/subsubproject-conflict.bst @@ -0,0 +1,4 @@ +kind: junction +sources: +- kind: local + path: subsubproject-conflict diff --git a/tests/format/junctions/internal-and-conflict/subsubproject-conflict/project.conf b/tests/format/junctions/internal-and-conflict/subsubproject-conflict/project.conf new file mode 100644 index 000000000..d11bcbb30 --- /dev/null +++ b/tests/format/junctions/internal-and-conflict/subsubproject-conflict/project.conf @@ -0,0 +1,2 @@ +name: subsubtest +min-version: 2.0 diff --git a/tests/format/junctions/internal-and-conflict/subsubproject-conflict/subsub-again.txt b/tests/format/junctions/internal-and-conflict/subsubproject-conflict/subsub-again.txt new file mode 100644 index 000000000..f73f3093f --- /dev/null +++ b/tests/format/junctions/internal-and-conflict/subsubproject-conflict/subsub-again.txt @@ -0,0 +1 @@ +file diff --git a/tests/format/junctions/internal-and-conflict/subsubproject-conflict/target.bst b/tests/format/junctions/internal-and-conflict/subsubproject-conflict/target.bst new file mode 100644 index 000000000..1a90211de --- /dev/null +++ b/tests/format/junctions/internal-and-conflict/subsubproject-conflict/target.bst @@ -0,0 +1,4 @@ +kind: import +sources: +- kind: local + path: subsub-again.txt diff --git a/tests/format/junctions/internal-and-conflict/target.bst b/tests/format/junctions/internal-and-conflict/target.bst new file mode 100644 index 000000000..5e661e6ba --- /dev/null +++ b/tests/format/junctions/internal-and-conflict/target.bst @@ -0,0 +1,6 @@ +kind: stack + +depends: +- subproject.bst:subtarget.bst +- subsubproject-again.bst:target.bst +- subsubproject-conflict.bst:target.bst diff --git a/tests/format/junctions/internal-double/project.conf b/tests/format/junctions/internal-double/project.conf new file mode 100644 index 000000000..20636c446 --- /dev/null +++ b/tests/format/junctions/internal-double/project.conf @@ -0,0 +1,2 @@ +name: test +min-version: 2.0 diff --git a/tests/format/junctions/internal-double/subproject1.bst b/tests/format/junctions/internal-double/subproject1.bst new file mode 100644 index 000000000..bfd692d00 --- /dev/null +++ b/tests/format/junctions/internal-double/subproject1.bst @@ -0,0 +1,4 @@ +kind: junction +sources: +- kind: local + path: subproject1 diff --git a/tests/format/junctions/internal-double/subproject1/project.conf b/tests/format/junctions/internal-double/subproject1/project.conf new file mode 100644 index 000000000..d82152220 --- /dev/null +++ b/tests/format/junctions/internal-double/subproject1/project.conf @@ -0,0 +1,6 @@ +name: subtest1 +min-version: 2.0 + +junctions: + internal: + - subsubproject.bst diff --git a/tests/format/junctions/internal-double/subproject1/subsubproject.bst b/tests/format/junctions/internal-double/subproject1/subsubproject.bst new file mode 100644 index 000000000..f535ab0e0 --- /dev/null +++ b/tests/format/junctions/internal-double/subproject1/subsubproject.bst @@ -0,0 +1,4 @@ +kind: junction +sources: +- kind: local + path: subsubproject diff --git a/tests/format/junctions/internal-double/subproject1/subsubproject/project.conf b/tests/format/junctions/internal-double/subproject1/subsubproject/project.conf new file mode 100644 index 000000000..d11bcbb30 --- /dev/null +++ b/tests/format/junctions/internal-double/subproject1/subsubproject/project.conf @@ -0,0 +1,2 @@ +name: subsubtest +min-version: 2.0 diff --git a/tests/format/junctions/internal-double/subproject1/subsubproject/subsub1.txt b/tests/format/junctions/internal-double/subproject1/subsubproject/subsub1.txt new file mode 100644 index 000000000..f73f3093f --- /dev/null +++ b/tests/format/junctions/internal-double/subproject1/subsubproject/subsub1.txt @@ -0,0 +1 @@ +file diff --git a/tests/format/junctions/internal-double/subproject1/subsubproject/target.bst b/tests/format/junctions/internal-double/subproject1/subsubproject/target.bst new file mode 100644 index 000000000..2d631ebba --- /dev/null +++ b/tests/format/junctions/internal-double/subproject1/subsubproject/target.bst @@ -0,0 +1,4 @@ +kind: import +sources: +- kind: local + path: subsub1.txt diff --git a/tests/format/junctions/internal-double/subproject1/subtarget.bst b/tests/format/junctions/internal-double/subproject1/subtarget.bst new file mode 100644 index 000000000..5e6a76bac --- /dev/null +++ b/tests/format/junctions/internal-double/subproject1/subtarget.bst @@ -0,0 +1,10 @@ +kind: compose + +# Use a build dependency on our internal subsubproject target. +# +# There is currently no validation for this but it may be +# introduced in the future. For correctness of this test, +# use a build dependency. +# +build-depends: +- subsubproject.bst:target.bst diff --git a/tests/format/junctions/internal-double/subproject2.bst b/tests/format/junctions/internal-double/subproject2.bst new file mode 100644 index 000000000..2343652e1 --- /dev/null +++ b/tests/format/junctions/internal-double/subproject2.bst @@ -0,0 +1,4 @@ +kind: junction +sources: +- kind: local + path: subproject2 diff --git a/tests/format/junctions/internal-double/subproject2/project.conf b/tests/format/junctions/internal-double/subproject2/project.conf new file mode 100644 index 000000000..8ed6c717a --- /dev/null +++ b/tests/format/junctions/internal-double/subproject2/project.conf @@ -0,0 +1,6 @@ +name: subtest2 +min-version: 2.0 + +junctions: + internal: + - subsubproject.bst diff --git a/tests/format/junctions/internal-double/subproject2/subsubproject.bst b/tests/format/junctions/internal-double/subproject2/subsubproject.bst new file mode 100644 index 000000000..f535ab0e0 --- /dev/null +++ b/tests/format/junctions/internal-double/subproject2/subsubproject.bst @@ -0,0 +1,4 @@ +kind: junction +sources: +- kind: local + path: subsubproject diff --git a/tests/format/junctions/internal-double/subproject2/subsubproject/project.conf b/tests/format/junctions/internal-double/subproject2/subsubproject/project.conf new file mode 100644 index 000000000..d11bcbb30 --- /dev/null +++ b/tests/format/junctions/internal-double/subproject2/subsubproject/project.conf @@ -0,0 +1,2 @@ +name: subsubtest +min-version: 2.0 diff --git a/tests/format/junctions/internal-double/subproject2/subsubproject/subsub2.txt b/tests/format/junctions/internal-double/subproject2/subsubproject/subsub2.txt new file mode 100644 index 000000000..f73f3093f --- /dev/null +++ b/tests/format/junctions/internal-double/subproject2/subsubproject/subsub2.txt @@ -0,0 +1 @@ +file diff --git a/tests/format/junctions/internal-double/subproject2/subsubproject/target.bst b/tests/format/junctions/internal-double/subproject2/subsubproject/target.bst new file mode 100644 index 000000000..5cfa4e453 --- /dev/null +++ b/tests/format/junctions/internal-double/subproject2/subsubproject/target.bst @@ -0,0 +1,4 @@ +kind: import +sources: +- kind: local + path: subsub2.txt diff --git a/tests/format/junctions/internal-double/subproject2/subtarget.bst b/tests/format/junctions/internal-double/subproject2/subtarget.bst new file mode 100644 index 000000000..5e6a76bac --- /dev/null +++ b/tests/format/junctions/internal-double/subproject2/subtarget.bst @@ -0,0 +1,10 @@ +kind: compose + +# Use a build dependency on our internal subsubproject target. +# +# There is currently no validation for this but it may be +# introduced in the future. For correctness of this test, +# use a build dependency. +# +build-depends: +- subsubproject.bst:target.bst diff --git a/tests/format/junctions/internal-double/subsubproject-again.bst b/tests/format/junctions/internal-double/subsubproject-again.bst new file mode 100644 index 000000000..308642704 --- /dev/null +++ b/tests/format/junctions/internal-double/subsubproject-again.bst @@ -0,0 +1,4 @@ +kind: junction +sources: +- kind: local + path: subsubproject-again diff --git a/tests/format/junctions/internal-double/subsubproject-again/project.conf b/tests/format/junctions/internal-double/subsubproject-again/project.conf new file mode 100644 index 000000000..d11bcbb30 --- /dev/null +++ b/tests/format/junctions/internal-double/subsubproject-again/project.conf @@ -0,0 +1,2 @@ +name: subsubtest +min-version: 2.0 diff --git a/tests/format/junctions/internal-double/subsubproject-again/subsub-again.txt b/tests/format/junctions/internal-double/subsubproject-again/subsub-again.txt new file mode 100644 index 000000000..f73f3093f --- /dev/null +++ b/tests/format/junctions/internal-double/subsubproject-again/subsub-again.txt @@ -0,0 +1 @@ +file diff --git a/tests/format/junctions/internal-double/subsubproject-again/target.bst b/tests/format/junctions/internal-double/subsubproject-again/target.bst new file mode 100644 index 000000000..1a90211de --- /dev/null +++ b/tests/format/junctions/internal-double/subsubproject-again/target.bst @@ -0,0 +1,4 @@ +kind: import +sources: +- kind: local + path: subsub-again.txt diff --git a/tests/format/junctions/internal-double/target.bst b/tests/format/junctions/internal-double/target.bst new file mode 100644 index 000000000..b579466d5 --- /dev/null +++ b/tests/format/junctions/internal-double/target.bst @@ -0,0 +1,6 @@ +kind: stack + +depends: +- subproject1.bst:subtarget.bst +- subproject2.bst:subtarget.bst +- subsubproject-again.bst:target.bst diff --git a/tests/format/junctions/internal-link/project.conf b/tests/format/junctions/internal-link/project.conf new file mode 100644 index 000000000..20636c446 --- /dev/null +++ b/tests/format/junctions/internal-link/project.conf @@ -0,0 +1,2 @@ +name: test +min-version: 2.0 diff --git a/tests/format/junctions/internal-link/subproject.bst b/tests/format/junctions/internal-link/subproject.bst new file mode 100644 index 000000000..c88189cb0 --- /dev/null +++ b/tests/format/junctions/internal-link/subproject.bst @@ -0,0 +1,4 @@ +kind: junction +sources: +- kind: local + path: subproject diff --git a/tests/format/junctions/internal-link/subproject/project.conf b/tests/format/junctions/internal-link/subproject/project.conf new file mode 100644 index 000000000..ac5810334 --- /dev/null +++ b/tests/format/junctions/internal-link/subproject/project.conf @@ -0,0 +1,6 @@ +name: subtest +min-version: 2.0 + +junctions: + internal: + - subsubproject-link.bst diff --git a/tests/format/junctions/internal-link/subproject/subsubproject-link.bst b/tests/format/junctions/internal-link/subproject/subsubproject-link.bst new file mode 100644 index 000000000..246a5e41c --- /dev/null +++ b/tests/format/junctions/internal-link/subproject/subsubproject-link.bst @@ -0,0 +1,4 @@ +kind: link + +config: + target: subsubproject.bst diff --git a/tests/format/junctions/internal-link/subproject/subsubproject.bst b/tests/format/junctions/internal-link/subproject/subsubproject.bst new file mode 100644 index 000000000..f535ab0e0 --- /dev/null +++ b/tests/format/junctions/internal-link/subproject/subsubproject.bst @@ -0,0 +1,4 @@ +kind: junction +sources: +- kind: local + path: subsubproject diff --git a/tests/format/junctions/internal-link/subproject/subsubproject/project.conf b/tests/format/junctions/internal-link/subproject/subsubproject/project.conf new file mode 100644 index 000000000..d11bcbb30 --- /dev/null +++ b/tests/format/junctions/internal-link/subproject/subsubproject/project.conf @@ -0,0 +1,2 @@ +name: subsubtest +min-version: 2.0 diff --git a/tests/format/junctions/internal-link/subproject/subsubproject/subsub.txt b/tests/format/junctions/internal-link/subproject/subsubproject/subsub.txt new file mode 100644 index 000000000..f73f3093f --- /dev/null +++ b/tests/format/junctions/internal-link/subproject/subsubproject/subsub.txt @@ -0,0 +1 @@ +file diff --git a/tests/format/junctions/internal-link/subproject/subsubproject/target.bst b/tests/format/junctions/internal-link/subproject/subsubproject/target.bst new file mode 100644 index 000000000..afafac601 --- /dev/null +++ b/tests/format/junctions/internal-link/subproject/subsubproject/target.bst @@ -0,0 +1,4 @@ +kind: import +sources: +- kind: local + path: subsub.txt diff --git a/tests/format/junctions/internal-link/subproject/subtarget.bst b/tests/format/junctions/internal-link/subproject/subtarget.bst new file mode 100644 index 000000000..5e6a76bac --- /dev/null +++ b/tests/format/junctions/internal-link/subproject/subtarget.bst @@ -0,0 +1,10 @@ +kind: compose + +# Use a build dependency on our internal subsubproject target. +# +# There is currently no validation for this but it may be +# introduced in the future. For correctness of this test, +# use a build dependency. +# +build-depends: +- subsubproject.bst:target.bst diff --git a/tests/format/junctions/internal-link/subsubproject-again.bst b/tests/format/junctions/internal-link/subsubproject-again.bst new file mode 100644 index 000000000..308642704 --- /dev/null +++ b/tests/format/junctions/internal-link/subsubproject-again.bst @@ -0,0 +1,4 @@ +kind: junction +sources: +- kind: local + path: subsubproject-again diff --git a/tests/format/junctions/internal-link/subsubproject-again/project.conf b/tests/format/junctions/internal-link/subsubproject-again/project.conf new file mode 100644 index 000000000..d11bcbb30 --- /dev/null +++ b/tests/format/junctions/internal-link/subsubproject-again/project.conf @@ -0,0 +1,2 @@ +name: subsubtest +min-version: 2.0 diff --git a/tests/format/junctions/internal-link/subsubproject-again/subsub-again.txt b/tests/format/junctions/internal-link/subsubproject-again/subsub-again.txt new file mode 100644 index 000000000..f73f3093f --- /dev/null +++ b/tests/format/junctions/internal-link/subsubproject-again/subsub-again.txt @@ -0,0 +1 @@ +file diff --git a/tests/format/junctions/internal-link/subsubproject-again/target.bst b/tests/format/junctions/internal-link/subsubproject-again/target.bst new file mode 100644 index 000000000..1a90211de --- /dev/null +++ b/tests/format/junctions/internal-link/subsubproject-again/target.bst @@ -0,0 +1,4 @@ +kind: import +sources: +- kind: local + path: subsub-again.txt diff --git a/tests/format/junctions/internal-link/target.bst b/tests/format/junctions/internal-link/target.bst new file mode 100644 index 000000000..bc8944592 --- /dev/null +++ b/tests/format/junctions/internal-link/target.bst @@ -0,0 +1,5 @@ +kind: stack + +depends: +- subproject.bst:subtarget.bst +- subsubproject-again.bst:target.bst diff --git a/tests/format/junctions/internal-override/project.conf b/tests/format/junctions/internal-override/project.conf new file mode 100644 index 000000000..20636c446 --- /dev/null +++ b/tests/format/junctions/internal-override/project.conf @@ -0,0 +1,2 @@ +name: test +min-version: 2.0 diff --git a/tests/format/junctions/internal-override/subproject.bst b/tests/format/junctions/internal-override/subproject.bst new file mode 100644 index 000000000..db1dd6253 --- /dev/null +++ b/tests/format/junctions/internal-override/subproject.bst @@ -0,0 +1,8 @@ +kind: junction +sources: +- kind: local + path: subproject + +config: + overrides: + subsubproject.bst: subsubproject-override.bst diff --git a/tests/format/junctions/internal-override/subproject/project.conf b/tests/format/junctions/internal-override/subproject/project.conf new file mode 100644 index 000000000..1d44ec886 --- /dev/null +++ b/tests/format/junctions/internal-override/subproject/project.conf @@ -0,0 +1,6 @@ +name: subtest +min-version: 2.0 + +junctions: + internal: + - subsubproject.bst diff --git a/tests/format/junctions/internal-override/subproject/subsubproject.bst b/tests/format/junctions/internal-override/subproject/subsubproject.bst new file mode 100644 index 000000000..f535ab0e0 --- /dev/null +++ b/tests/format/junctions/internal-override/subproject/subsubproject.bst @@ -0,0 +1,4 @@ +kind: junction +sources: +- kind: local + path: subsubproject diff --git a/tests/format/junctions/internal-override/subproject/subsubproject/project.conf b/tests/format/junctions/internal-override/subproject/subsubproject/project.conf new file mode 100644 index 000000000..d11bcbb30 --- /dev/null +++ b/tests/format/junctions/internal-override/subproject/subsubproject/project.conf @@ -0,0 +1,2 @@ +name: subsubtest +min-version: 2.0 diff --git a/tests/format/junctions/internal-override/subproject/subsubproject/subsub.txt b/tests/format/junctions/internal-override/subproject/subsubproject/subsub.txt new file mode 100644 index 000000000..f73f3093f --- /dev/null +++ b/tests/format/junctions/internal-override/subproject/subsubproject/subsub.txt @@ -0,0 +1 @@ +file diff --git a/tests/format/junctions/internal-override/subproject/subsubproject/target.bst b/tests/format/junctions/internal-override/subproject/subsubproject/target.bst new file mode 100644 index 000000000..afafac601 --- /dev/null +++ b/tests/format/junctions/internal-override/subproject/subsubproject/target.bst @@ -0,0 +1,4 @@ +kind: import +sources: +- kind: local + path: subsub.txt diff --git a/tests/format/junctions/internal-override/subproject/subtarget.bst b/tests/format/junctions/internal-override/subproject/subtarget.bst new file mode 100644 index 000000000..5e6a76bac --- /dev/null +++ b/tests/format/junctions/internal-override/subproject/subtarget.bst @@ -0,0 +1,10 @@ +kind: compose + +# Use a build dependency on our internal subsubproject target. +# +# There is currently no validation for this but it may be +# introduced in the future. For correctness of this test, +# use a build dependency. +# +build-depends: +- subsubproject.bst:target.bst diff --git a/tests/format/junctions/internal-override/subsubproject-again.bst b/tests/format/junctions/internal-override/subsubproject-again.bst new file mode 100644 index 000000000..308642704 --- /dev/null +++ b/tests/format/junctions/internal-override/subsubproject-again.bst @@ -0,0 +1,4 @@ +kind: junction +sources: +- kind: local + path: subsubproject-again diff --git a/tests/format/junctions/internal-override/subsubproject-again/project.conf b/tests/format/junctions/internal-override/subsubproject-again/project.conf new file mode 100644 index 000000000..d11bcbb30 --- /dev/null +++ b/tests/format/junctions/internal-override/subsubproject-again/project.conf @@ -0,0 +1,2 @@ +name: subsubtest +min-version: 2.0 diff --git a/tests/format/junctions/internal-override/subsubproject-again/subsub-again.txt b/tests/format/junctions/internal-override/subsubproject-again/subsub-again.txt new file mode 100644 index 000000000..f73f3093f --- /dev/null +++ b/tests/format/junctions/internal-override/subsubproject-again/subsub-again.txt @@ -0,0 +1 @@ +file diff --git a/tests/format/junctions/internal-override/subsubproject-again/target.bst b/tests/format/junctions/internal-override/subsubproject-again/target.bst new file mode 100644 index 000000000..1a90211de --- /dev/null +++ b/tests/format/junctions/internal-override/subsubproject-again/target.bst @@ -0,0 +1,4 @@ +kind: import +sources: +- kind: local + path: subsub-again.txt diff --git a/tests/format/junctions/internal-override/subsubproject-override.bst b/tests/format/junctions/internal-override/subsubproject-override.bst new file mode 100644 index 000000000..a5e47cdc6 --- /dev/null +++ b/tests/format/junctions/internal-override/subsubproject-override.bst @@ -0,0 +1,4 @@ +kind: junction +sources: +- kind: local + path: subsubproject-override diff --git a/tests/format/junctions/internal-override/subsubproject-override/project.conf b/tests/format/junctions/internal-override/subsubproject-override/project.conf new file mode 100644 index 000000000..d11bcbb30 --- /dev/null +++ b/tests/format/junctions/internal-override/subsubproject-override/project.conf @@ -0,0 +1,2 @@ +name: subsubtest +min-version: 2.0 diff --git a/tests/format/junctions/internal-override/subsubproject-override/subsub-override.txt b/tests/format/junctions/internal-override/subsubproject-override/subsub-override.txt new file mode 100644 index 000000000..f73f3093f --- /dev/null +++ b/tests/format/junctions/internal-override/subsubproject-override/subsub-override.txt @@ -0,0 +1 @@ +file diff --git a/tests/format/junctions/internal-override/subsubproject-override/target.bst b/tests/format/junctions/internal-override/subsubproject-override/target.bst new file mode 100644 index 000000000..ae732d025 --- /dev/null +++ b/tests/format/junctions/internal-override/subsubproject-override/target.bst @@ -0,0 +1,4 @@ +kind: import +sources: +- kind: local + path: subsub-override.txt diff --git a/tests/format/junctions/internal-override/target.bst b/tests/format/junctions/internal-override/target.bst new file mode 100644 index 000000000..bc8944592 --- /dev/null +++ b/tests/format/junctions/internal-override/target.bst @@ -0,0 +1,5 @@ +kind: stack + +depends: +- subproject.bst:subtarget.bst +- subsubproject-again.bst:target.bst diff --git a/tests/format/junctions/internal-simple/project.conf b/tests/format/junctions/internal-simple/project.conf new file mode 100644 index 000000000..20636c446 --- /dev/null +++ b/tests/format/junctions/internal-simple/project.conf @@ -0,0 +1,2 @@ +name: test +min-version: 2.0 diff --git a/tests/format/junctions/internal-simple/subproject.bst b/tests/format/junctions/internal-simple/subproject.bst new file mode 100644 index 000000000..c88189cb0 --- /dev/null +++ b/tests/format/junctions/internal-simple/subproject.bst @@ -0,0 +1,4 @@ +kind: junction +sources: +- kind: local + path: subproject diff --git a/tests/format/junctions/internal-simple/subproject/project.conf b/tests/format/junctions/internal-simple/subproject/project.conf new file mode 100644 index 000000000..1d44ec886 --- /dev/null +++ b/tests/format/junctions/internal-simple/subproject/project.conf @@ -0,0 +1,6 @@ +name: subtest +min-version: 2.0 + +junctions: + internal: + - subsubproject.bst diff --git a/tests/format/junctions/internal-simple/subproject/subsubproject.bst b/tests/format/junctions/internal-simple/subproject/subsubproject.bst new file mode 100644 index 000000000..f535ab0e0 --- /dev/null +++ b/tests/format/junctions/internal-simple/subproject/subsubproject.bst @@ -0,0 +1,4 @@ +kind: junction +sources: +- kind: local + path: subsubproject diff --git a/tests/format/junctions/internal-simple/subproject/subsubproject/project.conf b/tests/format/junctions/internal-simple/subproject/subsubproject/project.conf new file mode 100644 index 000000000..d11bcbb30 --- /dev/null +++ b/tests/format/junctions/internal-simple/subproject/subsubproject/project.conf @@ -0,0 +1,2 @@ +name: subsubtest +min-version: 2.0 diff --git a/tests/format/junctions/internal-simple/subproject/subsubproject/subsub.txt b/tests/format/junctions/internal-simple/subproject/subsubproject/subsub.txt new file mode 100644 index 000000000..f73f3093f --- /dev/null +++ b/tests/format/junctions/internal-simple/subproject/subsubproject/subsub.txt @@ -0,0 +1 @@ +file diff --git a/tests/format/junctions/internal-simple/subproject/subsubproject/target.bst b/tests/format/junctions/internal-simple/subproject/subsubproject/target.bst new file mode 100644 index 000000000..afafac601 --- /dev/null +++ b/tests/format/junctions/internal-simple/subproject/subsubproject/target.bst @@ -0,0 +1,4 @@ +kind: import +sources: +- kind: local + path: subsub.txt diff --git a/tests/format/junctions/internal-simple/subproject/subtarget.bst b/tests/format/junctions/internal-simple/subproject/subtarget.bst new file mode 100644 index 000000000..5e6a76bac --- /dev/null +++ b/tests/format/junctions/internal-simple/subproject/subtarget.bst @@ -0,0 +1,10 @@ +kind: compose + +# Use a build dependency on our internal subsubproject target. +# +# There is currently no validation for this but it may be +# introduced in the future. For correctness of this test, +# use a build dependency. +# +build-depends: +- subsubproject.bst:target.bst diff --git a/tests/format/junctions/internal-simple/subsubproject-again.bst b/tests/format/junctions/internal-simple/subsubproject-again.bst new file mode 100644 index 000000000..308642704 --- /dev/null +++ b/tests/format/junctions/internal-simple/subsubproject-again.bst @@ -0,0 +1,4 @@ +kind: junction +sources: +- kind: local + path: subsubproject-again diff --git a/tests/format/junctions/internal-simple/subsubproject-again/project.conf b/tests/format/junctions/internal-simple/subsubproject-again/project.conf new file mode 100644 index 000000000..d11bcbb30 --- /dev/null +++ b/tests/format/junctions/internal-simple/subsubproject-again/project.conf @@ -0,0 +1,2 @@ +name: subsubtest +min-version: 2.0 diff --git a/tests/format/junctions/internal-simple/subsubproject-again/subsub-again.txt b/tests/format/junctions/internal-simple/subsubproject-again/subsub-again.txt new file mode 100644 index 000000000..f73f3093f --- /dev/null +++ b/tests/format/junctions/internal-simple/subsubproject-again/subsub-again.txt @@ -0,0 +1 @@ +file diff --git a/tests/format/junctions/internal-simple/subsubproject-again/target.bst b/tests/format/junctions/internal-simple/subsubproject-again/target.bst new file mode 100644 index 000000000..1a90211de --- /dev/null +++ b/tests/format/junctions/internal-simple/subsubproject-again/target.bst @@ -0,0 +1,4 @@ +kind: import +sources: +- kind: local + path: subsub-again.txt diff --git a/tests/format/junctions/internal-simple/target.bst b/tests/format/junctions/internal-simple/target.bst new file mode 100644 index 000000000..bc8944592 --- /dev/null +++ b/tests/format/junctions/internal-simple/target.bst @@ -0,0 +1,5 @@ +kind: stack + +depends: +- subproject.bst:subtarget.bst +- subsubproject-again.bst:target.bst |