aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2024-01-31 18:27:27 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2024-02-02 13:43:02 +0300
commitc77d65b4472ef0e2734ffde5556e279e62bb964a (patch)
treee24d4b47690c6a9e8649ef8cfe7a85a57499635d /tests
parentc835121db614efa56093dde7a1557372a43ab09b (diff)
Add support for enable clause in tests package manifest value
Diffstat (limited to 'tests')
-rw-r--r--tests/common/satisfy/t10/libbar-baz-1.0.0.tar.gzbin0 -> 399 bytes
-rw-r--r--tests/common/satisfy/t10/libbar-foo-1.0.0.tar.gzbin0 -> 401 bytes
-rw-r--r--tests/common/satisfy/t10/libbar-tests-1.0.0.tar.gzbin0 -> 632 bytes
-rw-r--r--tests/common/satisfy/t10/libfoo-tests-1.0.0.tar.gzbin413 -> 492 bytes
-rw-r--r--tests/pkg-build.testscript156
5 files changed, 154 insertions, 2 deletions
diff --git a/tests/common/satisfy/t10/libbar-baz-1.0.0.tar.gz b/tests/common/satisfy/t10/libbar-baz-1.0.0.tar.gz
new file mode 100644
index 0000000..9075ee4
--- /dev/null
+++ b/tests/common/satisfy/t10/libbar-baz-1.0.0.tar.gz
Binary files differ
diff --git a/tests/common/satisfy/t10/libbar-foo-1.0.0.tar.gz b/tests/common/satisfy/t10/libbar-foo-1.0.0.tar.gz
new file mode 100644
index 0000000..2dd5e69
--- /dev/null
+++ b/tests/common/satisfy/t10/libbar-foo-1.0.0.tar.gz
Binary files differ
diff --git a/tests/common/satisfy/t10/libbar-tests-1.0.0.tar.gz b/tests/common/satisfy/t10/libbar-tests-1.0.0.tar.gz
new file mode 100644
index 0000000..7f587d9
--- /dev/null
+++ b/tests/common/satisfy/t10/libbar-tests-1.0.0.tar.gz
Binary files differ
diff --git a/tests/common/satisfy/t10/libfoo-tests-1.0.0.tar.gz b/tests/common/satisfy/t10/libfoo-tests-1.0.0.tar.gz
index 594a9b8..bc58a14 100644
--- a/tests/common/satisfy/t10/libfoo-tests-1.0.0.tar.gz
+++ b/tests/common/satisfy/t10/libfoo-tests-1.0.0.tar.gz
Binary files differ
diff --git a/tests/pkg-build.testscript b/tests/pkg-build.testscript
index 9e25f5f..9d19846 100644
--- a/tests/pkg-build.testscript
+++ b/tests/pkg-build.testscript
@@ -251,9 +251,12 @@
# | `-- repositories.manifest
# |
# |-- t10
-# | |-- libfoo-bar-1.0.0.tar.gz -> libfoo-tests
-# | |-- libfoo-baz-1.0.0.tar.gz -> libfoo-tests
+# | |-- libfoo-bar-1.0.0.tar.gz (tests) -> libfoo-tests
+# | |-- libfoo-baz-1.0.0.tar.gz (tests) -> libfoo-tests
# | |-- libfoo-tests-1.0.0.tar.gz
+# | |-- libbar-foo-1.0.0.tar.gz (tests) -> libbar-tests
+# | |-- libbar-baz-1.0.0.tar.gz (tests) -> libbar-tests
+# | |-- libbar-tests-1.0.0.tar.gz -> ? libbar-foo, ? libbar-baz
# | `-- repositories.manifest
# |
# | NOTE: remember to update
@@ -26379,6 +26382,155 @@ test.arguments += --sys-no-query
info: while satisfying libfoo-tests/1.0.0
EOE
}
+
+ : reflection-foo
+ :
+ {
+ $clone_cfg;
+
+ $* libbar-tests 2>>EOE != 0;
+ error: unable to select dependency alternative for package libbar-tests/1.0.0
+ info: explicitly specify dependency packages to manually select the alternative
+ info: alternative: libbar-baz
+ info: alternative: libbar-foo
+ info: while satisfying libbar-tests/1.0.0
+ EOE
+
+ $* libbar-foo libbar-tests 2>>~%EOE%;
+ fetched libbar-foo/1.0.0
+ unpacked libbar-foo/1.0.0
+ fetched libbar-tests/1.0.0
+ unpacked libbar-tests/1.0.0
+ configured libbar-foo/1.0.0
+ configured libbar-tests/1.0.0
+ %info: .+libbar-foo-1.0.0.+ is up to date%
+ %info: .+libbar-tests-1.0.0.+ is up to date%
+ updated libbar-foo/1.0.0
+ updated libbar-tests/1.0.0
+ EOE
+
+ cat cfg/libbar-tests-1.0.0/build/config.build >>~%EOO%;
+ %.*
+ config.libbar_tests.test = libbar-foo
+ %.*
+ EOO
+
+ $* libbar-baz 2>>~%EOE%;
+ fetched libbar-baz/1.0.0
+ unpacked libbar-baz/1.0.0
+ configured libbar-baz/1.0.0
+ %info: .+libbar-baz-1.0.0.+ is up to date%
+ updated libbar-baz/1.0.0
+ EOE
+
+ cat cfg/libbar-tests-1.0.0/build/config.build >>~%EOO%;
+ %.*
+ config.libbar_tests.test = libbar-foo
+ %.*
+ EOO
+
+ $pkg_status -r >>EOO;
+ !libbar-foo configured 1.0.0
+ !libbar-tests configured 1.0.0
+ !libbar-foo configured 1.0.0
+ !libbar-baz configured 1.0.0
+ EOO
+
+ $pkg_drop libbar-foo libbar-baz libbar-tests
+ }
+
+ : reflection-baz
+ :
+ {
+ $clone_cfg;
+
+ $* libbar-baz libbar-tests 2>>~%EOE%;
+ fetched libbar-baz/1.0.0
+ unpacked libbar-baz/1.0.0
+ fetched libbar-tests/1.0.0
+ unpacked libbar-tests/1.0.0
+ configured libbar-baz/1.0.0
+ configured libbar-tests/1.0.0
+ %info: .+libbar-baz-1.0.0.+ is up to date%
+ %info: .+libbar-tests-1.0.0.+ is up to date%
+ updated libbar-baz/1.0.0
+ updated libbar-tests/1.0.0
+ EOE
+
+ cat cfg/libbar-tests-1.0.0/build/config.build >>~%EOO%;
+ %.*
+ config.libbar_tests.test = libbar-baz
+ %.*
+ EOO
+
+ $* libbar-foo 2>>~%EOE%;
+ fetched libbar-foo/1.0.0
+ unpacked libbar-foo/1.0.0
+ configured libbar-foo/1.0.0
+ %info: .+libbar-foo-1.0.0.+ is up to date%
+ updated libbar-foo/1.0.0
+ EOE
+
+ cat cfg/libbar-tests-1.0.0/build/config.build >>~%EOO%;
+ %.*
+ config.libbar_tests.test = libbar-baz
+ %.*
+ EOO
+
+ $pkg_status -r >>EOO;
+ !libbar-baz configured 1.0.0
+ !libbar-tests configured 1.0.0
+ !libbar-baz configured 1.0.0
+ !libbar-foo configured 1.0.0
+ EOO
+
+ $pkg_drop libbar-baz libbar-foo libbar-tests
+ }
+
+ : reflection-both
+ :
+ {
+ $clone_cfg;
+
+ $* libbar-foo libbar-baz libbar-tests 2>!;
+
+ cat cfg/libbar-tests-1.0.0/build/config.build >>~%EOO%;
+ %.*
+ config.libbar_tests.test = libbar-baz
+ %.*
+ EOO
+
+ $pkg_status -r >>EOO;
+ !libbar-foo configured 1.0.0
+ !libbar-baz configured 1.0.0
+ !libbar-tests configured 1.0.0
+ !libbar-baz configured 1.0.0
+ EOO
+
+ $pkg_drop libbar-foo libbar-baz libbar-tests
+ }
+
+ : configure-explicit
+ :
+ {
+ $clone_cfg;
+
+ $* --yes "config.libbar_tests.test = libbar-foo libbar-baz" -- libbar-tests 2>!;
+
+ cat cfg/libbar-tests-1.0.0/build/config.build >>~%EOO%;
+ %.*
+ config.libbar_tests.test = libbar-foo libbar-baz
+ %.*
+ EOO
+
+ $pkg_status -r >>EOO;
+ !libbar-tests configured 1.0.0
+ libbar-baz configured 1.0.0
+ libbar-foo configured 1.0.0
+ EOO
+
+ $pkg_drop libbar-tests
+ }
}
: dependent