summaryrefslogtreecommitdiff
path: root/tests/format/junctions/inconsistent-names
diff options
context:
space:
mode:
authorTristan van Berkom <tristan.vanberkom@codethink.co.uk>2020-06-07 17:52:58 +0900
committerTristan van Berkom <tristan.vanberkom@codethink.co.uk>2020-06-19 17:22:31 +0900
commita4a9b5f24ccd1574744abf75c3c39068b72ba7bf (patch)
tree61462839720e8cdfe7788dace00ed4bb3303d73a /tests/format/junctions/inconsistent-names
parented0275786967c0c55369b9604f613a39426c381f (diff)
downloadbuildstream-a4a9b5f24ccd1574744abf75c3c39068b72ba7bf.tar.gz
tests/format/junctions.py: Major refactor
This commit refactors the junctions test to use more parameterization and to remove copy_subproject(), using statically committed data as much as possible. This is because copy_subproject() causes data to be shared among tests in such a way that when such data get's modified, it easily causes unintended side effects on adjacent test cases, better to keep this data separate. Overview of changes: * Remove copy_subproject() * Split up test data into case specific directories, sometimes reusing a directory among various related tests * Use @pytest.mark.parameterize() as much as possible for better coverage and more clearly expressed test cases * Adds update_project() to modify a project.conf inline, as is done in some other tests like tests/plugins/loading.py * Removes tests related to junction name coalescing, this feature will be removed later in this branch and other tests related to junction overrides will replace these. * Removes some redundant tests * Removes a comment about how junction name coalescing can cause errors when trying to open a junction but the project.conf is missing. We continue to test missing project.conf files in a variety of scenarios, but the comment will be rendered irrelevant with the removal of junction name coalescing. * Change the git related tests to use tar instead, this serves the same purpose, but tar will remain a core plugin in BuildStream 2.
Diffstat (limited to 'tests/format/junctions/inconsistent-names')
-rw-r--r--tests/format/junctions/inconsistent-names/elements/junction-A.bst4
-rw-r--r--tests/format/junctions/inconsistent-names/elements/junction-B-diff-name.bst4
-rw-r--r--tests/format/junctions/inconsistent-names/elements/target.bst9
-rw-r--r--tests/format/junctions/inconsistent-names/files/foo0
-rw-r--r--tests/format/junctions/inconsistent-names/junctionA/elements/app.bst6
-rw-r--r--tests/format/junctions/inconsistent-names/junctionA/elements/junction-B.bst4
-rw-r--r--tests/format/junctions/inconsistent-names/junctionA/elements/lib.bst7
-rw-r--r--tests/format/junctions/inconsistent-names/junctionA/files/app0
-rw-r--r--tests/format/junctions/inconsistent-names/junctionA/files/lib0
-rw-r--r--tests/format/junctions/inconsistent-names/junctionA/junctionB/base/baseimg0
-rw-r--r--tests/format/junctions/inconsistent-names/junctionA/junctionB/elements/base.bst4
-rw-r--r--tests/format/junctions/inconsistent-names/junctionA/junctionB/elements/lib2.bst6
-rw-r--r--tests/format/junctions/inconsistent-names/junctionA/junctionB/files/lib20
-rw-r--r--tests/format/junctions/inconsistent-names/junctionA/junctionB/project.conf8
-rw-r--r--tests/format/junctions/inconsistent-names/junctionA/project.conf8
-rw-r--r--tests/format/junctions/inconsistent-names/project.conf8
16 files changed, 0 insertions, 68 deletions
diff --git a/tests/format/junctions/inconsistent-names/elements/junction-A.bst b/tests/format/junctions/inconsistent-names/elements/junction-A.bst
deleted file mode 100644
index 74079f990..000000000
--- a/tests/format/junctions/inconsistent-names/elements/junction-A.bst
+++ /dev/null
@@ -1,4 +0,0 @@
-kind: junction
-sources:
-- kind: local
- path: junctionA
diff --git a/tests/format/junctions/inconsistent-names/elements/junction-B-diff-name.bst b/tests/format/junctions/inconsistent-names/elements/junction-B-diff-name.bst
deleted file mode 100644
index 3b33406e5..000000000
--- a/tests/format/junctions/inconsistent-names/elements/junction-B-diff-name.bst
+++ /dev/null
@@ -1,4 +0,0 @@
-kind: junction
-sources:
-- kind: local
- path: junctionA/junctionB
diff --git a/tests/format/junctions/inconsistent-names/elements/target.bst b/tests/format/junctions/inconsistent-names/elements/target.bst
deleted file mode 100644
index 7eba141de..000000000
--- a/tests/format/junctions/inconsistent-names/elements/target.bst
+++ /dev/null
@@ -1,9 +0,0 @@
-kind: import
-sources:
-- kind: local
- path: files/foo
-depends:
-- filename: lib2.bst
- junction: junction-B-diff-name.bst
-- filename: lib.bst
- junction: junction-A.bst
diff --git a/tests/format/junctions/inconsistent-names/files/foo b/tests/format/junctions/inconsistent-names/files/foo
deleted file mode 100644
index e69de29bb..000000000
--- a/tests/format/junctions/inconsistent-names/files/foo
+++ /dev/null
diff --git a/tests/format/junctions/inconsistent-names/junctionA/elements/app.bst b/tests/format/junctions/inconsistent-names/junctionA/elements/app.bst
deleted file mode 100644
index 473aaee0b..000000000
--- a/tests/format/junctions/inconsistent-names/junctionA/elements/app.bst
+++ /dev/null
@@ -1,6 +0,0 @@
-kind: import
-sources:
-- kind: local
- path: files/app
-depends:
-- lib.bst
diff --git a/tests/format/junctions/inconsistent-names/junctionA/elements/junction-B.bst b/tests/format/junctions/inconsistent-names/junctionA/elements/junction-B.bst
deleted file mode 100644
index bc66d7851..000000000
--- a/tests/format/junctions/inconsistent-names/junctionA/elements/junction-B.bst
+++ /dev/null
@@ -1,4 +0,0 @@
-kind: junction
-sources:
-- kind: local
- path: junctionB
diff --git a/tests/format/junctions/inconsistent-names/junctionA/elements/lib.bst b/tests/format/junctions/inconsistent-names/junctionA/elements/lib.bst
deleted file mode 100644
index 684a64315..000000000
--- a/tests/format/junctions/inconsistent-names/junctionA/elements/lib.bst
+++ /dev/null
@@ -1,7 +0,0 @@
-kind: import
-sources:
-- kind: local
- path: files/lib
-depends:
-- filename: base.bst
- junction: junction-B.bst
diff --git a/tests/format/junctions/inconsistent-names/junctionA/files/app b/tests/format/junctions/inconsistent-names/junctionA/files/app
deleted file mode 100644
index e69de29bb..000000000
--- a/tests/format/junctions/inconsistent-names/junctionA/files/app
+++ /dev/null
diff --git a/tests/format/junctions/inconsistent-names/junctionA/files/lib b/tests/format/junctions/inconsistent-names/junctionA/files/lib
deleted file mode 100644
index e69de29bb..000000000
--- a/tests/format/junctions/inconsistent-names/junctionA/files/lib
+++ /dev/null
diff --git a/tests/format/junctions/inconsistent-names/junctionA/junctionB/base/baseimg b/tests/format/junctions/inconsistent-names/junctionA/junctionB/base/baseimg
deleted file mode 100644
index e69de29bb..000000000
--- a/tests/format/junctions/inconsistent-names/junctionA/junctionB/base/baseimg
+++ /dev/null
diff --git a/tests/format/junctions/inconsistent-names/junctionA/junctionB/elements/base.bst b/tests/format/junctions/inconsistent-names/junctionA/junctionB/elements/base.bst
deleted file mode 100644
index ecdc57c79..000000000
--- a/tests/format/junctions/inconsistent-names/junctionA/junctionB/elements/base.bst
+++ /dev/null
@@ -1,4 +0,0 @@
-kind: import
-sources:
-- kind: local
- path: base
diff --git a/tests/format/junctions/inconsistent-names/junctionA/junctionB/elements/lib2.bst b/tests/format/junctions/inconsistent-names/junctionA/junctionB/elements/lib2.bst
deleted file mode 100644
index 5a7c17b99..000000000
--- a/tests/format/junctions/inconsistent-names/junctionA/junctionB/elements/lib2.bst
+++ /dev/null
@@ -1,6 +0,0 @@
-kind: import
-sources:
-- kind: local
- path: files/lib2
-depends:
-- base.bst
diff --git a/tests/format/junctions/inconsistent-names/junctionA/junctionB/files/lib2 b/tests/format/junctions/inconsistent-names/junctionA/junctionB/files/lib2
deleted file mode 100644
index e69de29bb..000000000
--- a/tests/format/junctions/inconsistent-names/junctionA/junctionB/files/lib2
+++ /dev/null
diff --git a/tests/format/junctions/inconsistent-names/junctionA/junctionB/project.conf b/tests/format/junctions/inconsistent-names/junctionA/junctionB/project.conf
deleted file mode 100644
index 6bdff02c5..000000000
--- a/tests/format/junctions/inconsistent-names/junctionA/junctionB/project.conf
+++ /dev/null
@@ -1,8 +0,0 @@
-# Unique project name
-name: projectB
-
-# Minimum required BuildStream version
-min-version: 2.0
-
-# Subdirectory where elements are stored
-element-path: elements
diff --git a/tests/format/junctions/inconsistent-names/junctionA/project.conf b/tests/format/junctions/inconsistent-names/junctionA/project.conf
deleted file mode 100644
index 8af914819..000000000
--- a/tests/format/junctions/inconsistent-names/junctionA/project.conf
+++ /dev/null
@@ -1,8 +0,0 @@
-# Unique project name
-name: projectA
-
-# Minimum required BuildStream version
-min-version: 2.0
-
-# Subdirectory where elements are stored
-element-path: elements
diff --git a/tests/format/junctions/inconsistent-names/project.conf b/tests/format/junctions/inconsistent-names/project.conf
deleted file mode 100644
index 8eef10e76..000000000
--- a/tests/format/junctions/inconsistent-names/project.conf
+++ /dev/null
@@ -1,8 +0,0 @@
-# Unique project name
-name: inconsistent-names
-
-# Minimum required BuildStream version
-min-version: 2.0
-
-# Subdirectory where elements are stored
-element-path: elements