diff options
-rw-r--r-- | bpkg/package.hxx | 2 | ||||
-rw-r--r-- | bpkg/package.xml | 6 | ||||
-rw-r--r-- | bpkg/rep-fetch.cxx | 6 | ||||
-rw-r--r-- | tests/common/satisfy/t10/libfoo-bar-1.0.0.tar.gz | bin | 0 -> 376 bytes | |||
-rw-r--r-- | tests/common/satisfy/t10/libfoo-baz-1.0.0.tar.gz | bin | 0 -> 376 bytes | |||
-rw-r--r-- | tests/common/satisfy/t10/libfoo-tests-1.0.0.tar.gz | bin | 0 -> 413 bytes | |||
l--------- | tests/common/satisfy/t10/repositories.manifest | 1 | ||||
-rw-r--r-- | tests/pkg-build.testscript | 85 | ||||
l--------- | tests/pkg-build/t10 | 1 |
9 files changed, 99 insertions, 2 deletions
diff --git a/bpkg/package.hxx b/bpkg/package.hxx index 93fcc9c..489f909 100644 --- a/bpkg/package.hxx +++ b/bpkg/package.hxx @@ -27,7 +27,7 @@ // #define DB_SCHEMA_VERSION_BASE 7 -#pragma db model version(DB_SCHEMA_VERSION_BASE, 15, closed) +#pragma db model version(DB_SCHEMA_VERSION_BASE, 16, closed) namespace bpkg { diff --git a/bpkg/package.xml b/bpkg/package.xml index 15e8846..7126cf3 100644 --- a/bpkg/package.xml +++ b/bpkg/package.xml @@ -1,4 +1,10 @@ <changelog xmlns="http://www.codesynthesis.com/xmlns/odb/changelog" database="sqlite" version="1"> + <changeset version="16"> + <alter-table name="main.available_package_tests"> + <add-column name="test_reflect" type="TEXT" null="true"/> + </alter-table> + </changeset> + <changeset version="15"> <alter-table name="main.available_package"> <add-column name="bootstrap_build" type="TEXT" null="true" default="''"/> diff --git a/bpkg/rep-fetch.cxx b/bpkg/rep-fetch.cxx index 69ddfd1..e232d24 100644 --- a/bpkg/rep-fetch.cxx +++ b/bpkg/rep-fetch.cxx @@ -1604,7 +1604,11 @@ namespace bpkg << package_string (p->id.name, p->version); } - dependency_alternative da; + dependency_alternative da (nullopt /* enable */, + td.reflect, + nullopt /* prefer */, + nullopt /* accept */, + nullopt /* require */); da.push_back ( dependency {p->id.name, version_constraint (p->version)}); 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 Binary files differnew file mode 100644 index 0000000..30ae081 --- /dev/null +++ b/tests/common/satisfy/t10/libfoo-bar-1.0.0.tar.gz 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 Binary files differnew file mode 100644 index 0000000..1263394 --- /dev/null +++ b/tests/common/satisfy/t10/libfoo-baz-1.0.0.tar.gz 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 Binary files differnew file mode 100644 index 0000000..594a9b8 --- /dev/null +++ b/tests/common/satisfy/t10/libfoo-tests-1.0.0.tar.gz 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 |