regression.tcl
Signed-off-by: James Cherry <cherry@parallaxsw.com>
This commit is contained in:
parent
2f85fdfee3
commit
fe23c4530f
|
|
@ -176,11 +176,10 @@ proc run_tests {} {
|
||||||
run_test $test
|
run_test $test
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
write_failure_file
|
|
||||||
}
|
}
|
||||||
|
|
||||||
proc run_test { test } {
|
proc run_test { test } {
|
||||||
global result_dir diff_file errors diff_options
|
global result_dir diff_file errors diff_options failed_tests
|
||||||
|
|
||||||
puts -nonewline $test
|
puts -nonewline $test
|
||||||
flush stdout
|
flush stdout
|
||||||
|
|
@ -267,8 +266,6 @@ proc run_tests_parallel {} {
|
||||||
vwait reg_parallel_job_done
|
vwait reg_parallel_job_done
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
# update results/failures and results/diffs
|
|
||||||
write_failure_file
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -432,26 +429,21 @@ proc test_failed { test reason } {
|
||||||
}
|
}
|
||||||
lappend failed_tests $test
|
lappend failed_tests $test
|
||||||
incr errors($reason)
|
incr errors($reason)
|
||||||
|
append_diff_file $test
|
||||||
}
|
}
|
||||||
|
|
||||||
proc write_failure_file {} {
|
proc append_diff_file { test } {
|
||||||
global failure_file failed_tests failed_tests_summery
|
global failure_file
|
||||||
global diff_file diff_options
|
global diff_file diff_options
|
||||||
|
|
||||||
set fail_ch [open $failure_file "a"]
|
set fail_ch [open $failure_file "a"]
|
||||||
foreach test $failed_tests {
|
puts $fail_ch $test
|
||||||
if { ![info exists failed_tests_summery($test)] } {
|
|
||||||
puts $fail_ch $test
|
|
||||||
|
|
||||||
# Append diff to results/diffs
|
|
||||||
set log_file [test_log_file $test]
|
|
||||||
set ok_file [test_ok_file $test]
|
|
||||||
catch [concat exec diff $diff_options $ok_file $log_file >> $diff_file]
|
|
||||||
|
|
||||||
set failed_tests_summery($test) 1
|
|
||||||
}
|
|
||||||
}
|
|
||||||
close $fail_ch
|
close $fail_ch
|
||||||
|
|
||||||
|
# Append diff to results/diffs
|
||||||
|
set log_file [test_log_file $test]
|
||||||
|
set ok_file [test_ok_file $test]
|
||||||
|
catch [concat exec diff $diff_options $ok_file $log_file >> $diff_file]
|
||||||
}
|
}
|
||||||
|
|
||||||
# Error messages can be found in "valgrind/memcheck/mc_errcontext.c".
|
# Error messages can be found in "valgrind/memcheck/mc_errcontext.c".
|
||||||
|
|
@ -530,6 +522,10 @@ proc show_summary {} {
|
||||||
global app_path app
|
global app_path app
|
||||||
|
|
||||||
puts "------------------------------------------------------"
|
puts "------------------------------------------------------"
|
||||||
|
if { $valgrind_shared_lib_failure } {
|
||||||
|
puts "WARNING: valgrind failed because the executable is not statically linked."
|
||||||
|
}
|
||||||
|
puts "See $result_dir for log files"
|
||||||
set test_count [llength $tests]
|
set test_count [llength $tests]
|
||||||
if { [found_errors] } {
|
if { [found_errors] } {
|
||||||
if { $errors(error) != 0 } {
|
if { $errors(error) != 0 } {
|
||||||
|
|
@ -556,10 +552,6 @@ proc show_summary {} {
|
||||||
} else {
|
} else {
|
||||||
puts "Passed $test_count"
|
puts "Passed $test_count"
|
||||||
}
|
}
|
||||||
if { $valgrind_shared_lib_failure } {
|
|
||||||
puts "WARNING: valgrind failed because the executable is not statically linked."
|
|
||||||
}
|
|
||||||
puts "See $result_dir for log files"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
proc found_errors {} {
|
proc found_errors {} {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue