Skip to content

Commit fe23c45

Browse files
committed
regression.tcl
Signed-off-by: James Cherry <cherry@parallaxsw.com>
1 parent 2f85fdf commit fe23c45

1 file changed

Lines changed: 14 additions & 22 deletions

File tree

test/regression.tcl

Lines changed: 14 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -176,11 +176,10 @@ proc run_tests {} {
176176
run_test $test
177177
}
178178
}
179-
write_failure_file
180179
}
181180

182181
proc run_test { test } {
183-
global result_dir diff_file errors diff_options
182+
global result_dir diff_file errors diff_options failed_tests
184183

185184
puts -nonewline $test
186185
flush stdout
@@ -267,8 +266,6 @@ proc run_tests_parallel {} {
267266
vwait reg_parallel_job_done
268267
}
269268
}
270-
# update results/failures and results/diffs
271-
write_failure_file
272269
}
273270
}
274271

@@ -432,26 +429,21 @@ proc test_failed { test reason } {
432429
}
433430
lappend failed_tests $test
434431
incr errors($reason)
432+
append_diff_file $test
435433
}
436434

437-
proc write_failure_file {} {
438-
global failure_file failed_tests failed_tests_summery
435+
proc append_diff_file { test } {
436+
global failure_file
439437
global diff_file diff_options
440438

441439
set fail_ch [open $failure_file "a"]
442-
foreach test $failed_tests {
443-
if { ![info exists failed_tests_summery($test)] } {
444-
puts $fail_ch $test
445-
446-
# Append diff to results/diffs
447-
set log_file [test_log_file $test]
448-
set ok_file [test_ok_file $test]
449-
catch [concat exec diff $diff_options $ok_file $log_file >> $diff_file]
450-
451-
set failed_tests_summery($test) 1
452-
}
453-
}
440+
puts $fail_ch $test
454441
close $fail_ch
442+
443+
# Append diff to results/diffs
444+
set log_file [test_log_file $test]
445+
set ok_file [test_ok_file $test]
446+
catch [concat exec diff $diff_options $ok_file $log_file >> $diff_file]
455447
}
456448

457449
# Error messages can be found in "valgrind/memcheck/mc_errcontext.c".
@@ -530,6 +522,10 @@ proc show_summary {} {
530522
global app_path app
531523

532524
puts "------------------------------------------------------"
525+
if { $valgrind_shared_lib_failure } {
526+
puts "WARNING: valgrind failed because the executable is not statically linked."
527+
}
528+
puts "See $result_dir for log files"
533529
set test_count [llength $tests]
534530
if { [found_errors] } {
535531
if { $errors(error) != 0 } {
@@ -556,10 +552,6 @@ proc show_summary {} {
556552
} else {
557553
puts "Passed $test_count"
558554
}
559-
if { $valgrind_shared_lib_failure } {
560-
puts "WARNING: valgrind failed because the executable is not statically linked."
561-
}
562-
puts "See $result_dir for log files"
563555
}
564556

565557
proc found_errors {} {

0 commit comments

Comments
 (0)