diff options
-rwxr-xr-x | t/13-local-check.t | 24 | ||||
-rw-r--r-- | t/LO/s2/README | 1 | ||||
-rw-r--r-- | t/LO/s2/s2.SlackBuild | 15 | ||||
-rw-r--r-- | t/LO/s2/s2.info | 10 | ||||
-rw-r--r-- | t/LO2/s2/README | 1 | ||||
-rw-r--r-- | t/LO2/s2/s2.SlackBuild | 15 | ||||
-rw-r--r-- | t/LO2/s2/s2.info | 10 | ||||
-rw-r--r-- | t/LO3/s/README | 1 | ||||
-rw-r--r-- | t/LO3/s/s.SlackBuild | 15 | ||||
-rw-r--r-- | t/LO3/s/s.info | 10 |
10 files changed, 101 insertions, 1 deletions
diff --git a/t/13-local-check.t b/t/13-local-check.t index 50ac947..369305a 100755 --- a/t/13-local-check.t +++ b/t/13-local-check.t @@ -10,7 +10,7 @@ use lib $RealBin; use Test::Sbotools qw/ make_slackbuilds_txt set_lo set_repo sbosnap sbocheck sboinstall sbofind restore_perf_dummy /; if ($ENV{TEST_INSTALL} and $ENV{TRAVIS}) { - plan tests => 9; + plan tests => 12; } else { plan skip_all => "Only run these tests if TEST_INSTALL=1 and we're running under Travis CI"; } @@ -24,6 +24,7 @@ sub cleanup { system(qw!/sbin/removepkg nonexistentslackbuildwithareallyverylo!); system(qw!/sbin/removepkg nonexistentslackbuildwithareallyverylon!); system(qw!/sbin/removepkg nonexistentslackbuildwithareallyverylong!); + system(qw!/sbin/removepkg s2!); unlink "$RealBin/LO/nonexistentslackbuild/perf.dummy"; system(qw!rm -rf /tmp/SBo/nonexistentslackbuild-1.0!); system(qw!rm -rf /tmp/SBo/nonexistentslackbuild5-1.0!); @@ -32,6 +33,7 @@ sub cleanup { system(qw!rm -rf /tmp/SBo/nonexistentslackbuildwithareallyverylo-1.0!); system(qw!rm -rf /tmp/SBo/nonexistentslackbuildwithareallyverylon-1.0!); system(qw!rm -rf /tmp/SBo/nonexistentslackbuildwithareallyverylon-1.0g!); + system(qw!rm -rf /tmp/SBo/s2-1.0!); system(qw!rm -rf /tmp/package-nonexistentslackbuild!); system(qw!rm -rf /tmp/package-nonexistentslackbuild5!); system(qw!rm -rf /tmp/package-nonexistentslackbuildwithareallyverylongnameasyoucansee!); @@ -39,6 +41,7 @@ sub cleanup { system(qw!rm -rf /tmp/package-nonexistentslackbuildwithareallyverylo!); system(qw!rm -rf /tmp/package-nonexistentslackbuildwithareallyverylon!); system(qw!rm -rf /tmp/package-nonexistentslackbuildwithareallyverylong!); + system(qw!rm -rf /tmp/package-s2!); system(qw!rm -rf!, "$RealBin/gitrepo"); }; } @@ -123,6 +126,25 @@ GIT sboinstall 'nonexistentslackbuildwithareallyverylong', { input => "y\ny", test => 0 }; sbocheck { expected => qr/\Qs 1.0 < override outdated (1.1 from SBo)/ }; +# 10: check different version in repo and LO and installed +set_lo("$RealBin/LO3"); +sbocheck { expected => qr/\Qs 1.0 < needs updating (0.9 from overrides, 1.1 from SBo)/ }; + +# 11: check different version on SBo than what's installed +set_lo('FALSE'); +sbocheck { expected => qr/\Qs 1.0 < needs updating (1.1 from SBo)/ }; + +# 12: check s2 being the same version in SBo but newer in LO +capture_merged { system <<"GIT"; }; + cd "$RealBin/gitrepo" + + cp -a "$RealBin"/LO/s2 test/ + git add "test/s2"; git commit -m '5th update' +GIT +sbosnap 'update', { test => 0 }; +sboinstall 's2', { input => "y\ny", test => 0 }; +set_lo("$RealBin/LO2"); +sbocheck { expected => qr/\Qs2 1.0 < needs updating (1.1 from overrides)/ }; # Cleanup END { diff --git a/t/LO/s2/README b/t/LO/s2/README new file mode 100644 index 0000000..6d388bb --- /dev/null +++ b/t/LO/s2/README @@ -0,0 +1 @@ +This doesn't exist! diff --git a/t/LO/s2/s2.SlackBuild b/t/LO/s2/s2.SlackBuild new file mode 100644 index 0000000..0f98e6f --- /dev/null +++ b/t/LO/s2/s2.SlackBuild @@ -0,0 +1,15 @@ +#!/bin/bash +PRGNAM="s2" +VERSION=${VERSION:-1.0} +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/LO/s2/s2.info b/t/LO/s2/s2.info new file mode 100644 index 0000000..af851e8 --- /dev/null +++ b/t/LO/s2/s2.info @@ -0,0 +1,10 @@ +PRGNAM="s2" +VERSION="1.0" +HOMEPAGE="http://www.example.com" +DOWNLOAD="http://pink-mist.github.io/sbotools/testing/perf.dummy" +MD5SUM="9cba6c70fb57a22a155073d54748b614" +DOWNLOAD_x86_64="" +MD5SUM_x86_64="" +REQUIRES="" +MAINTAINER="Andreas Guldstrand" +EMAIL="doesnt@matter.org" diff --git a/t/LO2/s2/README b/t/LO2/s2/README new file mode 100644 index 0000000..6d388bb --- /dev/null +++ b/t/LO2/s2/README @@ -0,0 +1 @@ +This doesn't exist! diff --git a/t/LO2/s2/s2.SlackBuild b/t/LO2/s2/s2.SlackBuild new file mode 100644 index 0000000..f7fbc6c --- /dev/null +++ b/t/LO2/s2/s2.SlackBuild @@ -0,0 +1,15 @@ +#!/bin/bash +PRGNAM="s2" +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/s2/s2.info b/t/LO2/s2/s2.info new file mode 100644 index 0000000..d8baea6 --- /dev/null +++ b/t/LO2/s2/s2.info @@ -0,0 +1,10 @@ +PRGNAM="s2" +VERSION="1.1" +HOMEPAGE="http://www.example.com" +DOWNLOAD="http://pink-mist.github.io/sbotools/testing/perf.dummy" +MD5SUM="9cba6c70fb57a22a155073d54748b614" +DOWNLOAD_x86_64="" +MD5SUM_x86_64="" +REQUIRES="" +MAINTAINER="Andreas Guldstrand" +EMAIL="doesnt@matter.org" diff --git a/t/LO3/s/README b/t/LO3/s/README new file mode 100644 index 0000000..6d388bb --- /dev/null +++ b/t/LO3/s/README @@ -0,0 +1 @@ +This doesn't exist! diff --git a/t/LO3/s/s.SlackBuild b/t/LO3/s/s.SlackBuild new file mode 100644 index 0000000..f395789 --- /dev/null +++ b/t/LO3/s/s.SlackBuild @@ -0,0 +1,15 @@ +#!/bin/bash +PRGNAM="s" +VERSION=${VERSION:-0.9} +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/LO3/s/s.info b/t/LO3/s/s.info new file mode 100644 index 0000000..9daacec --- /dev/null +++ b/t/LO3/s/s.info @@ -0,0 +1,10 @@ +PRGNAM="s" +VERSION="0.9" +HOMEPAGE="http://www.example.com" +DOWNLOAD="http://pink-mist.github.io/sbotools/testing/perf.dummy" +MD5SUM="9cba6c70fb57a22a155073d54748b614" +DOWNLOAD_x86_64="" +MD5SUM_x86_64="" +REQUIRES="" +MAINTAINER="Andreas Guldstrand" +EMAIL="doesnt@matter.org" |