aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/common/compatibility/t15/libbar-1.0.0.tar.gzbin0 -> 442 bytes
-rw-r--r--tests/common/compatibility/t15/libbaz-1.0.0.tar.gzbin0 -> 442 bytes
-rw-r--r--tests/common/compatibility/t15/libbiz-1.0.0.tar.gzbin0 -> 422 bytes
-rw-r--r--tests/common/compatibility/t15/libfoo-1.0.0.tar.gzbin0 -> 423 bytes
-rw-r--r--tests/common/compatibility/t15/repositories.manifest1
-rw-r--r--tests/pkg-build.testscript62
l---------tests/pkg-build/t151
-rw-r--r--tests/pkg-verify.testscript27
l---------tests/pkg-verify/libbaz-1.0.0.tar.gz1
-rw-r--r--tests/rep-info.testscript64
l---------tests/rep-info/t151
11 files changed, 157 insertions, 0 deletions
diff --git a/tests/common/compatibility/t15/libbar-1.0.0.tar.gz b/tests/common/compatibility/t15/libbar-1.0.0.tar.gz
new file mode 100644
index 0000000..2c741b2
--- /dev/null
+++ b/tests/common/compatibility/t15/libbar-1.0.0.tar.gz
Binary files differ
diff --git a/tests/common/compatibility/t15/libbaz-1.0.0.tar.gz b/tests/common/compatibility/t15/libbaz-1.0.0.tar.gz
new file mode 100644
index 0000000..07e6d04
--- /dev/null
+++ b/tests/common/compatibility/t15/libbaz-1.0.0.tar.gz
Binary files differ
diff --git a/tests/common/compatibility/t15/libbiz-1.0.0.tar.gz b/tests/common/compatibility/t15/libbiz-1.0.0.tar.gz
new file mode 100644
index 0000000..52ee52a
--- /dev/null
+++ b/tests/common/compatibility/t15/libbiz-1.0.0.tar.gz
Binary files differ
diff --git a/tests/common/compatibility/t15/libfoo-1.0.0.tar.gz b/tests/common/compatibility/t15/libfoo-1.0.0.tar.gz
new file mode 100644
index 0000000..be052c2
--- /dev/null
+++ b/tests/common/compatibility/t15/libfoo-1.0.0.tar.gz
Binary files differ
diff --git a/tests/common/compatibility/t15/repositories.manifest b/tests/common/compatibility/t15/repositories.manifest
new file mode 100644
index 0000000..5b70556
--- /dev/null
+++ b/tests/common/compatibility/t15/repositories.manifest
@@ -0,0 +1 @@
+: 1
diff --git a/tests/pkg-build.testscript b/tests/pkg-build.testscript
index 80e83a2..a3149ae 100644
--- a/tests/pkg-build.testscript
+++ b/tests/pkg-build.testscript
@@ -479,6 +479,7 @@ posix = ($cxx.target.class != 'windows')
cp -r $src/t14e $out/t14e && $rep_create $out/t14e &$out/t14e/packages.manifest
cp -r $src/t14f $out/t14f && $rep_create $out/t14f &$out/t14f/packages.manifest
cp -r $src/t14i $out/t14i && $rep_create $out/t14i &$out/t14i/packages.manifest
+ cp -r $src/t15 $out/t15 && $rep_create $out/t15 &$out/t15/packages.manifest --ignore-unknown
# Create git repositories.
#
@@ -20295,3 +20296,64 @@ else
}
}
}
+
+: compatibility
+:
+{
+ +$clone_cfg
+ +$rep_add $rep/t15 && $rep_fetch
+
+ test.arguments += --yes
+
+ : toolchain
+ :
+ {
+ +$clone_cfg
+
+ : build-satisfied
+ :
+ {
+ $clone_cfg;
+
+ $* libfoo libbar 2>>~%EOE%;
+ fetched libfoo/1.0.0
+ unpacked libfoo/1.0.0
+ fetched libbar/1.0.0
+ unpacked libbar/1.0.0
+ configured libfoo/1.0.0
+ configured libbar/1.0.0
+ %info: .+libfoo-1.0.0.+ is up to date%
+ %info: .+libbar-1.0.0.+ is up to date%
+ updated libfoo/1.0.0
+ updated libbar/1.0.0
+ EOE
+
+ $pkg_drop libfoo libbar
+ }
+
+ : build-fail-unsatisfied
+ :
+ {
+ $clone_cfg;
+
+ $* libbaz 2>>~%EOE% != 0
+ error: unable to satisfy constraint (build2 >= 65536.0.0) for package libbaz
+ % info: available build2 version is .+%
+ info: while satisfying libbaz/1.0.0
+ EOE
+ }
+
+ : build-fail-unsatisfied-dependency
+ :
+ {
+ $clone_cfg;
+
+ $* libbiz 2>>~%EOE% != 0
+ error: unable to satisfy constraint (build2 >= 65536.0.0) for package libbaz
+ % info: available build2 version is .+%
+ info: while satisfying libbaz/1.0.0
+ info: while satisfying libbiz/1.0.0
+ EOE
+ }
+ }
+}
diff --git a/tests/pkg-build/t15 b/tests/pkg-build/t15
new file mode 120000
index 0000000..c7ad857
--- /dev/null
+++ b/tests/pkg-build/t15
@@ -0,0 +1 @@
+../common/compatibility/t15 \ No newline at end of file
diff --git a/tests/pkg-verify.testscript b/tests/pkg-verify.testscript
index 7e7b5f3..8057aab 100644
--- a/tests/pkg-verify.testscript
+++ b/tests/pkg-verify.testscript
@@ -8,6 +8,7 @@
# pkg-verify
# |-- foo-1.tar.gz
# |-- foo-2.tar.gz (manifest with unknown name)
+# |-- libbaz-1.0.0.tar.gz (manifest with unsatisfiable toolchain constraint)
# `-- not-a-package.tar.gz
: valid-package
@@ -137,3 +138,29 @@ $* --ignore-unknown --manifest $src/foo-2.tar.gz >>EOO
%error: unable to find bootstrap.build file in package archive .+/foo-3.tar.gz%
EOE
}
+
+: compatibility
+:
+{
+ : fail
+ :
+ $* --manifest $src/libbaz-1.0.0.tar.gz 2>>/~%EOE% != 0
+ %error: unable to satisfy constraint \(build2 >= 65536.0.0\) for package .+/libbaz-1.0.0.tar.gz%
+ % info: available build2 version is .+%
+ EOE
+
+ : success
+ :
+ $* --manifest --ignore-unknown $src/libbaz-1.0.0.tar.gz >>EOO
+ : 1
+ name: libbaz
+ version: 1.0.0
+ summary: libbaz
+ license: MIT
+ description: libbaz library
+ url: http://example.org
+ email: pkg@example.org
+ depends: * build2 >= 65536.0.0
+ depends: * bpkg >= 65536.0.0
+ EOO
+}
diff --git a/tests/pkg-verify/libbaz-1.0.0.tar.gz b/tests/pkg-verify/libbaz-1.0.0.tar.gz
new file mode 120000
index 0000000..a95a5dc
--- /dev/null
+++ b/tests/pkg-verify/libbaz-1.0.0.tar.gz
@@ -0,0 +1 @@
+../common/compatibility/t15/libbaz-1.0.0.tar.gz \ No newline at end of file
diff --git a/tests/rep-info.testscript b/tests/rep-info.testscript
index 8db405d..c5f2d3a 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
@@ -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
@@ -432,3 +439,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
+ }
+}
diff --git a/tests/rep-info/t15 b/tests/rep-info/t15
new file mode 120000
index 0000000..c7ad857
--- /dev/null
+++ b/tests/rep-info/t15
@@ -0,0 +1 @@
+../common/compatibility/t15 \ No newline at end of file