Changeset 6d01ca in git
- Timestamp:
- Dec 5, 2000, 3:26:27 PM (23 years ago)
- Branches:
- (u'spielwiese', '828514cf6e480e4bafc26df99217bf2a1ed1ef45')
- Children:
- fb6621e98cb726347270a24e92c13054fef3aed7
- Parents:
- ee7e8383100fa22353d12785c1e50be1f99bd4fb
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Tst/regress.cmd
ree7e83 r6d01ca 2 2 3 3 ################################################################# 4 # $Id: regress.cmd,v 1.3 4 2000-11-08 17:07:13obachman Exp $4 # $Id: regress.cmd,v 1.35 2000-12-05 14:26:27 obachman Exp $ 5 5 # FILE: regress.cmd 6 6 # PURPOSE: Script which runs regress test of Singular … … 20 20 [-h] -- print out help and exit 21 21 [-k] -- keep all intermediate files 22 [-v num] -- set verbosity to num (used range 0.. 3, default: 1)22 [-v num] -- set verbosity to num (used range 0..4, default: 2) 23 23 [-g] -- generate result (*.res.gz.uu) files, only 24 24 [-r [crit%[val]]] -- report if status differences [of crit] > val (in %) … … 29 29 [-t] -- compute and call system("mtrack", 1) at the end, no diffs 30 30 [-tt max] -- compute and call system("mtrack", max) at the end 31 [-T] -- simply compute and determine timmings, no diffs 31 32 [file.lst] -- read tst files from file.lst 32 33 [file.tst] -- test Singular script file.tst … … 58 59 $call =~ s/"/\\"/g; 59 60 $call = "$sh -c \"$call\""; 60 print "$call\n" if ($verbosity > 1);61 print "$call\n" if ($verbosity > 2); 61 62 return (system $call); 62 63 } … … 105 106 $singularOptions = "--ticks-per-sec=100 -teqr12345678 --no-rc"; 106 107 $keep = "no"; 107 $verbosity = 1;108 $verbosity = 2; 108 109 $generate = "no"; 109 110 $exit_code = 0; … … 372 373 local($system_call, $exit_status, $ignore_pattern, $error_cause); 373 374 374 print "--- $root\n" unless ($verbosity == 0); 375 print "--- $root " unless ($verbosity == 0); 376 $total_checks++; 377 375 378 # check for existence/readablity of tst and res file 376 379 if (! (-r "$root.tst")) … … 388 391 389 392 # generate $root.res 390 if ($generate ne "yes" && ! defined($mtrack) )393 if ($generate ne "yes" && ! defined($mtrack) && !defined($timings_only)) 391 394 { 392 395 if ((-r "$root.res.gz.uu") && ! ( -z "$root.res.gz.uu")) … … 413 416 { 414 417 $system_call = "$cat $root.tst | sed -e 's/\\\\\$/LIB \"general.lib\"; killall(); killall(\"proc\");kill killall;system(\"mtrack\", \"$root.mtrack.unused\", $mtrack); \\\$/' | $singular $singularOptions "; 415 $system_call .= ($verbosity > 2? " | $tee " : " > ");418 $system_call .= ($verbosity > 3 ? " | $tee " : " > "); 416 419 $system_call .= "$root.mtrack.res"; 417 $system_call .= " 2>&1 " if ($verbosity <= 2);420 $system_call .= " 2>&1 " if ($verbosity <= 3); 418 421 } 419 422 else … … 421 424 422 425 # prepare Singular run 423 if ($verbosity > 2&& !$WINNT)426 if ($verbosity > 3 && !$WINNT) 424 427 { 425 428 $system_call = "$cat $root.tst | $singular --execute 'string tst_status_file=\"$statfile\";' $singularOptions | $tee $resfile"; … … 431 434 } 432 435 # Go Singular, Go! 436 437 my ($user_t,$system_t,$cuser_t,$csystem_t) = times; 433 438 $exit_status = &mysystem($system_call); 434 439 my ($user_t,$system_t,$cuser_t2,$csystem_t2) = times; 440 $cuser_t = $cuser_t2 - $cuser_t; 441 $csystem_t = $csystem_t2 - $csystem_t; 435 442 if ($exit_status != 0) 436 443 { … … 446 453 $error_cause = "Segment fault"; 447 454 } 448 elsif (! defined($mtrack) )455 elsif (! defined($mtrack) && !defined($timings_only)) 449 456 { 450 457 &mysystem("$rm -f $root.diff"); … … 524 531 } 525 532 # und tschuess 533 unless ($verbosity == 0) 534 { 535 if ($verbosity > 1 || $timings_only) 536 { 537 my $used_time = $cuser_t + $csystem_t; 538 $total_used_time += $used_time; 539 $lst_used_time += $used_time; 540 print " " x (23 - length($root)); 541 printf("%.2f", $used_time); 542 } 543 print " \n"; 544 } 545 $total_checks_pass++ unless $exit_code; 526 546 return ($exit_status); 527 547 } … … 564 584 { 565 585 $mtrack = 1; 586 } 587 elsif (/^-T/) 588 { 589 $timings_only = 1; 566 590 } 567 591 elsif(/^-r$/) … … 701 725 $base = $2; 702 726 chdir($path); 703 print "cd $path\n" if ($verbosity > 1);727 print "cd $path\n" if ($verbosity > 2); 704 728 } 705 729 else … … 717 741 elsif ($extension eq "lst") 718 742 { 743 719 744 if (! open(LST_FILE, "<$file")) 720 745 { … … 723 748 next; 724 749 } 750 $lst_used_time = 0; 751 $lst_checks = 0; 752 $lst_checks_pass = 0; 725 753 while (<LST_FILE>) 726 754 { … … 739 767 $tst_base = $2; 740 768 chdir($tst_path); 741 print "cd $tst_path\n" if ($verbosity > 1);769 print "cd $tst_path\n" if ($verbosity > 2); 742 770 } 743 771 else … … 748 776 $tst_base =~ s/^\s*//; 749 777 $tst_base =~ s/(.*?)\s+.*/$1/; 750 $exit_code = &tst_check($tst_base) || $exit_code; 778 $lst_checks++; 779 my $this_exit_code = &tst_check($tst_base); 780 $lst_checks_pass++ unless $this_exit_code; 781 $exit_code = $this_exit_code || $exit_code; 751 782 752 783 if ($tst_path ne "") 753 784 { 754 785 chdir($tst_curr_dir); 755 print "cd $tst_curr_dir\n" if ($verbosity > 1);786 print "cd $tst_curr_dir\n" if ($verbosity > 2); 756 787 } 757 788 } 758 789 close (LST_FILE); 790 printf("$base Summary: Checks:$lst_checks Failed:%d Time:%.2f\n", $lst_checks - $lst_checks_pass, $lst_used_time) 791 unless ($verbosity < 2) 759 792 } 760 793 else … … 766 799 { 767 800 chdir($curr_dir); 768 print "cd $curr_dir\n" if ($verbosity > 1); 769 } 801 print "cd $curr_dir\n" if ($verbosity > 2); 802 } 803 } 804 805 unless ($verbosity < 2 || $lst_checks == $total_checks) 806 { 807 printf("Summary: Checks:$total_checks Failed:%d Time:%.2f\n", $total_checks - $total_checks_pass, $total_used_time); 770 808 } 771 809
Note: See TracChangeset
for help on using the changeset viewer.