aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2019-08-30 20:56:26 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2019-09-05 16:55:45 +0300
commit1ad6dad8da0d51e9522f9d27cf48531fa23b24ba (patch)
tree4f53f85678348e605d282bad20b327653faa0729 /tests
parent7b5a0b55569331560f9cb6439ee818c3ce5d8428 (diff)
Adapt to optional package revision
Diffstat (limited to 'tests')
-rw-r--r--tests/common/satisfy/libbar-1.1.1.tar.gzbin0 -> 367 bytes
-rw-r--r--tests/common/satisfy/libfoo-1.1.0+1.tar.gzbin0 -> 353 bytes
l---------tests/common/satisfy/t4e/libbar-1.1.0.tar.gz1
l---------tests/common/satisfy/t4e/libbar-1.1.1.tar.gz1
l---------tests/common/satisfy/t4e/libfoo-1.1.0+1.tar.gz1
-rw-r--r--tests/common/satisfy/t4e/repositories.manifest4
-rw-r--r--tests/pkg-build.testscript64
l---------tests/pkg-build/t4e1
-rw-r--r--tests/pkg-status.testscript30
9 files changed, 98 insertions, 4 deletions
diff --git a/tests/common/satisfy/libbar-1.1.1.tar.gz b/tests/common/satisfy/libbar-1.1.1.tar.gz
new file mode 100644
index 0000000..b4b0bb7
--- /dev/null
+++ b/tests/common/satisfy/libbar-1.1.1.tar.gz
Binary files differ
diff --git a/tests/common/satisfy/libfoo-1.1.0+1.tar.gz b/tests/common/satisfy/libfoo-1.1.0+1.tar.gz
new file mode 100644
index 0000000..8cc49aa
--- /dev/null
+++ b/tests/common/satisfy/libfoo-1.1.0+1.tar.gz
Binary files differ
diff --git a/tests/common/satisfy/t4e/libbar-1.1.0.tar.gz b/tests/common/satisfy/t4e/libbar-1.1.0.tar.gz
new file mode 120000
index 0000000..b9a2de5
--- /dev/null
+++ b/tests/common/satisfy/t4e/libbar-1.1.0.tar.gz
@@ -0,0 +1 @@
+../libbar-1.1.0.tar.gz \ No newline at end of file
diff --git a/tests/common/satisfy/t4e/libbar-1.1.1.tar.gz b/tests/common/satisfy/t4e/libbar-1.1.1.tar.gz
new file mode 120000
index 0000000..0784aba
--- /dev/null
+++ b/tests/common/satisfy/t4e/libbar-1.1.1.tar.gz
@@ -0,0 +1 @@
+../libbar-1.1.1.tar.gz \ No newline at end of file
diff --git a/tests/common/satisfy/t4e/libfoo-1.1.0+1.tar.gz b/tests/common/satisfy/t4e/libfoo-1.1.0+1.tar.gz
new file mode 120000
index 0000000..ca9c01a
--- /dev/null
+++ b/tests/common/satisfy/t4e/libfoo-1.1.0+1.tar.gz
@@ -0,0 +1 @@
+../libfoo-1.1.0+1.tar.gz \ No newline at end of file
diff --git a/tests/common/satisfy/t4e/repositories.manifest b/tests/common/satisfy/t4e/repositories.manifest
new file mode 100644
index 0000000..4cc7c0a
--- /dev/null
+++ b/tests/common/satisfy/t4e/repositories.manifest
@@ -0,0 +1,4 @@
+: 1
+:
+location: ../t4a
+role: complement
diff --git a/tests/pkg-build.testscript b/tests/pkg-build.testscript
index 4465081..6ce1689 100644
--- a/tests/pkg-build.testscript
+++ b/tests/pkg-build.testscript
@@ -10,8 +10,8 @@
# Source repository:
#
# pkg-build
-# |-- libbar-1.0.0.tar.gz
-# |-- libbaz-1.1.0.tar.gz
+# |-- libbar-1.0.0.tar.gz -> libfoo
+# |-- libbaz-1.1.0.tar.gz -> libfoo, libbar
# |-- libfix-0.0.1.tar.gz
# |-- libfoo-0.0.1.tar.gz -> libfix
# |-- libfoo-1.0.0.tar.gz
@@ -95,6 +95,10 @@
# | |-- libfox-1.0.0.tar.gz
# | `-- repositories.manifest
# |
+# |-- t4e
+# | |-- libfoo-1.1.0+1.tar.gz
+# | `-- repositories.manifest
+# |
# |-- t5
# | |-- libbar-1.2.0.tar.gz
# | `-- repositories.manifest
@@ -131,6 +135,7 @@
cp -r $src/t4b $out/t4b && $rep_create $out/t4b &$out/t4b/packages.manifest
cp -r $src/t4c $out/t4c && $rep_create $out/t4c &$out/t4c/packages.manifest
cp -r $src/t4d $out/t4d && $rep_create $out/t4d &$out/t4d/packages.manifest
+ cp -r $src/t4e $out/t4e && $rep_create $out/t4e &$out/t4e/packages.manifest
cp -r $src/t5 $out/t5 && $rep_create $out/t5 &$out/t5/packages.manifest
cp -r $src/t6 $out/t6 && $rep_create $out/t6 &$out/t6/packages.manifest
@@ -315,6 +320,33 @@ test.options += --no-progress
EOE
}
}
+
+ : revision
+ :
+ {
+ +$clone_root_cfg
+ +$rep_add $rep/t4e && $rep_fetch
+
+ : latest
+ :
+ {
+ $clone_cfg;
+
+ $* libfoo/1.1.0 >>EOO
+ new libfoo/1.1.0+1
+ EOO
+ }
+
+ : zero
+ :
+ {
+ $clone_cfg;
+
+ $* libfoo/1.1.0+0 >>EOO
+ new libfoo/1.1.0
+ EOO
+ }
+ }
}
: libbar-libfoo
@@ -420,6 +452,34 @@ test.options += --no-progress
$pkg_purge libfoo 2>'purged libfoo/1.1.0'
}
}
+
+ : dependency-revision
+ :
+ {
+ +$clone_root_cfg && $rep_add $rep/t4e && $rep_fetch
+
+ : latest
+ :
+ {
+ $clone_cfg;
+
+ $* libbar/1.1.0 >>EOO
+ new libfoo/1.1.0+1 (required by libbar)
+ new libbar/1.1.0
+ EOO
+ }
+
+ : zero
+ :
+ {
+ $clone_cfg;
+
+ $* libbar/1.1.1 >>EOO
+ new libfoo/1.1.0 (required by libbar)
+ new libbar/1.1.1
+ EOO
+ }
+ }
}
: libbaz-libbar
diff --git a/tests/pkg-build/t4e b/tests/pkg-build/t4e
new file mode 120000
index 0000000..9cd01c8
--- /dev/null
+++ b/tests/pkg-build/t4e
@@ -0,0 +1 @@
+../common/satisfy/t4e \ No newline at end of file
diff --git a/tests/pkg-status.testscript b/tests/pkg-status.testscript
index 39ea85a..1ac3a97 100644
--- a/tests/pkg-status.testscript
+++ b/tests/pkg-status.testscript
@@ -94,6 +94,11 @@ rep_fetch += -d cfg --auth all --trust-yes 2>!
$clone_cfg;
$* libfoo/1.0.0 >'libfoo available 1.0.0'
+ : libfoo-1.0.0+0
+ :
+ $clone_cfg;
+ $* libfoo/1.0.0+0 >'libfoo available 1.0.0'
+
: libfoo
:
$clone_cfg;
@@ -147,9 +152,30 @@ rep_fetch += -d cfg --auth all --trust-yes 2>!
: testing
:
{
- $clone_cfg ./ && $rep_add $rep/testing && $rep_fetch;
+ +$clone_cfg ./ && $rep_add $rep/testing && $rep_fetch
+
+ clone_cfg = cp -r ../cfg ./
+
+ : no-version
+ :
+ {
+ $clone_cfg;
+ $* libbar >'libbar available [1.1.0+1] 1.1.0 1.0.0+1 1.0.0'
+ }
- $* libbar >'libbar available [1.1.0+1] 1.1.0 1.0.0+1 1.0.0'
+ : no-revision
+ :
+ {
+ $clone_cfg;
+ $* libbar/1.0.0 >'libbar available 1.0.0+1 1.0.0'
+ }
+
+ : zero-revision
+ :
+ {
+ $clone_cfg;
+ $* libbar/1.0.0+0 >'libbar available 1.0.0'
+ }
}
: unstable