Changeset 1545
- Timestamp:
- Aug 13, 2004, 4:27:02 PM (22 years ago)
- Location:
- trunk/psLib/test
- Files:
-
- 3 edited
-
FullUnitTest (modified) (13 diffs)
-
runTest (modified) (9 diffs)
-
sysUtils/verified/tst_psMemory.stderr (modified) (2 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 -
trunk/psLib/test/runTest
r1490 r1545 30 30 # 31 31 # $Revison: $ $Name: not supported by cvs2svn $ 32 # $Date: 2004-08-1 1 23:42:49$32 # $Date: 2004-08-14 02:27:02 $ 33 33 # 34 34 # Copyright 2004 Maui High Performance Computering Center, University of Hawaii … … 48 48 49 49 if ($help) { 50 print "Usage: runTest [--reset] [--resetStderr] [--resetStdout] testfile(s)\n\n"; 50 print 51 "Usage: runTest [--reset] [--resetStderr] [--resetStdout] testfile(s)\n\n"; 51 52 exit(0); 52 53 } … … 124 125 # Display failure message with return value to user 125 126 if ( $? != 0 && ( $testFile !~ /^A/i ) ) { 126 print(" Failed - Test Driver expected 0 return value (Return value $?)\n"); 127 print( 128 " Failed - Test Driver expected 0 return value (Return value $?)\n" 129 ); 127 130 } 128 131 elsif ( $? == 0 && ( $testFile =~ /^A/i ) ) { 129 print(" Failed - Test Driver expected abort (Return value $?)\n"); 132 print( 133 " Failed - Test Driver expected abort (Return value $?)\n" 134 ); 130 135 } 131 136 $exitValue |= 256; … … 144 149 open( MODFILE2, "> verified/$testFile.stdout" ) if $resetStdout; 145 150 146 # Replace the variable date, time and host information with constants151 # Replace the variable date, time and host information with constants 147 152 $hostname = `hostname`; 148 153 chop $hostname; … … 153 158 s/: Line \d+/: Line <LINENO>/g; 154 159 s/\:\d+/\:<LINENO>/g; 155 156 # Filter lines with malloc. This is an artifact of memory testing 157 # with the Mac testbed 160 s/allocate \d+ bytes at/allocate <N> bytes at/g; 161 162 # Filter lines with malloc. This is an artifact of memory testing 163 # with the Mac testbed 158 164 if ( !m/\*\*\*\smalloc/ ) { 159 165 print MODFILE ($_); … … 176 182 open( MODFILE2, "> verified/$testFile.stderr" ) if $resetStderr; 177 183 178 # Replace the variable date, time and host information with constants184 # Replace the variable date, time and host information with constants 179 185 while (<OUTFILE>) { 180 186 s/\s+\d+:\d+:\d+\w/<TIME>/g; … … 183 189 s/: Line \d+/: Line <LINENO>/g; 184 190 s/\:\d+/\:<LINENO>/g; 185 186 # Filter lines with malloc. This is an artifact of memory testing 187 # with the Mac testbed 191 s/allocate \d+ bytes at/allocate <N> bytes at/g; 192 193 # Filter lines with malloc. This is an artifact of memory testing 194 # with the Mac testbed 188 195 if ( !m/\*\*\*\smalloc/ ) { 189 196 print MODFILE ($_); … … 226 233 # Since test driver doesn't exist or is not executable then display 227 234 # message to user. 228 print(" Need to specify an executable test file within directory.\n"); 235 print( 236 " Need to specify an executable test file within directory.\n" 237 ); 229 238 230 239 # Exit value set to indicate test driver doesn't exist or not executable … … 279 288 { 280 289 if ( $fileName =~ m/out/ ) { 281 print(" Failed - File $fileName contains error strings.\n"); 290 print( 291 " Failed - File $fileName contains error strings.\n" 292 ); 282 293 $returnVal = 64; 283 294 } 284 295 elsif ( $fileName =~ m/err/ ) { 285 print(" Failed - File $fileName contains error strings.\n"); 296 print( 297 " Failed - File $fileName contains error strings.\n" 298 ); 286 299 $returnVal = 128; 287 300 } -
trunk/psLib/test/sysUtils/verified/tst_psMemory.stderr
r1404 r1545 17 17 <DATE><TIME>|<HOST>|I| TPOutOfMemory|Upon requesting more memory than is available, psalloc shall call the psMemExhaustedCallback. 18 18 <DATE><TIME>|<HOST>|I|TPOutOfMemoryEx|Custom MemExhaustedCallback was invoked. 19 <DATE><TIME>|<HOST>|A| p_psAlloc|Failed to allocate 4294966295bytes at tst_psMemory.c:<LINENO>19 <DATE><TIME>|<HOST>|A| p_psAlloc|Failed to allocate <N> bytes at tst_psMemory.c:<LINENO> 20 20 21 21 ---> TESTPOINT PASSED (psMemory{outOfMemory} | tst_psMemory.c) … … 28 28 29 29 <DATE><TIME>|<HOST>|I|TPReallocOutOfM|Upon requesting more memory than is available, psRealloc shall call the psMemExhaustedCallback. 30 <DATE><TIME>|<HOST>|A| p_psRealloc|Failed to reallocate -1001bytes at tst_psMemory.c:<LINENO>30 <DATE><TIME>|<HOST>|A| p_psRealloc|Failed to reallocate <N> bytes at tst_psMemory.c:<LINENO> 31 31 32 32 ---> TESTPOINT PASSED (psMemory{reallocOutOfMemory} | tst_psMemory.c)
Note:
See TracChangeset
for help on using the changeset viewer.
