[Notes] [Git][BuildStream/buildstream][jonathan/fix-identical-element] tests/loader/junctions.py: Test that we can build a junction that is referred differently, twice.



Title: GitLab

James Ennis pushed to branch jonathan/fix-identical-element at BuildStream / buildstream

Commits:

17 changed files:

Changes:

  • tests/loader/junctions.py
    ... ... @@ -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')
    

  • tests/loader/junctions/inconsistent-names/elements/junction-A.bst
    1
    +kind: junction
    
    2
    +sources:
    
    3
    +- kind: local
    
    4
    +  path: junctionA

  • tests/loader/junctions/inconsistent-names/elements/junction-B-diff-name.bst
    1
    +kind: junction
    
    2
    +sources:
    
    3
    +- kind: local
    
    4
    +  path: junctionA/junctionB

  • tests/loader/junctions/inconsistent-names/elements/target.bst
    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

  • tests/loader/junctions/inconsistent-names/files/foo

  • tests/loader/junctions/inconsistent-names/junctionA/elements/app.bst
    1
    +kind: import
    
    2
    +sources:
    
    3
    +- kind: local
    
    4
    +  path: files/app
    
    5
    +depends:
    
    6
    +- lib.bst

  • tests/loader/junctions/inconsistent-names/junctionA/elements/junction-B.bst
    1
    +kind: junction
    
    2
    +sources:
    
    3
    +- kind: local
    
    4
    +  path: junctionB

  • tests/loader/junctions/inconsistent-names/junctionA/elements/lib.bst
    1
    +kind: import
    
    2
    +sources:
    
    3
    +- kind: local
    
    4
    +  path: files/lib
    
    5
    +depends:
    
    6
    +- filename: base.bst
    
    7
    +  junction: junction-B.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
    1
    +kind: import
    
    2
    +sources:
    
    3
    +- kind: local
    
    4
    +  path: base

  • tests/loader/junctions/inconsistent-names/junctionA/junctionB/elements/lib2.bst
    1
    +kind: import
    
    2
    +sources:
    
    3
    +- kind: local
    
    4
    +  path: files/lib2
    
    5
    +depends:
    
    6
    +- base.bst

  • tests/loader/junctions/inconsistent-names/junctionA/junctionB/files/lib2

  • tests/loader/junctions/inconsistent-names/junctionA/junctionB/project.conf
    1
    +# Unique project name
    
    2
    +name: projectB
    
    3
    +
    
    4
    +# Subdirectory where elements are stored
    
    5
    +element-path: elements

  • tests/loader/junctions/inconsistent-names/junctionA/project.conf
    1
    +# Unique project name
    
    2
    +name: projectA
    
    3
    +
    
    4
    +# Subdirectory where elements are stored
    
    5
    +element-path: elements

  • tests/loader/junctions/inconsistent-names/project.conf
    1
    +# Unique project name
    
    2
    +name: inconsistent-names
    
    3
    +
    
    4
    +# Subdirectory where elements are stored
    
    5
    +element-path: elements



  • [Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]