summaryrefslogtreecommitdiff
path: root/test cases
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2018-02-27 21:40:32 +0200
committerGitHub <noreply@github.com>2018-02-27 21:40:32 +0200
commit59e7ea169f3d875b2dfefc0d7a41a2ea9eca08f0 (patch)
tree2bc543667d64e910b34be00fe7847fb6dbb3e8ab /test cases
parent16f80b4c506bba9839e30bd98fcbbafddcef3632 (diff)
parent4f8db1fe47056fa650236c9c89ddd4814a271174 (diff)
downloadmeson-59e7ea169f3d875b2dfefc0d7a41a2ea9eca08f0.tar.gz
Merge pull request #2311 from trhd/setups
Improve test setup selection.
Diffstat (limited to 'test cases')
-rw-r--r--test cases/unit/13 testsetup selection/main.c3
-rw-r--r--test cases/unit/13 testsetup selection/meson.build10
-rw-r--r--test cases/unit/13 testsetup selection/subprojects/bar/bar.c3
-rw-r--r--test cases/unit/13 testsetup selection/subprojects/bar/meson.build6
-rw-r--r--test cases/unit/13 testsetup selection/subprojects/foo/foo.c3
-rw-r--r--test cases/unit/13 testsetup selection/subprojects/foo/meson.build4
6 files changed, 29 insertions, 0 deletions
diff --git a/test cases/unit/13 testsetup selection/main.c b/test cases/unit/13 testsetup selection/main.c
new file mode 100644
index 000000000..cb3f7482f
--- /dev/null
+++ b/test cases/unit/13 testsetup selection/main.c
@@ -0,0 +1,3 @@
+int main() {
+ return 0;
+}
diff --git a/test cases/unit/13 testsetup selection/meson.build b/test cases/unit/13 testsetup selection/meson.build
new file mode 100644
index 000000000..ae996c5be
--- /dev/null
+++ b/test cases/unit/13 testsetup selection/meson.build
@@ -0,0 +1,10 @@
+project('main', 'c')
+
+main = executable('main', 'main.c')
+test('Test main', main)
+
+add_test_setup('worksforall')
+add_test_setup('missingfromfoo')
+
+subproject('foo')
+subproject('bar')
diff --git a/test cases/unit/13 testsetup selection/subprojects/bar/bar.c b/test cases/unit/13 testsetup selection/subprojects/bar/bar.c
new file mode 100644
index 000000000..cb3f7482f
--- /dev/null
+++ b/test cases/unit/13 testsetup selection/subprojects/bar/bar.c
@@ -0,0 +1,3 @@
+int main() {
+ return 0;
+}
diff --git a/test cases/unit/13 testsetup selection/subprojects/bar/meson.build b/test cases/unit/13 testsetup selection/subprojects/bar/meson.build
new file mode 100644
index 000000000..1155a88aa
--- /dev/null
+++ b/test cases/unit/13 testsetup selection/subprojects/bar/meson.build
@@ -0,0 +1,6 @@
+project('bar', 'c')
+bar = executable('bar', 'bar.c')
+test('Test bar', bar)
+add_test_setup('onlyinbar')
+add_test_setup('worksforall')
+add_test_setup('missingfromfoo')
diff --git a/test cases/unit/13 testsetup selection/subprojects/foo/foo.c b/test cases/unit/13 testsetup selection/subprojects/foo/foo.c
new file mode 100644
index 000000000..cb3f7482f
--- /dev/null
+++ b/test cases/unit/13 testsetup selection/subprojects/foo/foo.c
@@ -0,0 +1,3 @@
+int main() {
+ return 0;
+}
diff --git a/test cases/unit/13 testsetup selection/subprojects/foo/meson.build b/test cases/unit/13 testsetup selection/subprojects/foo/meson.build
new file mode 100644
index 000000000..2eef840cd
--- /dev/null
+++ b/test cases/unit/13 testsetup selection/subprojects/foo/meson.build
@@ -0,0 +1,4 @@
+project('foo', 'c')
+foo = executable('foo', 'foo.c')
+test('Test foo', foo)
+add_test_setup('worksforall')