Changeset e2114af in git for Tst/regress.cmd
- Timestamp:
- Jul 13, 1998, 11:22:54 AM (26 years ago)
- Branches:
- (u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
- Children:
- de80b3c31fb1416223e69bba22557229daaa6908
- Parents:
- 19fbf0a3717469b69ac8af448e962da5745a4ef3
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Tst/regress.cmd
r19fbf0 re2114af 2 2 3 3 ################################################################# 4 # $Id: regress.cmd,v 1.2 0 1998-07-03 10:05:54 obachman Exp $4 # $Id: regress.cmd,v 1.21 1998-07-13 09:14:54 obachman Exp $ 5 5 # FILE: regress.cmd 6 6 # PURPOSE: Script which runs regress test of Singular … … 64 64 65 65 $call = "$call > catch_$$"; 66 mysystem($call);66 & mysystem($call); 67 67 68 68 open(CATCH_FILE, "<catch_$$"); … … 72 72 } 73 73 close(CATCH_FILE); 74 mysystem("$rm -f catch_$$");74 & mysystem("$rm -f catch_$$"); 75 75 return $output; 76 76 } … … 105 105 } 106 106 # sed scripts which are applied to res files before they are diff'ed 107 $sed_scripts = "-e '/ \\/\\/.*used time:/d' -e '/\\/\\/.*tst_ignore:/d' -e '/error occurred in/d'";107 $sed_scripts = "-e '/used time:/d' -e '/tst_ignore:/d' -e '/Id: /d'"; 108 108 # default value (in %) above which differences are reported on -r 109 $report_val = 10;109 $report_val = 5; 110 110 # default value (in %) above which differences cause an error on -e 111 $error_val = 10;111 $error_val = 5; 112 112 # default value in 1/100 seconds, above which time differences are reported 113 113 $mintime_val = 10; … … 172 172 if ($verbosity > 0 && ! $WINNT) 173 173 { 174 $exit_status = &mysystem("$diff -w $root.res.cleaned $root.new.res.cleaned | $tee $root.diff");174 $exit_status = &mysystem("$diff -w -B $root.res.cleaned $root.new.res.cleaned | $tee $root.diff"); 175 175 } 176 176 else 177 177 { 178 $exit_status = &mysystem("$diff -w $root.res.cleaned $root.new.res.cleaned > $root.diff 2>&1");178 $exit_status = &mysystem("$diff -w -B $root.res.cleaned $root.new.res.cleaned > $root.diff 2>&1"); 179 179 } 180 180 … … 200 200 local($error_cause) = ""; 201 201 202 open(RES_FILE, "<$root.res"); 203 open(NEW_RES_FILE, "<$root.new.res"); 204 open(STATUS_DIFF_FILE, ">$root.status.diff"); 202 open(RES_FILE, "<$root.stat") || 203 return (1, "Can not open $root.stat \n"); 204 open(NEW_RES_FILE, "<$root.new.stat") || 205 return (1, "Can not open $root.new.stat \n"); 206 open(STATUS_DIFF_FILE, ">$root.stat.diff") || 207 return (1, "Can not open $root.stat.diff \n"); 208 205 209 $new_line = <NEW_RES_FILE>; 206 210 $line = <RES_FILE>; 207 211 while ($line && $new_line) 208 212 { 209 if ($line =~ /^STDIN\s*(\d+)/) 210 { 211 $prefix = "STDIN $1>"; 212 } 213 elsif ($line =~ /\/\/.*tst_ignore:(\w+).*$hostname:(\d+)/ && $checks{$1}) 214 { 215 $crit = $1; 216 $res = $2; 213 if ($line =~ /(\d+) >> (\w+) ::.*$hostname:(\d+)/ && $checks{$2}) 214 { 215 $prefix = $1; 216 $crit = $2; 217 $res = $3; 217 218 if ($res > $mintime_val && 218 $new_line =~ / \/\/.*tst_ignore:$crit.*$hostname:(\d+)/)219 $new_line =~ /$prefix >> $crit ::.*$hostname:(\d+)/) 219 220 { 220 221 $new_res = $1; … … 222 223 $res_diff_pc = int((($new_res / $res) - 1)*100); 223 224 $res_diff_line = 224 "$prefix $critnew:$new_res old:$res diff:$res_diff %:$res_diff_pc";225 "$prefix >> $crit :: new:$new_res old:$res diff:$res_diff %:$res_diff_pc"; 225 226 print (STATUS_DIFF_FILE "$res_diff_line\n") 226 227 if ((defined($error{$crit}) && $error{$crit}<abs($res_diff_pc)) … … 249 250 close(NEW_RES_FILE); 250 251 close(STATUS_DIFF_FILE); 251 mysystem("rm -f $root.stat us.diff")252 mysystem("rm -f $root.stat.diff") 252 253 if ($exit_status == 0 && $keep ne "yes"); 253 254 … … 260 261 local($line, $new_line, $crit, $res); 261 262 262 open(RES_FILE, "<$root.res"); 263 open(NEW_RES_FILE, "<$root.new.res"); 264 open(TEMP_FILE, ">$root.tmp.res"); 263 open(RES_FILE, "<$root.stat") || 264 return (1, "Can not open $root.stat \n"); 265 open(NEW_RES_FILE, "<$root.new.stat") || 266 return (1, "Can not open $root.new.stat \n"); 267 open(TEMP_FILE, ">$root.tmp.stat") || 268 return (1, "Can not open $root.tmp.stat \n"); 269 265 270 $new_line = <NEW_RES_FILE>; 266 271 $line = <RES_FILE>; 267 272 while ($line) 268 273 { 269 if ($new_line =~ /\/\/.*tst_ignore:(\w+).*$hostname:(\d+)/ && $merge{$1}) 270 { 271 $crit = $1; 272 $new_res = $2; 273 if ($line =~ /(.*)\/\/(.*)tst_ignore:$crit(.*)$hostname:(\d+)(.*)/) 274 if ($new_line =~ /(\d+) >> (\w+) ::.*$hostname:(\d+)/ && $merge{$2}) 275 { 276 $prefix = $1; 277 $crit = $2; 278 $new_res = $3; 279 if ($line =~ /$prefix >> $crit ::(.*)$hostname:(\d+)/) 280 { 281 $line =~ s/$hostname:$2/$hostname:$new_res/; 282 print(TEMP_FILE $line); 283 } 284 elsif ($line =~ /$prefix >> $crit ::(.*)/) 274 285 { 275 286 print(TEMP_FILE 276 "$1//$2tst_ignore:$crit$3$hostname:$new_res$4"); 277 } 278 elsif ($line =~ /(.*)\/\/(.*)tst_ignore:$crit(.*)/) 279 { 280 print(TEMP_FILE 281 "$1//$2tst_ignore:$crit$3 $hostname:$new_res\n"); 287 "$prefix >> $crit :: $hostname:$new_res $1\n"); 282 288 } 283 289 else 284 290 { 285 print "Warning: Merge problems: Generate before doing a merge" 286 if ($verbosity > 0); 287 print(TEMP_FILE $line); 291 close(RES_FILE); 292 close(NEW_RES_FILE); 293 close(TEMP_FILE); 294 &mysystem("$rm $root.tmp.stat"); 295 return (1, "Generate before doing a merge\n"); 288 296 } 289 297 } … … 298 306 close(NEW_RES_FILE); 299 307 close(TEMP_FILE); 300 mysystem("$mv $root.tmp.res $root.res")308 &mysystem("$mv -f $root.tmp.stat $root.stat"); 301 309 } 302 310 … … 384 392 } 385 393 386 # do status checks 387 ($exit_status, $error_cause) = & tst_status_check($root) 388 if (%checks && ! $exit_status && $generate ne "yes"); 394 if (%checks && ! $exit_status && $generate ne "yes") 395 { 396 & mysystem("$cp -f tst_status.out $root.new.stat"); 397 # do status checks 398 ($exit_status, $error_cause) = & tst_status_check($root); 399 } 400 389 401 390 402 # complain even if verbosity == 0 … … 397 409 398 410 #clean up 399 if ($generate eq "yes" || %merge) 400 { 411 if ($generate eq "yes") 412 { 413 & mysystem("$cp -f tst_status.out $root.stat"); 401 414 if (! $WINNT) 402 415 { 403 & tst_status_merge($root) if (%merge);404 416 &mysystem("$gzip -cf $root.res | $uuencode $root.res.gz > $root.res.gz.uu"); 405 417 } … … 409 421 print "Warning: Can not generate $root.res.gz.uu under Windows\n"; 410 422 } 411 } 412 423 424 } 425 elsif (%merge) 426 { 427 if (! -r "$root.stat") 428 { 429 & mysystem("$cp -f tst_status.out $root.stat"); 430 } 431 else 432 { 433 & mysystem("$cp -f tst_status.out $root.new.stat"); 434 ($exit_status, $error_cause) = & tst_status_merge($root); 435 436 print (STDERR "Warning: Merge Problems: $error_cause\n") 437 if ($verbosity > 0 && $exit_status); 438 } 439 } 440 413 441 if ($keep ne "yes") 414 442 { 415 &mysystem("$rm -f $root.new.res $root.res $root.diff");443 &mysystem("$rm -f tst_status.out $root.new.res $root.res $root.diff $root.new.stat"); 416 444 } 417 445 }
Note: See TracChangeset
for help on using the changeset viewer.