From 927769803578cc6ad5bbf28645fc04bae45dd427 Mon Sep 17 00:00:00 2001 From: Andreas Guldstrand Date: Tue, 15 Dec 2015 10:06:22 +0100 Subject: Fix up travis.t tests and add path debugging for the command-runner --- t/travis.t | 6 +++--- 1 file 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 -- cgit v1.2.3