summaryrefslogtreecommitdiff
path: root/tests/format/junctions/full-path/subproject
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/full-path/subproject
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/full-path/subproject')
-rw-r--r--tests/format/junctions/full-path/subproject/project.conf2
-rw-r--r--tests/format/junctions/full-path/subproject/sub.txt1
-rw-r--r--tests/format/junctions/full-path/subproject/subsubproject.bst4
-rw-r--r--tests/format/junctions/full-path/subproject/subsubproject/project.conf2
-rw-r--r--tests/format/junctions/full-path/subproject/subsubproject/subsub.txt1
-rw-r--r--tests/format/junctions/full-path/subproject/subsubproject/subsubsubproject.bst4
-rw-r--r--tests/format/junctions/full-path/subproject/subsubproject/subsubsubproject/project.conf2
-rw-r--r--tests/format/junctions/full-path/subproject/subsubproject/subsubsubproject/subsubsub.txt1
-rw-r--r--tests/format/junctions/full-path/subproject/subsubproject/subsubsubproject/target.bst4
-rw-r--r--tests/format/junctions/full-path/subproject/subsubproject/target.bst4
-rw-r--r--tests/format/junctions/full-path/subproject/target.bst4
11 files changed, 29 insertions, 0 deletions
diff --git a/tests/format/junctions/full-path/subproject/project.conf b/tests/format/junctions/full-path/subproject/project.conf
new file mode 100644
index 000000000..39a53e2ab
--- /dev/null
+++ b/tests/format/junctions/full-path/subproject/project.conf
@@ -0,0 +1,2 @@
+name: subtest
+min-version: 2.0
diff --git a/tests/format/junctions/full-path/subproject/sub.txt b/tests/format/junctions/full-path/subproject/sub.txt
new file mode 100644
index 000000000..f73f3093f
--- /dev/null
+++ b/tests/format/junctions/full-path/subproject/sub.txt
@@ -0,0 +1 @@
+file
diff --git a/tests/format/junctions/full-path/subproject/subsubproject.bst b/tests/format/junctions/full-path/subproject/subsubproject.bst
new file mode 100644
index 000000000..f535ab0e0
--- /dev/null
+++ b/tests/format/junctions/full-path/subproject/subsubproject.bst
@@ -0,0 +1,4 @@
+kind: junction
+sources:
+- kind: local
+ path: subsubproject
diff --git a/tests/format/junctions/full-path/subproject/subsubproject/project.conf b/tests/format/junctions/full-path/subproject/subsubproject/project.conf
new file mode 100644
index 000000000..d11bcbb30
--- /dev/null
+++ b/tests/format/junctions/full-path/subproject/subsubproject/project.conf
@@ -0,0 +1,2 @@
+name: subsubtest
+min-version: 2.0
diff --git a/tests/format/junctions/full-path/subproject/subsubproject/subsub.txt b/tests/format/junctions/full-path/subproject/subsubproject/subsub.txt
new file mode 100644
index 000000000..f73f3093f
--- /dev/null
+++ b/tests/format/junctions/full-path/subproject/subsubproject/subsub.txt
@@ -0,0 +1 @@
+file
diff --git a/tests/format/junctions/full-path/subproject/subsubproject/subsubsubproject.bst b/tests/format/junctions/full-path/subproject/subsubproject/subsubsubproject.bst
new file mode 100644
index 000000000..bce64597b
--- /dev/null
+++ b/tests/format/junctions/full-path/subproject/subsubproject/subsubsubproject.bst
@@ -0,0 +1,4 @@
+kind: junction
+sources:
+- kind: local
+ path: subsubsubproject
diff --git a/tests/format/junctions/full-path/subproject/subsubproject/subsubsubproject/project.conf b/tests/format/junctions/full-path/subproject/subsubproject/subsubsubproject/project.conf
new file mode 100644
index 000000000..e508da808
--- /dev/null
+++ b/tests/format/junctions/full-path/subproject/subsubproject/subsubsubproject/project.conf
@@ -0,0 +1,2 @@
+name: subsubsubtest
+min-version: 2.0
diff --git a/tests/format/junctions/full-path/subproject/subsubproject/subsubsubproject/subsubsub.txt b/tests/format/junctions/full-path/subproject/subsubproject/subsubsubproject/subsubsub.txt
new file mode 100644
index 000000000..f73f3093f
--- /dev/null
+++ b/tests/format/junctions/full-path/subproject/subsubproject/subsubsubproject/subsubsub.txt
@@ -0,0 +1 @@
+file
diff --git a/tests/format/junctions/full-path/subproject/subsubproject/subsubsubproject/target.bst b/tests/format/junctions/full-path/subproject/subsubproject/subsubsubproject/target.bst
new file mode 100644
index 000000000..351c9a22d
--- /dev/null
+++ b/tests/format/junctions/full-path/subproject/subsubproject/subsubsubproject/target.bst
@@ -0,0 +1,4 @@
+kind: import
+sources:
+- kind: local
+ path: subsubsub.txt
diff --git a/tests/format/junctions/full-path/subproject/subsubproject/target.bst b/tests/format/junctions/full-path/subproject/subsubproject/target.bst
new file mode 100644
index 000000000..afafac601
--- /dev/null
+++ b/tests/format/junctions/full-path/subproject/subsubproject/target.bst
@@ -0,0 +1,4 @@
+kind: import
+sources:
+- kind: local
+ path: subsub.txt
diff --git a/tests/format/junctions/full-path/subproject/target.bst b/tests/format/junctions/full-path/subproject/target.bst
new file mode 100644
index 000000000..e24d9bbb4
--- /dev/null
+++ b/tests/format/junctions/full-path/subproject/target.bst
@@ -0,0 +1,4 @@
+kind: import
+sources:
+- kind: local
+ path: sub.txt