Changeset 1545 for trunk/psLib/test/FullUnitTest
- Timestamp:
- Aug 13, 2004, 4:27:02 PM (22 years ago)
- File:
-
- 1 edited
-
trunk/psLib/test/FullUnitTest (modified) (13 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/test/FullUnitTest
r1490 r1545 19 19 # RETURN : integer number of tests which failed 20 20 # 21 # $Revision: 1.1 2$ $Name: not supported by cvs2svn $22 # $Date: 2004-08-1 1 23:42:49$21 # $Revision: 1.13 $ $Name: not supported by cvs2svn $ 22 # $Date: 2004-08-14 02:27:02 $ 23 23 # 24 24 # Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 125 125 # Display summary of failures 126 126 print("\nMake Failures = $makeFailCount out of $totalMakes"); 127 print("\nTest Driver Failures = $testDriverFailCount out of $totalTestDrivers\n"); 128 print( "\nMakes that failed:\n " . join( "\n ", @makesFailed ) . "\n" ) if $makeFailCount; 129 print( "\nTests that failed:\n " . join( "\n ", @testsFailed ) . "\n" ) if $testDriverFailCount; 127 print( 128 "\nTest Driver Failures = $testDriverFailCount out of $totalTestDrivers\n" 129 ); 130 print( "\nMakes that failed:\n " . join( "\n ", @makesFailed ) . "\n" ) 131 if $makeFailCount; 132 print( "\nTests that failed:\n " . join( "\n ", @testsFailed ) . "\n" ) 133 if $testDriverFailCount; 130 134 } 131 135 else { … … 133 137 # Display message of all makes and tests pass to user if silent option 134 138 # not specified 135 print("\nAll $totalTestDrivers Test Drivers Passed with $totalTestpoints Testpoints.\n") if ( !$silent ); 139 print( 140 "\nAll $totalTestDrivers Test Drivers Passed with $totalTestpoints Testpoints.\n" 141 ) 142 if ( !$silent ); 136 143 } 137 144 … … 327 334 if ( &checkForVerifiedDirectory() ) { 328 335 329 # Display message to user that verified directories do not330 # exist eventhough TST files have been found331 # print("Unable to execute test drivers in $base_dir\n");336 # Display message to user that verified directories do not 337 # exist eventhough TST files have been found 338 # print("Unable to execute test drivers in $base_dir\n"); 332 339 print("No verified subdirectory present.\n") if ($verbose); 333 340 334 # Increment test fail count335 # $testDriverFailCount++;336 # Save the file failed337 # push(@testsFailed, $pwd . "/" . $files[$j]);338 # return;341 # Increment test fail count 342 # $testDriverFailCount++; 343 # Save the file failed 344 # push(@testsFailed, $pwd . "/" . $files[$j]); 345 # return; 339 346 } 340 347 } … … 344 351 345 352 # Execute the test driver 346 system("./$files[$j] 1> temp/$files[$j].stdout 2> temp/$files[$j].stderr"); 353 system( 354 "./$files[$j] 1> temp/$files[$j].stdout 2> temp/$files[$j].stderr" 355 ); 347 356 $retVal = $?; 348 357 … … 351 360 $totalPoints = `grep -c $testPattern temp/$files[$j].stdout`; 352 361 $totalPoints += `grep -c $testPattern temp/$files[$j].stderr`; 353 $failPoints = `grep "> TESTPOINT FAILED" temp/$files[$j].stdout | wc -l`; 354 $failPoints += `grep "> TESTPOINT FAILED" temp/$files[$j].stderr | wc -l`; 362 $failPoints = 363 `grep "> TESTPOINT FAILED" temp/$files[$j].stdout | wc -l`; 364 $failPoints += 365 `grep "> TESTPOINT FAILED" temp/$files[$j].stderr | wc -l`; 355 366 $testpointFailCount += $failPoints; 356 367 $totalTestpoints += $totalPoints; … … 363 374 # Display test driver failed 364 375 $failPoints++; 365 print("Test driver: $files[$j] Failed (Return value $retVal).\n"); 376 print( 377 "Test driver: $files[$j] Failed (Return value $retVal).\n"); 366 378 367 379 # Increment the total number of test failed … … 373 385 else { 374 386 375 # Create filter versions of STDOUT and STDERR to replace variable376 # items such as date, time and host387 # Create filter versions of STDOUT and STDERR to replace variable 388 # items such as date, time and host 377 389 &filterStdFiles( $files[$j] ); 378 390 … … 392 404 393 405 # Push test on failed list 394 print("Test failed ($failPoints out of $totalPoints testpoints failed)\n") 406 print( 407 "Test failed ($failPoints out of $totalPoints testpoints failed)\n" 408 ) 395 409 if ( !$silent ); 396 410 push( @testsFailed, $pwd . "/" . $files[$j] ); … … 412 426 413 427 # Push test on failed list 414 print("Test failed ($failPoints out of $totalPoints testpoints failed)\n") 428 print( 429 "Test failed ($failPoints out of $totalPoints testpoints failed)\n" 430 ) 415 431 if ( !$silent ); 416 432 push( @testsFailed, $pwd . "/" . $files[$j] ); 417 433 } 418 434 else { 419 print("Test successful ($totalPoints testpoints)\n") if ( !$silent ); 435 print("Test successful ($totalPoints testpoints)\n") 436 if ( !$silent ); 420 437 } 421 438 } … … 462 479 print; 463 480 if ( $fileName =~ m/out/ ) { 464 print(" Failed - File $fileName contains error strings.\n"); 481 print( 482 " Failed - File $fileName contains error strings.\n" 483 ); 465 484 $returnVal = 64; 466 485 } 467 486 elsif ( $fileName =~ m/err/ ) { 468 print(" Failed - File $fileName contains error strings.\n"); 487 print( 488 " Failed - File $fileName contains error strings.\n" 489 ); 469 490 $returnVal = 128; 470 491 } … … 644 665 s/: Line \d+/: Line <LINENO>/g; 645 666 s/\:\d+/\:<LINENO>/g; 667 s/allocate \d+ bytes at/allocate <N> bytes at/g; 646 668 647 669 # Filter lines with *** malloc. This is an artifact of Mac testing of … … 671 693 s/: Line \d+/: Line <LINENO>/g; 672 694 s/\:\d+/\:<LINENO>/g; 695 s/allocate \d+ bytes at/allocate <N> bytes at/g; 673 696 674 697 # Filter lines with *** malloc. This is an artifact of Mac testing of
Note:
See TracChangeset
for help on using the changeset viewer.
