1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-07-29 08:01:23 +03:00

Improved cleanup in finish_test so that specifying multiple test modules

on the "./testfixture" command-line is more likely to work.

FossilOrigin-Name: 3658417bf300e004e5166ee69aa2d8c70697b87ea7456cb6337b0ad6d60257d5
This commit is contained in:
drh
2021-10-19 18:59:10 +00:00
parent a24df58fe8
commit 06ec7c662d
3 changed files with 24 additions and 12 deletions

View File

@ -1203,14 +1203,29 @@ proc speed_trial_summary {name} {
}
}
# Clear out left-over configuration setup from the end of a test
#
proc finish_test_precleanup {} {
catch {db1 close}
catch {db2 close}
catch {db3 close}
unregister_devsim
unregister_jt_vfs
unregister_demovfs
}
# Run this routine last
#
proc finish_test {} {
global argv
finish_test_precleanup
if {[llength $argv]>0} {
# If additional test scripts are specified on the command-line,
# run them also, before quitting.
proc finish_test {} {return}
proc finish_test {} {
finish_test_precleanup
return
}
foreach extra $argv {
puts "Running \"$extra\""
db_delete_and_reopen
@ -1218,9 +1233,6 @@ proc finish_test {} {
}
}
catch {db close}
catch {db1 close}
catch {db2 close}
catch {db3 close}
if {0==[info exists ::SLAVE]} { finalize_testing }
}
proc finalize_testing {} {