aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xt/05-upgrade.t21
-rw-r--r--t/LO2/nonexistentslackbuild6/README1
-rw-r--r--t/LO2/nonexistentslackbuild6/nonexistentslackbuild6.SlackBuild15
-rw-r--r--t/LO2/nonexistentslackbuild6/nonexistentslackbuild6.info10
4 files changed, 42 insertions, 5 deletions
diff --git a/t/05-upgrade.t b/t/05-upgrade.t
index 8417cf0..00aa444 100755
--- a/t/05-upgrade.t
+++ b/t/05-upgrade.t
@@ -11,7 +11,7 @@ use lib "$RealBin/../SBO-Lib/lib";
use Test::Execute;
if ($ENV{TEST_INSTALL}) {
- plan tests => 13;
+ plan tests => 14;
} else {
plan skip_all => 'Only run these tests if TEST_INSTALL=1';
}
@@ -24,27 +24,34 @@ sub cleanup {
system(qw!/sbin/removepkg nonexistentslackbuild!);
system(qw!/sbin/removepkg nonexistentslackbuild4!);
system(qw!/sbin/removepkg nonexistentslackbuild5!);
+ system(qw!/sbin/removepkg nonexistentslackbuild6!);
unlink "$RealBin/LO/nonexistentslackbuild/perf.dummy";
unlink "$RealBin/LO/nonexistentslackbuild4/perf.dummy";
unlink "$RealBin/LO/nonexistentslackbuild5/perf.dummy";
+ unlink "$RealBin/LO/nonexistentslackbuild6/perf.dummy";
unlink "$RealBin/LO2/nonexistentslackbuild/perf.dummy";
unlink "$RealBin/LO2/nonexistentslackbuild4/perf.dummy";
unlink "$RealBin/LO2/nonexistentslackbuild5/perf.dummy";
+ unlink "$RealBin/LO2/nonexistentslackbuild6/perf.dummy";
unlink "$RealBin/LO3/nonexistentslackbuild/perf.dummy";
unlink "$RealBin/LO3/nonexistentslackbuild4/perf.dummy";
unlink "$RealBin/LO3/nonexistentslackbuild5/perf.dummy";
system(qw!rm -rf /tmp/SBo/nonexistentslackbuild-0.9!);
system(qw!rm -rf /tmp/SBo/nonexistentslackbuild4-0.9!);
system(qw!rm -rf /tmp/SBo/nonexistentslackbuild5-0.9!);
+ system(qw!rm -rf /tmp/SBo/nonexistentslackbuild6-0.9!);
system(qw!rm -rf /tmp/SBo/nonexistentslackbuild-1.0!);
system(qw!rm -rf /tmp/SBo/nonexistentslackbuild4-1.0!);
system(qw!rm -rf /tmp/SBo/nonexistentslackbuild5-1.0!);
+ system(qw!rm -rf /tmp/SBo/nonexistentslackbuild6-1.0!);
system(qw!rm -rf /tmp/SBo/nonexistentslackbuild-1.1!);
system(qw!rm -rf /tmp/SBo/nonexistentslackbuild4-1.1!);
system(qw!rm -rf /tmp/SBo/nonexistentslackbuild5-1.1!);
+ system(qw!rm -rf /tmp/SBo/nonexistentslackbuild6-1.1!);
system(qw!rm -rf /tmp/package-nonexistentslackbuild!);
system(qw!rm -rf /tmp/package-nonexistentslackbuild4!);
system(qw!rm -rf /tmp/package-nonexistentslackbuild5!);
+ system(qw!rm -rf /tmp/package-nonexistentslackbuild6!);
};
}
@@ -101,21 +108,25 @@ script (qw/ sboupgrade -f nonexistentslackbuild4 /, { input => "y\ny", expected
script (qw/ sboupgrade -f nonexistentslackbuild5 /, { input => "y\ny", expected => qr/Proceed with nonexistentslackbuild5\b.*Upgrade queue: nonexistentslackbuild5\n/s });
script (qw/ sboupgrade -f -z nonexistentslackbuild4 /, { input => "y\ny\ny", expected => qr/Proceed with nonexistentslackbuild5\b.*Proceed with nonexistentslackbuild4\b.*Upgrade queue: nonexistentslackbuild5 nonexistentslackbuild4\n/s });
-# 8: sboupgrade nonexistentslackbuild when it needs to be upgraded
+# 8: sboupgrade works with nonexistentslackbuild6
+install( 'LO2', 'nonexistentslackbuild6' );
+script (qw/ sboupgrade nonexistentslackbuild6 /, { input => "y\ny", expected => qr/Proceed with nonexistentslackbuild6\b.*Upgrade queue: nonexistentslackbuild6\n/s });
+
+# 9: sboupgrade nonexistentslackbuild when it needs to be upgraded
install( 'LO2', 'nonexistentslackbuild' );
script (qw/ sboupgrade nonexistentslackbuild /, { input => "y\ny", expected => qr/Proceed with nonexistentslackbuild\b.*Upgrade queue: nonexistentslackbuild\n/s });
-# 9: sboupgrade nonexistentslackbuild4 and 5 when they need to be upgraded
+# 10: sboupgrade nonexistentslackbuild4 and 5 when they need to be upgraded
install( 'LO2', 'nonexistentslackbuild5', 'nonexistentslackbuild4' );
script (qw/ sboupgrade nonexistentslackbuild4 /, { input => "y\ny\ny", expected => qr/Proceed with nonexistentslackbuild5\b.*Proceed with nonexistentslackbuild4\b.*Upgrade queue: nonexistentslackbuild5 nonexistentslackbuild4\n/s });
-# 10-11: sboupgrade nonexistentslackbuild4 and 5 when only 5 needs an update
+# 11-12: sboupgrade nonexistentslackbuild4 and 5 when only 5 needs an update
install( 'LO3', 'nonexistentslackbuild5', 'nonexistentslackbuild4' );
script (qw/ sboupgrade nonexistentslackbuild4 /, { input => "y\ny", expected => qr/Proceed with nonexistentslackbuild5\b.*Upgrade queue: nonexistentslackbuild5\n/s });
install( 'LO3', 'nonexistentslackbuild5', 'nonexistentslackbuild4' );
script (qw/ sboupgrade -f nonexistentslackbuild4 /, { input => "y\ny\ny", expected => qr/Proceed with nonexistentslackbuild5\b.*Proceed with nonexistentslackbuild4\b.*Upgrade queue: nonexistentslackbuild5 nonexistentslackbuild4\n/s });
-# 12-13: sboupgrade --all
+# 13-14: sboupgrade --all
install( 'LO2', 'nonexistentslackbuild' );
my @sbos = glob("/var/log/packages/*_SBo");
script (qw/ sboupgrade --all /, { input => ("n\n" x (@sbos+1)), expected => qr/Proceed with nonexistentslackbuild\b/ });
diff --git a/t/LO2/nonexistentslackbuild6/README b/t/LO2/nonexistentslackbuild6/README
new file mode 100644
index 0000000..6d388bb
--- /dev/null
+++ b/t/LO2/nonexistentslackbuild6/README
@@ -0,0 +1 @@
+This doesn't exist!
diff --git a/t/LO2/nonexistentslackbuild6/nonexistentslackbuild6.SlackBuild b/t/LO2/nonexistentslackbuild6/nonexistentslackbuild6.SlackBuild
new file mode 100644
index 0000000..157d242
--- /dev/null
+++ b/t/LO2/nonexistentslackbuild6/nonexistentslackbuild6.SlackBuild
@@ -0,0 +1,15 @@
+#!/bin/bash
+PRGNAM="nonexistentslackbuild6"
+VERSION=${VERSION:-1.1}
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+TMP=${TMP:-/tmp/SBo}
+OUTPUT=${OUTPUT:-/tmp}
+
+mkdir -p $TMP/$PRGNAM-$VERSION
+cp README $TMP/$PRGNAM-$VERSION
+mkdir -p $OUTPUT/package-$PRGNAM/usr/doc/$PRGNAM-$VERSION
+cp README $OUTPUT/package-$PRGNAM/usr/doc/$PRGNAM-$VERSION
+cd $OUTPUT/package-$PRGNAM
+
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-noarch-$BUILD$TAG.tgz
diff --git a/t/LO2/nonexistentslackbuild6/nonexistentslackbuild6.info b/t/LO2/nonexistentslackbuild6/nonexistentslackbuild6.info
new file mode 100644
index 0000000..f5a886b
--- /dev/null
+++ b/t/LO2/nonexistentslackbuild6/nonexistentslackbuild6.info
@@ -0,0 +1,10 @@
+PRGNAM="nonexistentslackbuild6"
+VERSION="1.1"
+HOMEPAGE="http://www.example.com"
+DOWNLOAD="http://www.pastemobile.org/perf.dummy"
+MD5SUM="9cba6c70fb57a22a155073d54748b614"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
+REQUIRES="aaa_base"
+MAINTAINER="Andreas Guldstrand"
+EMAIL="doesnt@matter.org"