summaryrefslogtreecommitdiff
path: root/travis
diff options
context:
space:
mode:
Diffstat (limited to 'travis')
-rwxr-xr-xtravis/run-tests.pl15
1 files changed, 12 insertions, 3 deletions
diff --git a/travis/run-tests.pl b/travis/run-tests.pl
index 453a633..5936b7e 100755
--- a/travis/run-tests.pl
+++ b/travis/run-tests.pl
@@ -3,19 +3,29 @@
use v5.10;
use strict;
use warnings;
+use English;
use Term::ANSIColor qw(:constants);
use File::Basename;
sub TestCase {
my ($dir) = @_;
+
+ if ( -f "@_/setup.pl") {
+ system($EXECUTABLE_NAME, "@_/setup.pl", ($dir));
+ }
+
my $conf = "$dir/i3status.conf";
my $testres = `./i3status --run-once -c $conf`;
my $refres = "";
if ( -f "@_/expected_output.txt") {
$refres = `cat "@_/expected_output.txt"`;
- } elsif ( -f "@_/expected_output.sh") {
- $refres = `bash @_/expected_output.sh`;
+ } elsif ( -f "@_/expected_output.pl") {
+ $refres = `$EXECUTABLE_NAME @_/expected_output.pl`;
+ }
+
+ if ( -f "@_/cleanup.pl") {
+ system($EXECUTABLE_NAME, "@_/cleanup.pl", ($dir));
}
if ( "$testres" eq "$refres" ) {
@@ -27,7 +37,6 @@ sub TestCase {
}
}
-
my $testcases = 'testcases';
my $testresults = 1;