diff options
author | Benedikt Heine <bebe@bebehei.de> | 2018-06-19 16:58:15 +0200 |
---|---|---|
committer | Benedikt Heine <bebe@bebehei.de> | 2018-06-19 17:17:51 +0200 |
commit | a073acd40666019305e14da9c997537b15d825d5 (patch) | |
tree | 4292897aa895fa7cabde172e5413c301a03ae9be /travis/run-tests.pl | |
parent | adc9348e80cd0e0b1b5614433e33d1ff63e0e19d (diff) |
Run all travis tests and expose the final result as exit code
Diffstat (limited to 'travis/run-tests.pl')
-rwxr-xr-x | travis/run-tests.pl | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/travis/run-tests.pl b/travis/run-tests.pl index 1b3af77..960af2e 100755 --- a/travis/run-tests.pl +++ b/travis/run-tests.pl @@ -44,14 +44,16 @@ sub TestCase { } my $testcases = 'testcases'; -my $testresults = 1; +my $testresults = 0; opendir(my $dir, $testcases) or die "Could not open directory $testcases: $!"; while (my $entry = readdir($dir)) { next unless (-d "$testcases/$entry"); next if ($entry =~ m/^\./); - $testresults = $testresults && TestCase("$testcases/$entry"); + if (not TestCase("$testcases/$entry") ) { + $testresults = 1; + } } closedir($dir); -exit 0; +exit $testresults; |