Changeset 5024
- Timestamp:
- Sep 13, 2005, 10:26:33 AM (21 years ago)
- File:
-
- 1 edited
-
trunk/psModules/test/runTest (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psModules/test/runTest
r3696 r5024 26 26 # 27 27 # $Revison: $ $Name: not supported by cvs2svn $ 28 # $Date: 2005-0 4-12 21:51:00$28 # $Date: 2005-09-13 20:26:33 $ 29 29 # 30 30 # Copyright 2004 Maui High Performance Computering Center, University of Hawaii … … 39 39 # Assign variables based on the presence of command line options to the script 40 40 GetOptions( 41 "reset!" => \$reset, 42 "resetStderr!" => \$resetStderr, 43 "resetStdout!" => \$resetStdout, 44 "verified=s" => \$verifiedDir, 45 "help!" => \$help, 46 "quiet!" => \$quiet, 47 "printpassfail!" => \$verbose 41 "reset!" => \$reset, 42 "resetStderr!" => \$resetStderr, 43 "resetStdout!" => \$resetStdout, 44 "verified=s" => \$verifiedDir, 45 "help!" => \$help, 46 "quiet!" => \$quiet, 47 "printpassfail!" => \$verbose, 48 "printdiff!" => \$printdiff 48 49 ); 49 50 50 51 if ($help || $#ARGV < 0) { 51 print "Usage: runTest [--help] [--verified=DIR] [--quiet] [--printpassfail] \\\n", 52 " [--reset] [--resetStderr] [--resetStdout] testfile(s)\n\n"; 52 print "\nUsage: runTest [--help] [--quiet] [--resetStderr] [--resetStdout] [--reset] \\\n", 53 " [--verified=DIR] [--printpassfail] [--printdiff] testfile(s)\n\n", 54 "Options include:\n", 55 " --help Prints this help message\n", 56 " --quiet Suppresses all messages\n", 57 " --resetStderr Resets the STDERR expected output file in the verified\n", 58 " directory\n", 59 " --resetStdout Resets the STDOUT expected output file in the verified\n", 60 " directory\n", 61 " --reset Equivalent to --resetStderr plus --resetStdout\n", 62 " --verified=DIR Specifies the location of the verified directory\n", 63 " --printpassfail Prints a PASS or FAIL message for each test in each file\n", 64 " --printdiff Prints any differences found in the test output and\n", 65 " verified expected output.\n\n"; 53 66 exit(0); 54 67 } … … 138 151 s/allocate \d+ bytes at/allocate <N> bytes at/g; 139 152 s/v\d+.\d+.\d+/vX.X.X/g; 140 153 s/'xxx' \(\d+\)/'xxx' \(NUM\)/; 141 154 if (m/TestPoint:\s*([^\*]+)/) { 142 155 $testfile = $1; … … 181 194 s/allocate \d+ bytes at/allocate <N> bytes at/g; 182 195 s/v\d+.\d+.\d+/vX.X.X/g; 196 s/'xxx' \(\d+\)/'xxx' \(NUM\)/; 183 197 184 198 if (m/\*\*\*\*\*\* TESTPOINT \*\*\*\*\*\*/) { … … 255 269 exit(0); 256 270 } 271 257 272 exit($exitValue); 258 273 … … 352 367 353 368 # Perform difference on the STD stream files 354 $diffstdout = `diff $streamFile $tempFile`;369 $diffstdout = `diff -b -y --suppress-common-lines $streamFile $tempFile`; 355 370 356 371 # Check the return value of the difference … … 364 379 # Display message of the failure of difference to user 365 380 print STDERR "\tFailed - STDOUT differences\n"; 366 381 print STDERR $diffstdout if $printdiff; 367 382 # Exit value to indicate STDOUT did not compare 368 383 $returnVal |= 8; … … 372 387 # Display message of the failure of difference to user 373 388 print STDERR "\tFailed - STDERR differences\n"; 389 print STDERR $diffstdout if $printdiff; 374 390 375 391 # Exit value to indicate STDERR did not compare
Note:
See TracChangeset
for help on using the changeset viewer.
