Changeset ebb444 in git
- Timestamp:
- Sep 25, 2011, 4:13:56 PM (12 years ago)
- Branches:
- (u'spielwiese', '0d6b7fcd9813a1ca1ed4220cfa2b104b97a0a003')
- Children:
- c515addbdee3daf91cdb80efb76e41fd8ff2f111
- Parents:
- 93e538c4b38681efb7cb7bfb840f6f5c5ff4002a
- git-author:
- Oleksandr Motsak <motsak@mathematik.uni-kl.de>2011-09-25 16:13:56+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
r93e538 rebb444 219 219 putTCmsgNV( "blockClosed", "name", $v); 220 220 } 221 sub tcLog222 {223 local($text) = $_[0];224 putTCmsgNV2( "message", "text", $text, "status", "NORMAL");225 }226 sub tcWarn227 {228 local($text) = $_[0];229 putTCmsgNV2( "message", "text", $text, "status", "WARNING");230 }231 221 sub tcError 232 222 { 233 local($ n) = tc_filter($_[0]);234 local($ m) = tc_filter($_[1]);235 local($ t) = tc_filter($_[2]);223 local($text) = tc_filter($_[0]); 224 local($details) = tc_filter($_[1]); 225 local($status) = tc_filter($_[2]); 236 226 # The status attribute may take following values: 237 227 # NORMAL, WARNING, FAILURE, ERROR. … … 241 231 242 232 ##teamcity[message text='<message text>' errorDetails='<error details>' status='<status value>'] 243 putTCmsg( "message", "text=\'$n\' errorDetails=\'$m\' status=\'$t\'"); 233 putTCmsg( "message", "text=\'$text\' errorDetails=\'$details\' status=\'$status\'"); 234 } 235 236 sub tcFailure 237 { 238 local($text) = tc_filter($_[0]); 239 local($details) = tc_filter($_[1]); 240 tcError( $text, $details, "FAILURE" ); 241 } 242 243 sub tcLog 244 { 245 local($text) = $_[0]; 246 putTCmsgNV2( "message", "text", $text, "status", "NORMAL"); 247 } 248 sub tcWarn 249 { 250 local($text) = $_[0]; 251 putTCmsgNV2( "message", "text", $text, "status", "WARNING"); 244 252 } 245 253 … … 254 262 putTCmsgNV( "testSuiteFinished", "name", $v); 255 263 } 264 265 $failed = 0; 266 256 267 sub testStarted 257 268 { 258 269 local($v) = $_[0]; 259 270 putTCmsgNV2( "testStarted", "name", $v, "captureStandardOutput", "true"); 271 $failed = 0; 260 272 } 261 273 sub testFinished … … 263 275 local($v) = $_[0]; 264 276 local($d) = $_[1]; 265 putTCmsgNV2( "testFinished", "name", $v, "duration", $d); 266 } 277 putTCmsgNV2( "testFinished", "name", $v, "duration", $d); 278 $failed = 0; 279 } 280 267 281 sub testFailed 268 282 { 269 283 local($n) = $_[0]; 270 284 local($m) = $_[1]; 271 putTCmsgNV2( "testFailed", "name", $n, "message", $m); 285 286 if( !$failed ) 287 { 288 putTCmsgNV2( "testFailed", "name", $n, "message", $m); 289 $failed = 1; 290 } else 291 { 292 tcFailure("Test: $n => $m", ""); 293 } 272 294 } 273 295 sub testFailed2 … … 276 298 local($m) = tc_filter($_[1]); 277 299 local($t) = tc_filter($_[2]); 278 putTCmsg( "testFailed", "name=\'$n\' message=\'$m\' details=\'$t\'"); 300 if( !$failed ) 301 { 302 putTCmsg( "testFailed", "name=\'$n\' message=\'$m\' details=\'$t\'"); 303 $failed = 1; 304 } else 305 { 306 tcFailure("Test: $n => $m", $t); 307 } 308 279 309 } 280 310 sub testFailedCMP 281 311 { 282 local($n) = tc_filter($_[0]); 283 local($m) = tc_filter($_[1]); 284 local($d) = tc_filter($_[2]); 285 local($e) = tc_filter($_[3]); 286 local($a) = tc_filter($_[4]); 287 putTCmsg( "testFailed", "type=\'comparisonFailure\' name=\'$n\' message=\'$m\' details=\'$d\' expected=\'$e\' actual=\'$a\'"); 288 } 289 290 ##teamcity[testFailed type='comparisonFailure' name='test2' message='failure message' details='message and stack trace' expected='expected value' actual='actual value'] 312 local($name) = tc_filter($_[0]); 313 local($msg) = tc_filter($_[1]); 314 local($details) = tc_filter($_[2]); 315 local($expected) = tc_filter($_[3]); 316 local($actual) = tc_filter($_[4]); 317 if( !$failed ) 318 { 319 putTCmsg( "testFailed", "type=\'comparisonFailure\' name=\'$name\' message=\'$msg\' details=\'$details\' expected=\'$expected\' actual=\'$actual\'"); 320 $failed = 1; 321 } else 322 { 323 tcFailure("Test: $name => $msg", "$detail\nExpected: $expected\nActual: $actual"); 324 } 325 326 } 327 328 ##teamcity[testFailed type='comparisonFailure' name='test_file' message='failure_message' details='message and stack trace' expected='expected value' actual='actual value'] 291 329 sub testIgnored 292 330 { … … 375 413 $exit_status = mysystem("$diff -w -b \"$root.res.cleaned\" \"$root.new.res.cleaned\" > \"$root.diff\" 2>&1"); 376 414 415 377 416 # clean up time 378 417 mysystem("$rm -f \"$root.res.cleaned\" \"$root.new.res.cleaned\""); … … 385 424 $exit_status = $exit_status || (-e "$root.diff" && -s "$root.diff"); 386 425 426 if( $exit_status && (length($teamcity) > 0) ) 427 { 428 local($details) = mysystem_catch("$cat \"$root.diff\""); 429 local($expected) = mysystem_catch("$cat \"$root.res\""); 430 local($actual) = mysystem_catch("$cat \"$root.new.res\""); 431 testFailedCMP($test_file, "Differences in res files", $details, $expected, $actual ) 432 } 433 387 434 return($exit_status); 388 435 } … … 629 676 $cuser_t = $cuser_t2 - $cuser_t; 630 677 $csystem_t = $csystem_t2 - $csystem_t; 631 678 679 tcLog("Test: $test_file, user time: $cuser_t, system time: $csystem_t" ); 680 632 681 if ($exit_status != 0) 633 682 { 634 $error_cause = "Singular call exited with status != 0"; 683 $error_cause = "Singular call exited with status ($exit_status) != 0"; 684 685 if( length($teamcity) > 0 ) 686 { 687 ### TODO: add a way to detect timeout!!! 688 if( $exit_status == 142 ) # perl sig alarm exit code? NOPE :((( 689 { 690 local($details) = mysystem_catch("$cat \"$resfile\""); 691 testFailed2($test_file, "Exit on timeout ($timeout sec)!", $details); 692 } 693 } 635 694 } 636 695 else … … 642 701 { 643 702 $error_cause = "Segment fault"; 703 local($details) = mysystem_catch("$cat \"$resfile\""); 704 testFailed2($test_file, $error_cause, $details); 644 705 } 645 706 elsif (! defined($mtrack) && !defined($timings_only)) … … 701 762 } 702 763 print STDERR "!!! $root : $error_cause\n"; 703 testFailed($test_file, $error_cause); 764 765 if( length($teamcity) > 0 ) 766 { 767 local($details) = mysystem_catch("$cat \"$resfile\""); 768 testFailed2($test_file, $error_cause, $details); 769 } 704 770 } 705 771 else … … 751 817 752 818 mysystem("mv gmon.out \"gmon.$root.out\"") if (-e "gmon.out"); 753 819 754 820 testFinished($test_file, $cuser_t + $csystem_t); 755 821 … … 969 1035 if ($timeout > 0) 970 1036 { 971 $singular = "PERL_SIGNALS=unsafe perl -e 'alarm($timeout); exec(\@ARGV);' $singular";1037 $singular = "PERL_SIGNALS=unsafe perl -e 'alarm($timeout);exec(\@ARGV);' $singular"; 972 1038 tcLog ("Set exec timeout to $timeout sec.\n"); 973 1039 # die;
Note: See TracChangeset
for help on using the changeset viewer.