aboutsummaryrefslogtreecommitdiff
path: root/tests
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
parentd1a894f8f862f36c40e6d21c3c1e1662e731a82d (diff)
Add support for reflect clause in tests package manifest value
Diffstat (limited to 'tests')
-rw-r--r--tests/common/satisfy/t10/libfoo-bar-1.0.0.tar.gzbin0 -> 376 bytes
-rw-r--r--tests/common/satisfy/t10/libfoo-baz-1.0.0.tar.gzbin0 -> 376 bytes
-rw-r--r--tests/common/satisfy/t10/libfoo-tests-1.0.0.tar.gzbin0 -> 413 bytes
l---------tests/common/satisfy/t10/repositories.manifest1
-rw-r--r--tests/pkg-build.testscript85
l---------tests/pkg-build/t101
6 files changed, 87 insertions, 0 deletions
diff --git a/tests/common/satisfy/t10/libfoo-bar-1.0.0.tar.gz b/tests/common/satisfy/t10/libfoo-bar-1.0.0.tar.gz
new file mode 100644
index 0000000..30ae081
--- /dev/null
+++ b/tests/common/satisfy/t10/libfoo-bar-1.0.0.tar.gz
Binary files differ
diff --git a/tests/common/satisfy/t10/libfoo-baz-1.0.0.tar.gz b/tests/common/satisfy/t10/libfoo-baz-1.0.0.tar.gz
new file mode 100644
index 0000000..1263394
--- /dev/null
+++ b/tests/common/satisfy/t10/libfoo-baz-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
new file mode 100644
index 0000000..594a9b8
--- /dev/null
+++ b/tests/common/satisfy/t10/libfoo-tests-1.0.0.tar.gz
Binary files differ
diff --git a/tests/common/satisfy/t10/repositories.manifest b/tests/common/satisfy/t10/repositories.manifest
new file mode 120000
index 0000000..0d4767a
--- /dev/null
+++ b/tests/common/satisfy/t10/repositories.manifest
@@ -0,0 +1 @@
+../repositories.manifest \ No newline at end of file
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
:
{
diff --git a/tests/pkg-build/t10 b/tests/pkg-build/t10
new file mode 120000
index 0000000..0208f77
--- /dev/null
+++ b/tests/pkg-build/t10
@@ -0,0 +1 @@
+../common/satisfy/t10 \ No newline at end of file