IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Aug 13, 2004, 4:27:02 PM (22 years ago)
Author:
desonia
Message:

fixed the problem of SIZE_MAX being system dependent by filtering it
out during the verification.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/test/FullUnitTest

    r1490 r1545  
    1919#  RETURN : integer number of tests which failed
    2020#
    21 #  $Revision: 1.12 $  $Name: not supported by cvs2svn $
    22 #  $Date: 2004-08-11 23:42:49 $
     21#  $Revision: 1.13 $  $Name: not supported by cvs2svn $
     22#  $Date: 2004-08-14 02:27:02 $
    2323#
    2424#  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    125125    # Display summary of failures
    126126    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;
    130134}
    131135else {
     
    133137    # Display message of all makes and tests pass to user if silent option
    134138    # 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 );
    136143}
    137144
     
    327334                if ( &checkForVerifiedDirectory() ) {
    328335
    329                     # Display message to user that verified directories do not
    330                     # exist eventhough TST files have been found
    331                     #                    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");
    332339                    print("No verified subdirectory present.\n") if ($verbose);
    333340
    334                     # Increment test fail count
    335                     #                   $testDriverFailCount++;
    336                     # Save the file failed
    337                     #                    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;
    339346                }
    340347            }
     
    344351
    345352            # 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            );
    347356            $retVal = $?;
    348357
     
    351360            $totalPoints = `grep -c $testPattern temp/$files[$j].stdout`;
    352361            $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`;
    355366            $testpointFailCount += $failPoints;
    356367            $totalTestpoints    += $totalPoints;
     
    363374                # Display test driver failed
    364375                $failPoints++;
    365                 print("Test driver: $files[$j] Failed (Return value $retVal).\n");
     376                print(
     377                    "Test driver: $files[$j] Failed (Return value $retVal).\n");
    366378
    367379                # Increment the total number of test failed
     
    373385            else {
    374386
    375                 # Create filter versions of STDOUT and STDERR to replace variable
    376                 # items such as date, time and host
     387               # Create filter versions of STDOUT and STDERR to replace variable
     388               # items such as date, time and host
    377389                &filterStdFiles( $files[$j] );
    378390
     
    392404
    393405                    # 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                      )
    395409                      if ( !$silent );
    396410                    push( @testsFailed, $pwd . "/" . $files[$j] );
     
    412426
    413427                        # 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                          )
    415431                          if ( !$silent );
    416432                        push( @testsFailed, $pwd . "/" . $files[$j] );
    417433                    }
    418434                    else {
    419                         print("Test successful ($totalPoints testpoints)\n") if ( !$silent );
     435                        print("Test successful ($totalPoints testpoints)\n")
     436                          if ( !$silent );
    420437                    }
    421438                }
     
    462479            print;
    463480            if ( $fileName =~ m/out/ ) {
    464                 print("        Failed - File $fileName contains error strings.\n");
     481                print(
     482                    "        Failed - File $fileName contains error strings.\n"
     483                );
    465484                $returnVal = 64;
    466485            }
    467486            elsif ( $fileName =~ m/err/ ) {
    468                 print("        Failed - File $fileName contains error strings.\n");
     487                print(
     488                    "        Failed - File $fileName contains error strings.\n"
     489                );
    469490                $returnVal = 128;
    470491            }
     
    644665        s/: Line \d+/: Line <LINENO>/g;
    645666        s/\:\d+/\:<LINENO>/g;
     667        s/allocate \d+ bytes at/allocate <N> bytes at/g;
    646668
    647669        # Filter lines with *** malloc.  This is an artifact of Mac testing of
     
    671693        s/: Line \d+/: Line <LINENO>/g;
    672694        s/\:\d+/\:<LINENO>/g;
     695        s/allocate \d+ bytes at/allocate <N> bytes at/g;
    673696
    674697        # Filter lines with *** malloc.  This is an artifact of Mac testing of
Note: See TracChangeset for help on using the changeset viewer.