summaryrefslogtreecommitdiff
path: root/travis/run-tests.pl
diff options
context:
space:
mode:
authorBenedikt Heine <bebe@bebehei.de>2018-06-19 16:44:37 +0200
committerBenedikt Heine <bebe@bebehei.de>2018-06-19 16:47:02 +0200
commitbc29d468ca20ce84c3753d83116348d977604822 (patch)
tree7410fa60c212d92f5a13f00ab28fc2f0fbbe862b /travis/run-tests.pl
parentf300f6e466d1ac7164b15aab9ec2f633a3a6f958 (diff)
Fail the tests, if i3status actually crashes
Diffstat (limited to 'travis/run-tests.pl')
-rwxr-xr-xtravis/run-tests.pl6
1 files changed, 6 insertions, 0 deletions
diff --git a/travis/run-tests.pl b/travis/run-tests.pl
index 5936b7e..1b3af77 100755
--- a/travis/run-tests.pl
+++ b/travis/run-tests.pl
@@ -16,6 +16,7 @@ sub TestCase {
my $conf = "$dir/i3status.conf";
my $testres = `./i3status --run-once -c $conf`;
+ my $exitcode = $?;
my $refres = "";
if ( -f "@_/expected_output.txt") {
@@ -28,6 +29,11 @@ sub TestCase {
system($EXECUTABLE_NAME, "@_/cleanup.pl", ($dir));
}
+ if ( $exitcode != 0 ) {
+ say "Testing test case '", basename($dir), "'… ", BOLD, RED, "Crash!", RESET;
+ return 0;
+ }
+
if ( "$testres" eq "$refres" ) {
say "Testing test case '", basename($dir), "'… ", BOLD, GREEN, "OK", RESET;
return 1;