James Ennis pushed to branch jonathan/fix-identical-element at BuildStream / buildstream
Commits:
-
61ce3dd6
by James Ennis at 2018-11-30T17:14:04Z
17 changed files:
- tests/loader/junctions.py
- + tests/loader/junctions/inconsistent-names/elements/junction-A.bst
- + tests/loader/junctions/inconsistent-names/elements/junction-B-diff-name.bst
- + tests/loader/junctions/inconsistent-names/elements/target.bst
- + tests/loader/junctions/inconsistent-names/files/foo
- + tests/loader/junctions/inconsistent-names/junctionA/elements/app.bst
- + tests/loader/junctions/inconsistent-names/junctionA/elements/junction-B.bst
- + tests/loader/junctions/inconsistent-names/junctionA/elements/lib.bst
- + tests/loader/junctions/inconsistent-names/junctionA/files/app
- + tests/loader/junctions/inconsistent-names/junctionA/files/lib
- + tests/loader/junctions/inconsistent-names/junctionA/junctionB/base/baseimg
- + tests/loader/junctions/inconsistent-names/junctionA/junctionB/elements/base.bst
- + tests/loader/junctions/inconsistent-names/junctionA/junctionB/elements/lib2.bst
- + tests/loader/junctions/inconsistent-names/junctionA/junctionB/files/lib2
- + tests/loader/junctions/inconsistent-names/junctionA/junctionB/project.conf
- + tests/loader/junctions/inconsistent-names/junctionA/project.conf
- + tests/loader/junctions/inconsistent-names/project.conf
Changes:
... | ... | @@ -47,6 +47,16 @@ def test_simple_build(cli, tmpdir, datafiles): |
47 | 47 |
assert(os.path.exists(os.path.join(checkoutdir, 'foo.txt')))
|
48 | 48 |
|
49 | 49 |
|
50 |
+@pytest.mark.datafiles(DATA_DIR)
|
|
51 |
+def test_build_of_same_junction_used_twice(cli, tmpdir, datafiles):
|
|
52 |
+ project = os.path.join(str(datafiles), 'inconsistent-names')
|
|
53 |
+ |
|
54 |
+ # Check we can build a project that contains the same junction
|
|
55 |
+ # that is used twice, but named differently
|
|
56 |
+ result = cli.run(project=project, args=['build', 'target.bst'])
|
|
57 |
+ assert result.exit_code == 0
|
|
58 |
+ |
|
59 |
+ |
|
50 | 60 |
@pytest.mark.datafiles(DATA_DIR)
|
51 | 61 |
def test_nested_simple(cli, tmpdir, datafiles):
|
52 | 62 |
foo = os.path.join(str(datafiles), 'foo')
|
1 |
+kind: junction
|
|
2 |
+sources:
|
|
3 |
+- kind: local
|
|
4 |
+ path: junctionA
|
1 |
+kind: junction
|
|
2 |
+sources:
|
|
3 |
+- kind: local
|
|
4 |
+ path: junctionA/junctionB
|
1 |
+kind: import
|
|
2 |
+sources:
|
|
3 |
+- kind: local
|
|
4 |
+ path: files/foo
|
|
5 |
+depends:
|
|
6 |
+- filename: lib2.bst
|
|
7 |
+ junction: junction-B-diff-name.bst
|
|
8 |
+- filename: lib.bst
|
|
9 |
+ junction: junction-A.bst
|
1 |
+kind: import
|
|
2 |
+sources:
|
|
3 |
+- kind: local
|
|
4 |
+ path: files/app
|
|
5 |
+depends:
|
|
6 |
+- lib.bst
|
1 |
+kind: junction
|
|
2 |
+sources:
|
|
3 |
+- kind: local
|
|
4 |
+ path: junctionB
|
1 |
+kind: import
|
|
2 |
+sources:
|
|
3 |
+- kind: local
|
|
4 |
+ path: files/lib
|
|
5 |
+depends:
|
|
6 |
+- filename: base.bst
|
|
7 |
+ junction: junction-B.bst
|
1 |
+kind: import
|
|
2 |
+sources:
|
|
3 |
+- kind: local
|
|
4 |
+ path: base
|
1 |
+kind: import
|
|
2 |
+sources:
|
|
3 |
+- kind: local
|
|
4 |
+ path: files/lib2
|
|
5 |
+depends:
|
|
6 |
+- base.bst
|
1 |
+# Unique project name
|
|
2 |
+name: projectB
|
|
3 |
+ |
|
4 |
+# Subdirectory where elements are stored
|
|
5 |
+element-path: elements
|
1 |
+# Unique project name
|
|
2 |
+name: projectA
|
|
3 |
+ |
|
4 |
+# Subdirectory where elements are stored
|
|
5 |
+element-path: elements
|
1 |
+# Unique project name
|
|
2 |
+name: inconsistent-names
|
|
3 |
+ |
|
4 |
+# Subdirectory where elements are stored
|
|
5 |
+element-path: elements
|