Skip to content

Colour code tests passing vs failing. #2235

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 29, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions regression/test.pl
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
use strict;
use warnings;
use File::Basename;
use Term::ANSIColor;

use Cwd;

Expand Down Expand Up @@ -358,10 +359,10 @@ ($)
$skips++;
print " [SKIPPED]\n";
} elsif(0 == $failed_skipped) {
print " [OK] in $runtime seconds\n";
print " [" . colored("OK", "green") . "] in $runtime seconds\n";
} else {
$failures++;
print " [FAILED]\n";
print " [" . colored("FAILED", "red") . "]\n";
}
}
}
Expand Down Expand Up @@ -393,9 +394,9 @@ ($)
print "\n";

if($failures == 0) {
print "All tests were successful";
print colored("All tests were successful", "green");
} else {
print "Tests failed\n";
print colored("Tests failed", "red") . "\n";
print " $failures of $count " . (1==$count?"test":"tests") . " failed";
}
print ", $skips " . (1==$skips?"test":"tests") . " skipped" if($skips > 0);
Expand Down