aboutsummaryrefslogtreecommitdiff
path: root/tests/pkg-build.testscript
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2022-02-11 14:23:07 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2022-02-14 10:57:58 +0300
commitf01eb45f5b61d9396a5d433c8cf1411286af6eba (patch)
tree22272da2633906313cfb26cdb9f74b2e115d3d43 /tests/pkg-build.testscript
parentd1a894f8f862f36c40e6d21c3c1e1662e731a82d (diff)
Add support for reflect clause in tests package manifest value
Diffstat (limited to 'tests/pkg-build.testscript')
-rw-r--r--tests/pkg-build.testscript85
1 files changed, 85 insertions, 0 deletions
diff --git a/tests/pkg-build.testscript b/tests/pkg-build.testscript
index 13b2539..287074c 100644
--- a/tests/pkg-build.testscript
+++ b/tests/pkg-build.testscript
@@ -152,6 +152,12 @@
# | |-- foo-1.0.0.tar.gz -> libbaz, libbox
# | `-- repositories.manifest
# |
+# |-- t10
+# | |-- libfoo-bar-1.0.0.tar.gz -> libfoo-tests
+# | |-- libfoo-baz-1.0.0.tar.gz -> libfoo-tests
+# | |-- libfoo-tests-1.0.0.tar.gz
+# | `-- repositories.manifest
+# |
# `-- git
# |-- libbar.git -> style-basic.git (prerequisite repository)
# |-- libbaz.git
@@ -182,6 +188,7 @@ posix = ($cxx.target.class != 'windows')
cp -r $src/t7b $out/t7b && $rep_create $out/t7b &$out/t7b/packages.manifest
cp -r $src/t8a $out/t8a && $rep_create $out/t8a &$out/t8a/packages.manifest
cp -r $src/t9 $out/t9 && $rep_create $out/t9 &$out/t9/packages.manifest
+ cp -r $src/t10 $out/t10 && $rep_create $out/t10 &$out/t10/packages.manifest
# Create git repositories.
#
@@ -3581,6 +3588,84 @@ test.options += --no-progress
}
}
+: test-dependency
+:
+{
+ +$clone_cfg
+ +$rep_add $rep/t10 && $rep_fetch
+
+ : simultaneously
+ :
+ {
+ $clone_cfg;
+
+ $* libfoo-bar libfoo-tests 2>>~%EOE%;
+ fetched libfoo-bar/1.0.0
+ unpacked libfoo-bar/1.0.0
+ fetched libfoo-tests/1.0.0
+ unpacked libfoo-tests/1.0.0
+ configured libfoo-bar/1.0.0
+ configured libfoo-tests/1.0.0
+ %info: .+libfoo-bar-1.0.0.+ is up to date%
+ %info: .+libfoo-tests-1.0.0.+ is up to date%
+ updated libfoo-bar/1.0.0
+ updated libfoo-tests/1.0.0
+ EOE
+
+ cat cfg/libfoo-tests-1.0.0/build/config.build >>~%EOO%;
+ %.*
+ config.libfoo_tests.test = libfoo-bar
+ %.*
+ EOO
+
+ $pkg_drop libfoo-bar libfoo-tests
+ }
+
+ : sequentially
+ :
+ {
+ $clone_cfg;
+
+ $* libfoo-baz 2>>~%EOE%;
+ fetched libfoo-baz/1.0.0
+ unpacked libfoo-baz/1.0.0
+ configured libfoo-baz/1.0.0
+ %info: .+libfoo-baz-1.0.0.+ is up to date%
+ updated libfoo-baz/1.0.0
+ EOE
+
+ $* libfoo-tests 2>>~%EOE%;
+ fetched libfoo-tests/1.0.0
+ unpacked libfoo-tests/1.0.0
+ configured libfoo-tests/1.0.0
+ %info: .+libfoo-tests-1.0.0.+ is up to date%
+ updated libfoo-tests/1.0.0
+ EOE
+
+ cat cfg/libfoo-tests-1.0.0/build/config.build >>~%EOO%;
+ %.*
+ config.libfoo_tests.test = libfoo-baz
+ %.*
+ EOO
+
+ $pkg_drop libfoo-baz libfoo-tests
+ }
+
+ : tests-only
+ :
+ {
+ $clone_cfg;
+
+ $* libfoo-tests 2>>~%EOE% != 0
+ error: unable to select dependency alternative for package libfoo-tests/1.0.0
+ info: explicitly specify dependency packages to manually select the alternative
+ info: alternative: libfoo-bar
+ info: alternative: libfoo-baz
+ info: while satisfying libfoo-tests/1.0.0
+ EOE
+ }
+}
+
: dependent
:
{