Changeset 3246 for trunk/psLib/test/runTest
- Timestamp:
- Feb 16, 2005, 3:58:43 PM (21 years ago)
- File:
-
- 1 edited
-
trunk/psLib/test/runTest (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/test/runTest
r3226 r3246 26 26 # 27 27 # $Revison: $ $Name: not supported by cvs2svn $ 28 # $Date: 2005-02-1 5 19:53:19$28 # $Date: 2005-02-17 01:58:42 $ 29 29 # 30 30 # Copyright 2004 Maui High Performance Computering Center, University of Hawaii … … 119 119 $exitValue |= 64; 120 120 } 121 else { 122 123 # Test driver succeeded. 124 125 # Create filtered version of stdout and stderr 126 127 # Open the STDOUT file for reading128 open( OUTFILE, "< temp/$testFile.stdout" ); 129 130 # Open mod file to place filtered STDOUT131 open( MODFILE, "> temp/$testFile.stdout.mod" );132 open( MODFILE2, "> $verifiedDir/$testFile.stdout" ) if $resetStdout; 133 134 # Replace the variable date, time and host information with constants135 $hostname = `hostname`;136 chop $hostname;137 while (<OUTFILE>) {138 s/\s+\d+:\d+:\d+\w/<TIME>/g;139 s/\d+:\d+:\d+/<DATE>/g;140 s/$hostname\s*/<HOST>/g;141 s/: Line \d+/: Line <LINENO>/g;142 s/\(.*\:\d+\)/\(FILE\:LINENO\)/g;143 s/allocate \d+ bytes at/allocate <N> bytes at/g;144 145 # Filter lines with malloc. This is an artifact of memory testing146 # with the Mac testbed147 if ( !m/\*\*\*\smalloc/ ) {148 print MODFILE ($_);149 print MODFILE2 ($_) if $resetStdout;150 }151 }152 153 # Close mod file154 close(MODFILE);155 close(MODFILE2) if $resetStdout;156 157 # Close STDERR file158 close(OUTFILE);159 160 # Open the STDERR file for reading161 open( OUTFILE, "< temp/$testFile.stderr" );162 163 # Open mod file to place filtered STDERR164 open( MODFILE, "> temp/$testFile.stderr.mod" );165 open( MODFILE2, "> $verifiedDir/$testFile.stderr" ) if $resetStderr;166 167 # Replace the variable date, time and host information with constants168 while (<OUTFILE>) {169 s/\s+\d+:\d+:\d+\w/<TIME>/g;170 s/\d+:\d+:\d+/<DATE>/g;171 s/$hostname\s*/<HOST>/g;172 s/: Line \d+/: Line <LINENO>/g;173 s/\(.*\:\d+\)/\(FILE\:LINENO\)/g;174 s/allocate \d+ bytes at/allocate <N> bytes at/g;175 176 # Filter lines with malloc. This is an artifact of memory testing 177 # with the Mac testbed178 if ( !m/\*\*\*\smalloc/ ) {179 print MODFILE ($_);180 print MODFILE2 ($_) if $resetStderr;181 }182 } 183 184 # Close mod file 185 close(MODFILE);186 close(MODFILE2) if $resetStderr;187 188 # Close STDERR file 189 close(OUTFILE);190 191 # Compare STDOUT capture with verified file 192 $exitValue |= &compareStream("$verifiedDir/$testFile.stdout");193 194 # Check exit value to determine if verified file doesn't exist 195 if ( $exitValue & 2 ) {196 197 # STDOUT verified doesn't exist. Search STDOUT capture 198 # for strings indicating error or failure199 $exitValue |= &errorStrSearch("$testFile.stdout");200 }201 202 # Compare STDERR capture with verified file 203 $exitValue |= &compareStream("$verifiedDir/$testFile.stderr");204 205 # Check exit value to determine if verified file doesn't exist 206 if ( $exitValue & 4 ) {207 208 # STDERR verified doesn't exist. Search STDERR capture 209 # for strings indicating error or failure210 $exitValue |= &errorStrSearch("$testFile.stderr");211 }212 } 213 }121 122 # Test driver succeeded. 123 124 # Create filtered version of stdout and stderr 125 126 # Open the STDOUT file for reading 127 open( OUTFILE, "< temp/$testFile.stdout" ); 128 129 # Open mod file to place filtered STDOUT 130 open( MODFILE, "> temp/$testFile.stdout.mod" ); 131 open( MODFILE2, "> $verifiedDir/$testFile.stdout" ) if $resetStdout; 132 133 # Replace the variable date, time and host information with constants 134 $hostname = `hostname`; 135 chop $hostname; 136 while (<OUTFILE>) { 137 s/\s+\d+:\d+:\d+\w/<TIME>/g; 138 s/\d+:\d+:\d+/<DATE>/g; 139 s/$hostname\s*/<HOST>/g; 140 s/: Line \d+/: Line <LINENO>/g; 141 s/\(.*\:\d+\)/\(FILE\:LINENO\)/g; 142 s/\s+[\_\-\/\.\w]+\:\d+/ FILE\:LINENO/g; 143 s/allocate \d+ bytes at/allocate <N> bytes at/g; 144 145 # Filter lines with malloc. This is an artifact of memory testing 146 # with the Mac testbed 147 if ( !m/\*\*\*\smalloc/ ) { 148 print MODFILE ($_); 149 print MODFILE2 ($_) if $resetStdout; 150 } 151 } 152 153 # Close mod file 154 close(MODFILE); 155 close(MODFILE2) if $resetStdout; 156 157 # Close STDERR file 158 close(OUTFILE); 159 160 # Open the STDERR file for reading 161 open( OUTFILE, "< temp/$testFile.stderr" ); 162 163 # Open mod file to place filtered STDERR 164 open( MODFILE, "> temp/$testFile.stderr.mod" ); 165 open( MODFILE2, "> $verifiedDir/$testFile.stderr" ) if $resetStderr; 166 167 # Replace the variable date, time and host information with constants 168 while (<OUTFILE>) { 169 s/\s+\d+:\d+:\d+\w/<TIME>/g; 170 s/\d+:\d+:\d+/<DATE>/g; 171 s/$hostname\s*/<HOST>/g; 172 s/: Line \d+/: Line <LINENO>/g; 173 s/\(.*\:\d+\)/\(FILE\:LINENO\)/g; 174 s/\s+[\_\-\/\.\w]+\:\d+/ FILE\:LINENO/g; 175 s/allocate \d+ bytes at/allocate <N> bytes at/g; 176 177 # Filter lines with malloc. This is an artifact of memory testing 178 # with the Mac testbed 179 if ( !m/\*\*\*\smalloc/ ) { 180 print MODFILE ($_); 181 print MODFILE2 ($_) if $resetStderr; 182 } 183 } 184 185 # Close mod file 186 close(MODFILE); 187 close(MODFILE2) if $resetStderr; 188 189 # Close STDERR file 190 close(OUTFILE); 191 192 # Compare STDOUT capture with verified file 193 $exitValue |= &compareStream("$verifiedDir/$testFile.stdout"); 194 195 # Check exit value to determine if verified file doesn't exist 196 if ( $exitValue & 2 ) { 197 198 # STDOUT verified doesn't exist. Search STDOUT capture 199 # for strings indicating error or failure 200 $exitValue |= &errorStrSearch("$testFile.stdout"); 201 } 202 203 # Compare STDERR capture with verified file 204 $exitValue |= &compareStream("$verifiedDir/$testFile.stderr"); 205 206 # Check exit value to determine if verified file doesn't exist 207 if ( $exitValue & 4 ) { 208 209 # STDERR verified doesn't exist. Search STDERR capture 210 # for strings indicating error or failure 211 $exitValue |= &errorStrSearch("$testFile.stderr"); 212 } 213 } 214 214 else { 215 215 … … 303 303 # 304 304 # Return: 0 - Compare successful 305 # 2 - STDOUT verified file doesn't exist306 # 4 - STDERR verified file doesn't exist307 305 # 8 - STDOUT verified file doesn't compare 308 306 # 16 - STDERR verified file doesn't compare … … 316 314 317 315 # Check for existence of verified STD stream files 318 if ( !( -e $streamFile ) ) { 319 320 # Display message to user that verified STDOUT file doesn't exist 321 print(" File $streamFile doesn't exist.\n"); 322 } 323 else { 316 if ( -e $streamFile ) { 324 317 325 318 # Verified STD stream file exists
Note:
See TracChangeset
for help on using the changeset viewer.
