From c77d65b4472ef0e2734ffde5556e279e62bb964a Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Wed, 31 Jan 2024 18:27:27 +0300 Subject: Add support for enable clause in tests package manifest value --- tests/common/satisfy/t10/libbar-baz-1.0.0.tar.gz | Bin 0 -> 399 bytes tests/common/satisfy/t10/libbar-foo-1.0.0.tar.gz | Bin 0 -> 401 bytes tests/common/satisfy/t10/libbar-tests-1.0.0.tar.gz | Bin 0 -> 632 bytes tests/common/satisfy/t10/libfoo-tests-1.0.0.tar.gz | Bin 413 -> 492 bytes tests/pkg-build.testscript | 156 ++++++++++++++++++++- 5 files changed, 154 insertions(+), 2 deletions(-) create mode 100644 tests/common/satisfy/t10/libbar-baz-1.0.0.tar.gz create mode 100644 tests/common/satisfy/t10/libbar-foo-1.0.0.tar.gz create mode 100644 tests/common/satisfy/t10/libbar-tests-1.0.0.tar.gz (limited to 'tests') 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 Binary files /dev/null and b/tests/common/satisfy/t10/libbar-baz-1.0.0.tar.gz 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 Binary files /dev/null and b/tests/common/satisfy/t10/libbar-foo-1.0.0.tar.gz 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 Binary files /dev/null and b/tests/common/satisfy/t10/libbar-tests-1.0.0.tar.gz 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 Binary files a/tests/common/satisfy/t10/libfoo-tests-1.0.0.tar.gz and b/tests/common/satisfy/t10/libfoo-tests-1.0.0.tar.gz 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 -- cgit v1.1