commit b29c00408e4d0a77a692522a7b31cad0044d8b24
parent 79f4cbf50a27abba9c968d8af563c310e60a22ba
Author: Andreas Guldstrand <andreas.guldstrand@gmail.com>
Date: Mon, 14 Dec 2015 15:19:58 +0100
Add tests for local overrides (sbocheck, install, upgrade); see #19
Diffstat:
4 files changed, 33 insertions(+), 0 deletions(-)
diff --git a/t/LO/nonexistentslackbuild/README b/t/LO/nonexistentslackbuild/README
@@ -0,0 +1 @@
+This doesn't exist!
diff --git a/t/LO/nonexistentslackbuild/nonexistentslackbuild.SlackBuild b/t/LO/nonexistentslackbuild/nonexistentslackbuild.SlackBuild
@@ -0,0 +1,7 @@
+#!/bin/bash
+PRGNAM="nonexistentslackbuild"
+VERSION=${VERSION:-1.0}
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+OUTPUT=${OUTPUT:-/tmp}
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-noarch-$BUILD$TAG.tgz
diff --git a/t/LO/nonexistentslackbuild/nonexistentslackbuild.info b/t/LO/nonexistentslackbuild/nonexistentslackbuild.info
@@ -0,0 +1,10 @@
+PRGNAM="nonexistentslackbuild"
+VERSION="1.0"
+HOMEPAGE="http://www.example.com"
+DOWNLOAD="http://www.pastemobile.org/perf.dummy"
+MD5SUM="http://www.pastemobile.org/perf.dummy"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
+REQUIRES=""
+MAINTAINER="Andreas Guldstrand"
+EMAIL="doesnt@matter.org"
diff --git a/t/travis.sh b/t/travis.sh
@@ -20,6 +20,8 @@ cd t
sudo $PERL prep.pl
sudo $PERL test.t
cd $CWD
+
+# Test alternative repo
sudo rm -rf /usr/sbo
[ ! -e /usr/sbo/repo/SLACKBUILDS.TXT ]
run sboconfig -r https://github.com/Ponce/slackbuilds.git
@@ -27,3 +29,16 @@ run sbosnap fetch
[ -e /usr/sbo/repo/SLACKBUILDS.TXT ]
[ ! -e /usr/sbo/repo/SLACKBUILDS.TXT.gz ]
run sbofind sbotools
+
+# Test local overrides
+run sboconfig -o $CWD/t/LO
+run sboinstall -r nonexistentslackbuild
+ls -la /var/log/packages
+run sboremove --nointeractive nonexistentslackbuild
+ls -la /var/log/packages
+
+sudo /sbin/installpkg nonexistentslackbuild-0.9-noarch-1_SBo.tgz
+run sbocheck
+WC=$(wc -l /var/log/sbocheck.log)
+[ "$WC" = "1 /var/log/sbocheck.log" ]
+run sboupgrade -r nonexistentslackbuild