Run all travis tests and expose the final result as exit code

This commit is contained in:
Benedikt Heine 2018-06-19 16:58:15 +02:00
parent adc9348e80
commit a073acd406

View File

@ -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;