aboutsummaryrefslogtreecommitdiff
path: root/t/14-jobs.t
diff options
context:
space:
mode:
Diffstat (limited to 't/14-jobs.t')
-rwxr-xr-xt/14-jobs.t10
1 files changed, 8 insertions, 2 deletions
diff --git a/t/14-jobs.t b/t/14-jobs.t
index 1b82c53..2a9f03c 100755
--- a/t/14-jobs.t
+++ b/t/14-jobs.t
@@ -10,7 +10,7 @@ use lib $RealBin;
use Test::Sbotools qw/ set_lo set_jobs sboinstall sboremove sboconfig restore_perf_dummy make_slackbuilds_txt sboupgrade /;
if ($ENV{TEST_INSTALL}) {
- plan tests => 7;
+ plan tests => 8;
} else {
plan skip_all => "Only run these tests if TEST_INSTALL=1";
}
@@ -73,9 +73,15 @@ sboinstall(qw/ -j invalid nonexistentslackbuild /, { exit => 1, expected => "You
#7: sboupgrade -j invalid
sboinstall qw/ -r nonexistentslackbuild /, { test => 0 };
-set_lo "$RealBin/LO2";
+set_lo "$RealBin/LO-jobs2";
sboupgrade qw/ -j invalid nonexistentslackbuild /, { exit => 1, expected => "You have provided an invalid value for -j|--jobs\n" };
+#8: sboupgrade -j 2
+{
+ my ($time) = sboupgrade qw/ -j 2 nonexistentslackbuild /, { input => "y\ny", expected => qr/^real\s+\d+m([\d.]+)s$/m, test => 0 };
+ ok ($time < 5, "sboupgrade -j 2 took less time than otherwise");
+}
+
# Cleanup
END {