Index: test/permutations.test ================================================================== --- test/permutations.test +++ test/permutations.test @@ -119,11 +119,10 @@ # Define the generic test suites: # # veryquick # quick # full -# veryquick_plus_notify2 # lappend ::testsuitelist xxx test_suite "veryquick" -prefix "" -description { "Very" quick test suite. Runs in less than 5 minutes on a workstation. @@ -137,24 +136,25 @@ Quick test suite. Runs in around 10 minutes on a workstation. } -files [ test_set $allquicktests ] -test_suite "veryquick_plus_notify2" -prefix "" -description { - Very quick test suite + file notify2.test. This is used by one of the - sqlite.org release test configurations. -} -files [ - test_set $allquicktests notify2.test -exclude *malloc* *ioerr* *fault* -] - test_suite "full" -prefix "" -description { Full test suite. Takes a long time. } -files [ test_set $alltests ] -initialize { unset -nocomplain ::G(isquick) } + +test_suite "threads" -prefix "" -description { + All multi-threaded tests. +} -files { + notify2.test thread001.test thread002.test thread003.test + thread004.test thread005.test walthread.test +} + lappend ::testsuitelist xxx #------------------------------------------------------------------------- # Define the coverage related test suites: # Index: test/tester.tcl ================================================================== --- test/tester.tcl +++ test/tester.tcl @@ -1159,10 +1159,15 @@ # Load the various test interfaces implemented in C. load_testfixture_extensions tinterp # Run the test script. interp eval tinterp $script + + # Check if the interpreter call [run_thread_tests] + if { [interp eval tinterp {info exists ::run_thread_tests_called}] } { + set ::run_thread_tests_called 1 + } # Delete the interpreter used to run the test script. interp delete tinterp } @@ -1174,20 +1179,21 @@ # ifcapable shared_cache { set scs [sqlite3_enable_shared_cache] } # Run the test script in a slave interpreter. # + unset -nocomplain ::run_thread_tests_called reset_prng_state set ::sqlite_open_file_count 0 set time [time { slave_test_script [list source $zFile] }] set ms [expr [lindex $time 0] / 1000] # Test that all files opened by the test script were closed. Omit this # if the test script has "thread" in its name. The open file counter # is not thread-safe. # - if {[string match *thread* $tail]==0} { + if {[info exists ::run_thread_tests_called]==0} { do_test ${tail}-closeallfiles { expr {$::sqlite_open_file_count>0} } {0} } set ::sqlite_open_file_count 0 # Test that the global "shared-cache" setting was not altered by Index: test/thread_common.tcl ================================================================== --- test/thread_common.tcl +++ test/thread_common.tcl @@ -94,20 +94,14 @@ } if {![info exists ::tcl_platform(threaded)]} { set zProblem "Linked against a non-threadsafe Tcl build" } if {[info exists zProblem]} { - if {$print_warning} { - if {[info exists ::run_thread_tests_failed]} { - puts "WARNING: Multi-threaded tests skipped: $zProblem" - } - } else { - puts "Skipping thread tests: $zProblem" - set ::run_thread_tests_failed 1 - } + puts "WARNING: Multi-threaded tests skipped: $zProblem" return 0 } + set ::run_thread_tests_called 1 return 1; } return 0