diff options
Diffstat (limited to 'tests/rep-info.testscript')
-rw-r--r-- | tests/rep-info.testscript | 115 |
1 files changed, 109 insertions, 6 deletions
diff --git a/tests/rep-info.testscript b/tests/rep-info.testscript index 8ea0e5b..2c02c8f 100644 --- a/tests/rep-info.testscript +++ b/tests/rep-info.testscript @@ -13,6 +13,8 @@ # | |-- foo-1.tar.gz # | `-- repositories.manifest # | +# |-- t15 (see pkg-build for details) +# | # `-- git # |-- libbar.git -> style-basic.git (prerequisite) # `-- style-basic.git @@ -20,7 +22,7 @@ # Prepare repositories used by tests if running in the local mode. # +if! $remote - rc = $rep_create 2>! + rc = [cmdline] $rep_create 2>! # Create the unsigned 'testing' repository. # @@ -35,6 +37,11 @@ $rc --key $key $out/signed &$out/signed/packages.manifest \ &$out/signed/signature.manifest + # Create the compatibility repository. + # + cp -r $src/t15 $out/compatibility + $rc $out/compatibility &$out/compatibility/packages.manifest --ignore-unknown + # Create git repositories. # $git_extract $src/git/libbar.tar @@ -109,8 +116,12 @@ $* --name $rep/testing >"pkg:build2.org/rep-info/testing ($rep/testing)" license: MIT url: http://www.example.org/foo email: foo-users@example.org + bootstrap-build:\ + project = foo + + \ location: foo-1.tar.gz - sha256sum: fee330a362a4f87ff42a954aa305b6446d541b7b60000ebcd2fbf68f2b1ae58e + sha256sum: 1d88df336611286cdbd84f5c1d87bedc774bc833e200de675e34d9b219c66cfc EOO : deep @@ -121,6 +132,10 @@ $* --name $rep/testing >"pkg:build2.org/rep-info/testing ($rep/testing)" : dir : { + # Note that on Windows we still use tar rather than bsdtar here, since + # the later fails for dangling symlinks and we have such symlinks in + # this repository archive. + # tar ($posix ? : --force-local) -xf $src/git/libbar.tar &state0/***; $* --type dir "state0/libbar.git" >>~%EOO%d; @@ -129,12 +144,21 @@ $* --name $rep/testing >"pkg:build2.org/rep-info/testing ($rep/testing)" version: 1.0.0+1 summary: libbar license: MIT - description: \ + description:\ TODO \ description-type: text/plain %.+ + bootstrap-build:\ + project = libbar + + using config + using version + using dist + + \ + %.+ EOO rm state0/libbar.git/libbar/README; @@ -158,23 +182,41 @@ $* --name $rep/testing >"pkg:build2.org/rep-info/testing ($rep/testing)" version: 1.0.0+1 summary: libbar license: MIT - description: \ + description:\ TODO \ description-type: text/plain %.+ + bootstrap-build:\ + project = libbar + + using config + using version + using dist + + \ + %.+ : name: libmbar version: 1.0.0 summary: libmbar license: MIT - description: \ + description:\ TODO \ description-type: text/plain %.+ + bootstrap-build:\ + project = libmbar + + using config + using version + using dist + + \ + %.+ EOO } } @@ -203,8 +245,12 @@ $* --name $rep/testing >"pkg:build2.org/rep-info/testing ($rep/testing)" license: MIT url: http://www.example.org/foo email: foo-users@example.org + bootstrap-build:\ + project = foo + + \ location: foo-1.tar.gz - sha256sum: fee330a362a4f87ff42a954aa305b6446d541b7b60000ebcd2fbf68f2b1ae58e + sha256sum: 1d88df336611286cdbd84f5c1d87bedc774bc833e200de675e34d9b219c66cfc EOO } } @@ -397,3 +443,60 @@ else EOO } } + +: compatibility +: +{ + : packages + : + { + $* --packages $rep/compatibility >>EOO + + libbar/1.0.0 + libbaz/1.0.0 + libbiz/1.0.0 + libfoo/1.0.0 + EOO + } + + : package-manifests-ignore-toolchain + : + { + $* --packages --manifest --ignore-unknown $rep/compatibility >>~%EOO% + : 1 + name: libbar + version: 1.0.0 + %.+ + depends: * build2 >= 0.16.0 + depends: * bpkg >= 0.16.0 + %.+ + : + name: libbaz + version: 1.0.0 + summary: libbaz + %.+ + depends: * build2 >= 65536.0.0 + depends: * bpkg >= 65536.0.0 + %.+ + : + name: libbiz + version: 1.0.0 + summary: libbiz + %.+ + : + name: libfoo + version: 1.0.0 + summary: libfoo + %.+ + EOO + } + + : package-manifests-fail + : + { + $* --packages --manifest $rep/compatibility 2>>~%EOE% != 0 + error: unable to satisfy constraint (build2 >= 65536.0.0) for package libbaz + % info: available build2 version is .+% + EOE + } +} |