aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Guldstrand <andreas.guldstrand@gmail.com>2015-12-15 10:06:22 +0100
committerAndreas Guldstrand <andreas.guldstrand@gmail.com>2015-12-15 10:06:22 +0100
commit927769803578cc6ad5bbf28645fc04bae45dd427 (patch)
treea0a6af23cffdbba53ff86aa9e28423204e44ce85
parent67bc6ab2afa8781847ab990ea825b753f96f154e (diff)
downloadsbotools2-927769803578cc6ad5bbf28645fc04bae45dd427.tar.xz
Fix up travis.t tests and add path debugging for the command-runner
-rwxr-xr-xt/travis.t6
1 files changed, 3 insertions, 3 deletions
diff --git a/t/travis.t b/t/travis.t
index 6257ed4..73bc044 100755
--- a/t/travis.t
+++ b/t/travis.t
@@ -27,7 +27,7 @@ sub run {
my $exit = $args{exit};
my ($output, $return) = capture_merged { system(@cmd) };
return $output if $return == $exit;
- return "Command $cmd exited with $return instead of $exit";
+ return "Command $cmd ($path/$cmd) exited with $return instead of $exit";
}
# 1-3: Test SLACKWARE_VERSION
@@ -38,14 +38,14 @@ is (run(cmd => [qw/ sbofind sbotools /]), "SBo: sbotools\nPath: /usr/sbo/re
# 4-10: Test alternative REPO
is (system(qw!sudo rm -rf /usr/sbo!), 0, 'Removing /usr/sbo works');
ok (! -e "/usr/sbo/repo/SLACKBUILDS.TXT", "SLACKBUILDS.TXT doesn't exist");
-is (run(cmd => [qw! sboconfig -r https://github.com/Ponce/slackbuilds.git !]), "Setting REPO to https://github.com/Ponce/slackbuilds.git...", 'setting REPO works');
+is (run(cmd => [qw! sboconfig -r https://github.com/Ponce/slackbuilds.git !]), "Setting REPO to https://github.com/Ponce/slackbuilds.git...\n", 'setting REPO works');
like (run(cmd => [qw/ sbosnap fetch /]), qr!Pulling SlackBuilds tree.*Cloning into '/usr/sbo/repo'!s, 'sbosnap fetch works from alternative REPO');
ok (-e "/usr/sbo/repo/SLACKBUILDS.TXT", "SLACKBUILDS.TXT exists (REPO)");
ok (! -e "/usr/sbo/repo/SLACKBUILDS.TXT.gz", "SLACKBUILDS.TXT.gz doesn't exist (REPO)");
is (run(cmd => [qw/ sbofind sbotools /]), "SBo: sbotools\nPath: /usr/sbo/repo/system/sbotools\n\n", 'sbofind works');
# 11-16: Test local overrides
-is (run(cmd => [qw/ sboconfig -o /, "$RealBin/LO"]), "Setting LOCAL_OVERRIDES to $RealBin/LO", 'setting LOCAL_OVERRIDES works');
+is (run(cmd => [qw/ sboconfig -o /, "$RealBin/LO"]), "Setting LOCAL_OVERRIDES to $RealBin/LO\n", 'setting LOCAL_OVERRIDES works');
is (run(cmd => [qw/ sbofind nonexistentslackbuild /]), <<"LOCAL", "sbofind finds local overrides");
Local: nonexistentslackbuild2
Path: $RealBin/LO/nonexistentslackbuild2