Fix problems with running the async.test script.
FossilOrigin-Name: 05ac2548652f3c9aa358289700b0b4c7fc22486d
This commit is contained in:
+15
-12
@@ -43,13 +43,22 @@ set ASYNC_INCLUDE {
|
||||
# Enable asynchronous IO.
|
||||
sqlite3async_initialize "" 1
|
||||
|
||||
# This proc flushes the contents of the async-IO queue through to the
|
||||
# underlying VFS. A couple of the test scripts identified in $ASYNC_INCLUDE
|
||||
# above contain lines like "catch flush_async_queue" in places where
|
||||
# this is required for the tests to work in async mode.
|
||||
#
|
||||
proc flush_async_queue {} {
|
||||
sqlite3async_control halt idle
|
||||
sqlite3async_start
|
||||
sqlite3async_wait
|
||||
sqlite3async_control halt never
|
||||
}
|
||||
|
||||
rename do_test async_really_do_test
|
||||
proc do_test {name args} {
|
||||
uplevel async_really_do_test async_io-$name $args
|
||||
sqlite3async_start
|
||||
sqlite3async_control halt idle
|
||||
sqlite3async_wait
|
||||
sqlite3async_control halt never
|
||||
flush_async_queue
|
||||
}
|
||||
|
||||
foreach testfile [lsort -dictionary [glob $testdir/*.test]] {
|
||||
@@ -62,19 +71,13 @@ foreach testfile [lsort -dictionary [glob $testdir/*.test]] {
|
||||
# [file delete]). If the asynchronous backend still has the file
|
||||
# open, it will become confused.
|
||||
#
|
||||
sqlite3async_control halt idle
|
||||
sqlite3async_start
|
||||
sqlite3async_wait
|
||||
sqlite3async_control halt never
|
||||
flush_async_queue
|
||||
}
|
||||
|
||||
# Flush the write-queue and disable asynchronous IO. This should ensure
|
||||
# all allocated memory is cleaned up.
|
||||
set sqlite3async_trace 1
|
||||
sqlite3async_control halt idle
|
||||
sqlite3async_start
|
||||
sqlite3async_wait
|
||||
sqlite3async_control halt never
|
||||
flush_async_queue
|
||||
sqlite3async_shutdown
|
||||
set sqlite3async_trace 0
|
||||
|
||||
|
||||
Reference in New Issue
Block a user