Changeset 93e538 in git
- Timestamp:
- Sep 25, 2011, 3:01:48 PM (12 years ago)
- Branches:
- (u'spielwiese', '0d6b7fcd9813a1ca1ed4220cfa2b104b97a0a003')
- Children:
- ebb444a1138dec379dd2d5ea481af6ab2c9549a1
- Parents:
- dfe91490479da83403139f2a696204e62e644b87
- git-author:
- Oleksandr Motsak <motsak@mathematik.uni-kl.de>2011-09-25 15:01:48+02:00
- git-committer:
- Mohamed Barakat <mohamed.barakat@rwth-aachen.de>2011-11-09 16:13:28+01:00
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Tst/regress.cmd
rdfe914 r93e538 73 73 74 74 $call = "$call > catch_$$"; 75 &mysystem($call);75 mysystem($call); 76 76 77 77 open(CATCH_FILE, "<catch_$$"); … … 81 81 } 82 82 close(CATCH_FILE); 83 &mysystem("$rm -f catch_$$");83 mysystem("$rm -f catch_$$"); 84 84 return $output; 85 85 } 86 86 87 $WINNT = 1 if ( &mysystem("uname -a | $grep CYGWIN > /dev/null 2>&1") == 0);87 $WINNT = 1 if (mysystem("uname -a | $grep CYGWIN > /dev/null 2>&1") == 0); 88 88 $uuencode = "uuencode"; 89 89 $uudecode = "uudecode"; … … 129 129 # default value in 1/100 seconds, above which time differences are reported 130 130 $mintime_val = 100; 131 $hostname = &mysystem_catch("hostname");131 $hostname = mysystem_catch("hostname"); 132 132 chop $hostname; 133 133 … … 137 137 $test_file = ""; 138 138 139 139 # all previous test_file's: 140 %test_files = (); 140 141 141 142 … … 147 148 { 148 149 local($prop) = $_[0]; 149 return( &mysystem_catch("cat \"\$TEAMCITY_BUILD_PROPERTIES_FILE\"|grep \"$prop=\"|sed \"s/$prop=//\"") );150 return( mysystem_catch("cat \"\$TEAMCITY_BUILD_PROPERTIES_FILE\"|grep \"$prop=\"|sed \"s/$prop=//\"") ); 150 151 } 151 152 … … 222 223 local($text) = $_[0]; 223 224 putTCmsgNV2( "message", "text", $text, "status", "NORMAL"); 225 } 226 sub tcWarn 227 { 228 local($text) = $_[0]; 229 putTCmsgNV2( "message", "text", $text, "status", "WARNING"); 224 230 } 225 231 sub tcError … … 299 305 sub GetSingularVersionDate 300 306 { 301 &mysystem("$singular -t -v --execute=\"exit;\"> SingularVersionDate");307 mysystem("$singular -t -v --execute=\"exit;\"> SingularVersionDate"); 302 308 open(FD, "<SingularVersionDate"); 303 309 while (<FD>) … … 310 316 } 311 317 close(FD); 312 &mysystem("if [ -e /proc/cpuinfo ]; then cat /proc/cpuinfo >> SingularVersionDate; fi ");313 &mysystem("sysctl -a >> SingularVersionDate");314 &mysystem("uname -a >> SingularVersionDate");315 &mysystem("if [ -e /proc/meminfo ]; then cat /proc/meminfo >> SingularVersionDate; fi ");316 &mysystem("free -h >> SingularVersionDate");318 mysystem("if [ -e /proc/cpuinfo ]; then cat /proc/cpuinfo >> SingularVersionDate; fi "); 319 mysystem("sysctl -a >> SingularVersionDate"); 320 mysystem("uname -a >> SingularVersionDate"); 321 mysystem("if [ -e /proc/meminfo ]; then cat /proc/meminfo >> SingularVersionDate; fi "); 322 mysystem("free -h >> SingularVersionDate"); 317 323 } 318 324 … … 325 331 print(MP_TEST "system(\"with\", \"MP\"); \$"); 326 332 close(MP_TEST); 327 &mysystem("$singular -qt MPTest > withMPtest");333 mysystem("$singular -qt MPTest > withMPtest"); 328 334 if (open(MP_TEST, "<withMPtest")) 329 335 { … … 332 338 close(MP_TEST); 333 339 } 334 &mysystem("$rm -f withMPtest MPTest");340 mysystem("$rm -f withMPtest MPTest"); 335 341 } 336 342 } … … 363 369 364 370 # prepare the result files: 365 &mysystem("$cat \"$root.res\" | $tr -d '\\013' | $sed $sed_scripts > \"$root.res.cleaned\"");366 &mysystem("$cat \"$root.new.res\" | $tr -d '\\013' | $sed $sed_scripts > \"$root.new.res.cleaned\"");371 mysystem("$cat \"$root.res\" | $tr -d '\\013' | $sed $sed_scripts > \"$root.res.cleaned\""); 372 mysystem("$cat \"$root.new.res\" | $tr -d '\\013' | $sed $sed_scripts > \"$root.new.res.cleaned\""); 367 373 368 374 # doo the diff call 369 $exit_status = &mysystem("$diff -w -b \"$root.res.cleaned\" \"$root.new.res.cleaned\" > \"$root.diff\" 2>&1");375 $exit_status = mysystem("$diff -w -b \"$root.res.cleaned\" \"$root.new.res.cleaned\" > \"$root.diff\" 2>&1"); 370 376 371 377 # clean up time 372 &mysystem("$rm -f \"$root.res.cleaned\" \"$root.new.res.cleaned\"");378 mysystem("$rm -f \"$root.res.cleaned\" \"$root.new.res.cleaned\""); 373 379 374 380 # there seems to be a bug here somewhere: even if diff reported … … 505 511 close(NEW_RES_FILE); 506 512 close(TEMP_FILE); 507 &mysystem("$rm \"$root.tmp.stat\"");513 mysystem("$rm \"$root.tmp.stat\""); 508 514 return (1, "Can not find '$prefix >> $crit' in $root.stat\n"); 509 515 } … … 525 531 close(NEW_RES_FILE); 526 532 close(TEMP_FILE); 527 &mysystem("$mv -f \"$root.tmp.stat\" \"$root.stat\"");528 &mysystem("$rm -f \"$root.new.stat\" \"$root.stat.sdiff\"") unless $keep eq "yes";533 mysystem("$mv -f \"$root.tmp.stat\" \"$root.stat\""); 534 mysystem("$rm -f \"$root.new.stat\" \"$root.stat.sdiff\"") unless $keep eq "yes"; 529 535 return ; 530 536 } … … 535 541 local($system_call, $exit_status, $ignore_pattern, $error_cause); 536 542 543 if( exists($test_files{$test_file}) && (length($teamcity) > 0) ) 544 { 545 tcWarn("The test '$test_file' have been alreeady tests (with result: $test_files{$test_file})... skipping!"); 546 return ($test_files{$test_file}) 547 } 548 537 549 $total_checks++; 538 550 539 551 # check for existence/readablity of tst and res file 540 552 if (! (-r "$root.tst")) … … 543 555 print (STDERR "Can not read $root.tst\n"); 544 556 testIgnored($test_file, "Can not read $root.tst"); 557 $test_files{$test_file} = 1; 545 558 return (1); 546 559 } 547 560 548 561 # ignore MP stuff, if this singular does not have MP 549 if (! &MPok($root))562 if (! MPok($root)) 550 563 { 551 564 print "--- $root " unless ($verbosity == 0); 552 565 print "Warning: $root not tested: needs MP\n"; 553 566 testIgnored($test_file, "Warning: $root not tested: needs MP"); 567 $test_files{$test_file} = 0; 554 568 return (0); 555 569 } … … 560 574 if ((-r "$root.res.gz.uu") && ! ( -z "$root.res.gz.uu")) 561 575 { 562 $exit_status = &mysystem("$uudecode \"$root.res.gz.uu\" > /dev/null 2>&1; $gunzip -f \"$root.res.gz\"");576 $exit_status = mysystem("$uudecode \"$root.res.gz.uu\" > /dev/null 2>&1; $gunzip -f \"$root.res.gz\""); 563 577 if ($exit_status) 564 578 { … … 566 580 print (STDERR "Can not decode $root.res.gz.uu\n"); 567 581 testIgnored($test_file, "Can not decode $root.res.gz.uu"); 582 $test_files{$test_file} = $exit_status; 568 583 return ($exit_status); 569 584 } … … 574 589 print (STDERR "Can not read $root.res[.gz.uu]\n"); 575 590 testIgnored($test_file, "Can not read $root.res[.gz.uu]"); 591 $test_files{$test_file} = 1; 576 592 return (1); 577 593 } … … 584 600 $resfile = "\"$root.mtrack.res\"" if (defined($mtrack)); 585 601 my $statfile = "$root.new.stat"; 586 &mysystem("$rm -f \"$statfile\"");602 mysystem("$rm -f \"$statfile\""); 587 603 588 604 if (defined($mtrack)) … … 609 625 610 626 my ($user_t,$system_t,$cuser_t,$csystem_t) = times; 611 $exit_status = &mysystem($system_call);627 $exit_status = mysystem($system_call); 612 628 my ($user_t,$system_t,$cuser_t2,$csystem_t2) = times; 613 629 $cuser_t = $cuser_t2 - $cuser_t; … … 621 637 { 622 638 # check for Segment fault in res file 623 $exit_status = ! ( &mysystem("$grep \"Segment fault\" $resfile > /dev/null 2>&1"));639 $exit_status = ! (mysystem("$grep \"Segment fault\" $resfile > /dev/null 2>&1")); 624 640 625 641 if ($exit_status) … … 629 645 elsif (! defined($mtrack) && !defined($timings_only)) 630 646 { 631 &mysystem("$rm -f \"$root.diff\"");647 mysystem("$rm -f \"$root.diff\""); 632 648 if ($generate eq "yes") 633 649 { 634 &mysystem("$cp $resfile \"$root.res\"");650 mysystem("$cp $resfile \"$root.res\""); 635 651 } 636 652 else 637 653 { 638 654 # call Diff 639 $exit_status = &Diff($root);655 $exit_status = Diff($root); 640 656 if ($exit_status) 641 657 { … … 649 665 else 650 666 { 651 &mysystem("$rm -f \"$root.diff\"");667 mysystem("$rm -f \"$root.diff\""); 652 668 } 653 669 } … … 665 681 { 666 682 # do status checks 667 ($exit_status, $error_cause) = &tst_status_check($root);683 ($exit_status, $error_cause) = tst_status_check($root); 668 684 } 669 685 else 670 686 { 671 687 print "Warning: no file $statfile\n"; 688 tcWarn("Warning: no file $statfile"); 672 689 } 673 690 } … … 697 714 if (! $WINNT) 698 715 { 699 &mysystem("$gzip -cf \"$root.res\" | $uuencode \"$root.res.gz\" > \"$root.res.gz.uu\"");716 mysystem("$gzip -cf \"$root.res\" | $uuencode \"$root.res.gz\" > \"$root.res.gz.uu\""); 700 717 } 701 718 else … … 707 724 elsif (%merge) 708 725 { 709 ($exit_status, $error_cause) = &tst_status_merge($root);726 ($exit_status, $error_cause) = tst_status_merge($root); 710 727 711 728 print (STDERR "Warning: Merge Problems: $error_cause\n") … … 715 732 if ($keep ne "yes") 716 733 { 717 &mysystem("$rm -f tst_status.out $resfile \"$root.res\" \"$root.diff\" \"$root.new.stat\"");734 mysystem("$rm -f tst_status.out $resfile \"$root.res\" \"$root.diff\" \"$root.new.stat\""); 718 735 } 719 736 } … … 733 750 $total_checks_pass++ unless $exit_status; 734 751 735 &mysystem("mv gmon.out \"gmon.$root.out\"") if (-e "gmon.out");752 mysystem("mv gmon.out \"gmon.$root.out\"") if (-e "gmon.out"); 736 753 737 754 testFinished($test_file, $cuser_t + $csystem_t); 738 755 756 $test_files{$test_file} = $exit_status; 739 757 return ($exit_status); 740 758 } … … 918 936 919 937 blockOpened ($b); 920 &mysystem("cat " . $ff);938 mysystem("cat " . $ff); 921 939 blockClosed ($b); 922 940 } … … 991 1009 if ($extension eq "tst") 992 1010 { 993 $exit_code = &tst_check($base) || $exit_code;1011 $exit_code = tst_check($base) || $exit_code; 994 1012 } 995 1013 elsif ($extension eq "lst") … … 1049 1067 1050 1068 tcLog("tst_path: $tst_path, tst_base: $tst_base"); 1051 1052 1069 1053 my $this_exit_code = &tst_check($tst_base);1070 my $this_exit_code = tst_check($tst_base); 1054 1071 1055 1072 $lst_checks_pass++ unless $this_exit_code; … … 1063 1080 } 1064 1081 close (LST_FILE); 1065 printf("$base Summary: Checks:$lst_checks Failed:%d Time:%.2f\n", $lst_checks - $lst_checks_pass, $lst_used_time) 1082 1083 printf("$base Summary: Checks:$lst_checks Failed:%d Time:%.2f\n", $lst_checks - $lst_checks_pass, $lst_used_time) 1066 1084 unless ($verbosity < 2); 1085 1086 tcLog( sprintf("list '$base' Summary: Checks:$lst_checks Failed:%d Time:%.2f", $lst_checks - $lst_checks_pass, $lst_used_time) ); 1067 1087 blockClosed ($b); 1068 1088 } … … 1083 1103 printf("Summary: Checks:$total_checks Failed:%d Time:%.2f\n", $total_checks - $total_checks_pass, $total_used_time); 1084 1104 } 1105 1106 tcLog( sprintf("Global Summary: Checks:$total_checks Failed:%d Time:%.2f", $total_checks - $total_checks_pass, $total_used_time)) ; 1085 1107 1086 1108 if( length($teamcity) > 0 )
Note: See TracChangeset
for help on using the changeset viewer.