summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/selfupgrade.repo37
-rw-r--r--test/selfupgrade1.installed18
-rw-r--r--test/selfupgrade1.test10
-rw-r--r--test/selfupgrade2.installed12
-rw-r--r--test/selfupgrade2.test11
-rw-r--r--test/selfupgrade3.installed18
-rw-r--r--test/selfupgrade3.test7
-rw-r--r--test/selfupgrade4.test7
-rwxr-xr-xtest/solver.sh2
9 files changed, 121 insertions, 1 deletions
diff --git a/test/selfupgrade.repo b/test/selfupgrade.repo
new file mode 100644
index 0000000..44a7ca2
--- /dev/null
+++ b/test/selfupgrade.repo
@@ -0,0 +1,37 @@
+C:Q1EyN512pAOBJWKMR89pp/C66o+OE=
+P:apk-tools
+V:1
+S:1
+I:1
+D:libcrypto
+
+C:Q1EyN534pAOBJWKMR89pp/CFFo+OF=
+P:apk-tools
+V:2
+S:1
+I:1
+D:libcrypto>=2
+
+C:Q1eVpk56fqZAukAXFYbgwt4xAEEEe=
+P:libcrypto
+V:1
+S:1
+I:1
+
+C:Q1eVpka78qZAukAXFYbgwt4xAEFFe=
+P:libcrypto
+V:2
+S:1
+I:1
+
+C:Q1EyN5A77AOBJWKMR89pp/CFFo+OE=
+P:application
+V:1
+S:1
+I:1
+
+C:Q1EyN5A55AOBJWKMR89pp/CFFF+OE=
+P:application
+V:2
+S:1
+I:1
diff --git a/test/selfupgrade1.installed b/test/selfupgrade1.installed
new file mode 100644
index 0000000..5a7b052
--- /dev/null
+++ b/test/selfupgrade1.installed
@@ -0,0 +1,18 @@
+C:Q1EyN512pAOBJWKMR89pp/C66o+OE=
+P:apk-tools
+V:1
+S:1
+I:1
+D:libcrypto
+
+C:Q1eVpk56fqZAukAXFYbgwt4xAEEEe=
+P:libcrypto
+V:1
+S:1
+I:1
+
+C:Q1EyN5A77AOBJWKMR89pp/CFFo+OE=
+P:application
+V:1
+S:1
+I:1
diff --git a/test/selfupgrade1.test b/test/selfupgrade1.test
new file mode 100644
index 0000000..8afa133
--- /dev/null
+++ b/test/selfupgrade1.test
@@ -0,0 +1,10 @@
+@ARGS
+--test-repo selfupgrade.repo
+--test-instdb selfupgrade1.installed
+--test-world "apk-tools application"
+--self-upgrade-only
+upgrade
+@EXPECT
+Upgrading critical system libraries and apk-tools:
+(1/2) Upgrading libcrypto (1 -> 2)
+(2/2) Upgrading apk-tools (1 -> 2)
diff --git a/test/selfupgrade2.installed b/test/selfupgrade2.installed
new file mode 100644
index 0000000..1b0d0c8
--- /dev/null
+++ b/test/selfupgrade2.installed
@@ -0,0 +1,12 @@
+C:Q1EyN534pAOBJWKMR89pp/CFFo+OF=
+P:apk-tools
+V:2
+S:1
+I:1
+D:libcrypto>=2
+
+C:Q1eVpka78qZAukAXFYbgwt4xAEFFe=
+P:libcrypto
+V:2
+S:1
+I:1
diff --git a/test/selfupgrade2.test b/test/selfupgrade2.test
new file mode 100644
index 0000000..f0ca054
--- /dev/null
+++ b/test/selfupgrade2.test
@@ -0,0 +1,11 @@
+@ARGS
+--test-repo selfupgrade.repo
+--test-instdb selfupgrade1.installed
+--test-world apk-tools
+--self-upgrade-only
+upgrade
+@EXPECT
+Upgrading critical system libraries and apk-tools:
+(1/3) Purging application (1)
+(2/3) Upgrading libcrypto (1 -> 2)
+(3/3) Upgrading apk-tools (1 -> 2)
diff --git a/test/selfupgrade3.installed b/test/selfupgrade3.installed
new file mode 100644
index 0000000..701d3de
--- /dev/null
+++ b/test/selfupgrade3.installed
@@ -0,0 +1,18 @@
+C:Q1EyN534pAOBJWKMR89pp/CFFo+OF=
+P:apk-tools
+V:2
+S:1
+I:1
+D:libcrypto>=2
+
+C:Q1eVpka78qZAukAXFYbgwt4xAEFFe=
+P:libcrypto
+V:2
+S:1
+I:1
+
+C:Q1EyN5A55AOBJWKMR89pp/CFFF+OE=
+P:application
+V:2
+S:1
+I:1
diff --git a/test/selfupgrade3.test b/test/selfupgrade3.test
new file mode 100644
index 0000000..ec266d9
--- /dev/null
+++ b/test/selfupgrade3.test
@@ -0,0 +1,7 @@
+@ARGS
+--test-repo selfupgrade.repo
+--test-instdb selfupgrade2.installed
+--test-world "apk-tools application"
+--self-upgrade-only
+upgrade
+@EXPECT
diff --git a/test/selfupgrade4.test b/test/selfupgrade4.test
new file mode 100644
index 0000000..1b941ef
--- /dev/null
+++ b/test/selfupgrade4.test
@@ -0,0 +1,7 @@
+@ARGS
+--test-repo selfupgrade.repo
+--test-instdb selfupgrade3.installed
+--test-world "apk-tools"
+--self-upgrade-only
+upgrade
+@EXPECT
diff --git a/test/solver.sh b/test/solver.sh
index 8c27d8f..bc230c6 100755
--- a/test/solver.sh
+++ b/test/solver.sh
@@ -4,7 +4,7 @@ get_block() {
awk '/^@'$1'/{p=1;next} /^@/{p=0} p{print}'
}
-APK_TEST=../src/apk-test
+APK_TEST="../src/apk-test"
TEST_TO_RUN="$@"
fail=0