summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohnny Willemsen <jwillemsen@remedy.nl>2004-03-17 18:19:35 +0000
committerJohnny Willemsen <jwillemsen@remedy.nl>2004-03-17 18:19:35 +0000
commit360062be919140d42b923291da72aff2fa53c74d (patch)
treedbd734c3dfeea31d77e46868cfe9ca312fcdb6ca
parentdfdf0460b68cc34c0286c14f3a062d22447103b1 (diff)
downloadATCD-360062be919140d42b923291da72aff2fa53c74d.tar.gz
ChangeLogTag: Wed Mar 17 18:19:11 UTC 2004 Johnny Willemsen <jwillemsen@remedy.nl>
-rwxr-xr-xtests/run_test.pl32
1 files changed, 30 insertions, 2 deletions
diff --git a/tests/run_test.pl b/tests/run_test.pl
index cf439bcbefa..3b81b757ed0 100755
--- a/tests/run_test.pl
+++ b/tests/run_test.pl
@@ -127,6 +127,10 @@ sub run_program ($)
}
check_log ($program);
+
+ if (defined $opt_c) {
+ check_codeguard_log ($program);
+ }
}
################################################################################
@@ -285,6 +289,28 @@ sub check_log ($)
}
}
+sub check_codeguard_log ($)
+{
+ my $program = shift;
+
+ ### Check the logs
+
+ local $log = $program.".cgl";
+
+ if (-e $log ) {
+ print STDERR "======= Begin Codeguard Log File \n";
+ if (open (LOG, "<".$log) == 0) {
+ print STDERR "Error: Cannot open codeguard log file $log\n";
+ }
+ else {
+ my @log = <LOG>;
+ print STDERR @log;
+ close (LOG);
+ }
+ print STDERR "======= End Codeguard Log File \n";
+ }
+}
+
################################################################################
sub delete_temp_files ()
@@ -312,14 +338,15 @@ sub delete_temp_files ()
$config_list->load ("run_test.lst");
-if (!getopts ('dhtvo:') || $opt_h) {
- print "run_test.pl [-h] [-v] [-o <output file>] [-t file1 file2 ...]\n";
+if (!getopts ('cdhtvo:') || $opt_h) {
+ print "run_test.pl [-h] [-c] [-v] [-o <output file>] [-t file1 file2 ...]\n";
print "\n";
print "Runs the tests listed in run_test.lst\n";
print "\n";
print "Options:\n";
print " -d Debug mode (do not run tests)\n";
print " -h Display this help\n";
+ print " -c Look for codeguard logs\n";
print " -t Runs all the tests passed via the cmd line\n";
print " -v Generate commands for VxWorks\n";
print " -o Put VxWorks commands in output file\n";
@@ -334,6 +361,7 @@ if (!getopts ('dhtvo:') || $opt_h) {
## since we can't use "our" to get rid of warnings.
$opt_h = $opt_h if (defined $opt_h);
$opt_t = $opt_t if (defined $opt_t);
+$opt_c = $opt_c if (defined $opt_c);
if (!($tmp = $ENV{TMP}) && !($tmp = $ENV{TEMP})) {
$tmp="/tmp";