summaryrefslogtreecommitdiff
path: root/cesar/common/tests/get-cov.pl
diff options
context:
space:
mode:
Diffstat (limited to 'cesar/common/tests/get-cov.pl')
-rwxr-xr-xcesar/common/tests/get-cov.pl32
1 files changed, 32 insertions, 0 deletions
diff --git a/cesar/common/tests/get-cov.pl b/cesar/common/tests/get-cov.pl
new file mode 100755
index 0000000000..25164caa15
--- /dev/null
+++ b/cesar/common/tests/get-cov.pl
@@ -0,0 +1,32 @@
+#!/usr/bin/perl
+#
+# Get the list of coverage trace files.
+#
+use strict;
+use warnings;
+
+my $base = shift @ARGV;
+my $dir;
+my $fail = 0;
+
+# Read tests file.
+while (<STDIN>)
+{
+ chomp;
+ # Drop comments.
+ next if /^\s*(?:#.*)?$/;
+ if (/^(.*):(:)?$/)
+ {
+ # Directory line.
+ $dir = $1;
+ -d "$base/$dir"
+ or die "cannot change directory";
+ }
+ elsif (/^cov.*? (.*?): .*$/)
+ {
+ # Coverage test line.
+ my $f = "$base/$dir/obj/$1.info";
+ -f $f
+ and print "$f\n";
+ }
+}