summaryrefslogtreecommitdiff
path: root/tests/loader
diff options
context:
space:
mode:
authorTristan Van Berkom <tristan.vanberkom@codethink.co.uk>2017-03-18 15:32:38 +0900
committerTristan Van Berkom <tristan.vanberkom@codethink.co.uk>2017-03-18 15:32:38 +0900
commitda394300561d4fd65eb238152f1ced15d2a41dbe (patch)
treede221838d072db74ba0cef954c4b03376bc3f3b9 /tests/loader
parent0d55bd32641eda6c3a99a5774f98b829fb5a0e6c (diff)
downloadbuildstream-da394300561d4fd65eb238152f1ced15d2a41dbe.tar.gz
Refactor: Untangling element/source names
o The metaelements and metasources now carry the name, the loader resolves source names now. o Element/Source factories dont require a name anymore as they are already in the meta objects o Pipeline no longer composes names o Element.name is now the original project relative filename, this allows plugins to identify that name in their dependencies, allowing one to express configuration which identifies elements by the same name that the user used in the dependencies. o Removed plugin._get_display_name() in favor of the plugin.name o Added Element.normal_name, for the cases where we need to have a normalized name for creating directories and log files o Updated frontend and test cases and all callers to use the new naming
Diffstat (limited to 'tests/loader')
-rw-r--r--tests/loader/variants.py22
1 files changed, 11 insertions, 11 deletions
diff --git a/tests/loader/variants.py b/tests/loader/variants.py
index 39869b844..0e20faf93 100644
--- a/tests/loader/variants.py
+++ b/tests/loader/variants.py
@@ -162,7 +162,7 @@ def test_variant_simple_dependency_default(datafiles):
assert(element.kind == 'pony')
# Test that the default is a pink pony
- assert_dependency(element, 0, 'elements-simply-pink', 'color', 'pink')
+ assert_dependency(element, 0, 'elements/simply-pink.bst', 'color', 'pink')
@pytest.mark.datafiles(DATA_DIR)
@@ -177,7 +177,7 @@ def test_variant_simple_dependency_pink_pony(datafiles):
assert(element.kind == 'pony')
# Test that the explicit pink dependency is correct
- assert_dependency(element, 0, 'elements-simply-pink', 'color', 'pink')
+ assert_dependency(element, 0, 'elements/simply-pink.bst', 'color', 'pink')
@pytest.mark.datafiles(DATA_DIR)
@@ -192,7 +192,7 @@ def test_variant_simple_dependency_blue_pony(datafiles):
assert(element.kind == 'pony')
# Test that the explicit blue dependency is correct
- assert_dependency(element, 0, 'elements-simply-blue', 'color', 'blue')
+ assert_dependency(element, 0, 'elements/simply-blue.bst', 'color', 'blue')
@pytest.mark.datafiles(DATA_DIR)
@@ -208,10 +208,10 @@ def test_variant_indirect_dependency_default(datafiles):
# Test that the default is a blue pony-color by default
simple = assert_dependency(
- element, 0, 'elements-simple-dependency-variants', 'pony-color', 'blue')
+ element, 0, 'elements/simple-dependency-variants.bst', 'pony-color', 'blue')
# Test that the element we depend on now depends on the blue color
- assert_dependency(simple, 0, 'elements-simply-blue', 'color', 'blue')
+ assert_dependency(simple, 0, 'elements/simply-blue.bst', 'color', 'blue')
@pytest.mark.datafiles(DATA_DIR)
@@ -227,10 +227,10 @@ def test_variant_indirect_dependency_blue_pony(datafiles):
# Test for a blue pony-color
simple = assert_dependency(
- element, 0, 'elements-simple-dependency-variants', 'pony-color', 'blue')
+ element, 0, 'elements/simple-dependency-variants.bst', 'pony-color', 'blue')
# Test that the element we depend on now depends on the blue color
- assert_dependency(simple, 0, 'elements-simply-blue', 'color', 'blue')
+ assert_dependency(simple, 0, 'elements/simply-blue.bst', 'color', 'blue')
@pytest.mark.datafiles(DATA_DIR)
@@ -246,10 +246,10 @@ def test_variant_indirect_dependency_pink_pony(datafiles):
# Test for a blue pony-color
simple = assert_dependency(
- element, 0, 'elements-simple-dependency-variants', 'pony-color', 'pink')
+ element, 0, 'elements/simple-dependency-variants.bst', 'pony-color', 'pink')
# Test that the element we depend on now depends on the blue color
- assert_dependency(simple, 0, 'elements-simply-pink', 'color', 'pink')
+ assert_dependency(simple, 0, 'elements/simply-pink.bst', 'color', 'pink')
@pytest.mark.datafiles(DATA_DIR)
@@ -263,8 +263,8 @@ def test_engine_resolve_agreement(datafiles):
assert(element.kind == 'tricky')
# Test the first dependency
- first = assert_dependency(element, 0, 'elements-tricky-first', 'choice', 'second')
- second = assert_dependency(element, 1, 'elements-tricky-second', 'choice', 'second')
+ first = assert_dependency(element, 0, 'elements/tricky-first.bst', 'choice', 'second')
+ second = assert_dependency(element, 1, 'elements/tricky-second.bst', 'choice', 'second')
@pytest.mark.datafiles(DATA_DIR)