[llvm-commits] CVS: reopt/test/Summarize.pl
Brian Gaeke
gaeke at cs.uiuc.edu
Tue Aug 3 22:28:14 PDT 2004
Changes in directory reopt/test:
Summarize.pl updated: 1.1 -> 1.2
---
Log message:
Deal correctly with partial reports. Print "1 trace" instead of "1 traces".
---
Diffs of the changes: (+19 -3)
Index: reopt/test/Summarize.pl
diff -u reopt/test/Summarize.pl:1.1 reopt/test/Summarize.pl:1.2
--- reopt/test/Summarize.pl:1.1 Wed Jul 21 16:02:57 2004
+++ reopt/test/Summarize.pl Wed Aug 4 00:28:03 2004
@@ -14,6 +14,14 @@
$test $traces $fail $extra
.
+sub pluralize {
+ my ($traces) = @_;
+ if ($traces > 1) { $traces = "$traces traces"; }
+ elsif ($traces == 1) { $traces = "$traces trace"; }
+ else { $traces = "no traces"; }
+ return $traces;
+}
+
while (<>) {
if (/Running Reoptimizer version of (\S+)/) {
$test = $1;
@@ -29,13 +37,21 @@
}
elsif (/Finished running Reoptimizer tests for (\S+)/) {
die "Wrong test?" unless $test eq $1;
- if ($traces) { $traces = "$traces traces"; }
- else { $traces = "no traces"; }
+ $traces = pluralize ($traces);
write;
+ $test = '';
}
- elsif (/(Segmentation Fault|Bus Error|Assertion failed|Terminated|Killed)/i) {
+ elsif (/(Segmentation Fault|Bus Error|Assertion failed|Terminated|Killed)/i)
+ {
$extra = "$1";
}
}
+if ($test) {
+ $traces = pluralize ($traces);
+ $fail = '';
+ $extra = '<still running>';
+ write;
+}
+
exit(0);
More information about the llvm-commits
mailing list