1# 2# May you do good and not evil. 3# May you find forgiveness for yourself and forgive others. 4# May you share freely, never taking more than you give. 5# 6#*********************************************************************** 7# This file runs all tests. 8# 9# $Id: async.test,v 1.3 2006/01/09 17:29:53 drh Exp $ 10 11 12if {[catch {sqlite3async_enable}]} { 13 # The async logic is not built into this system 14 return 15} 16 17 18set testdir [file dirname $argv0] 19source $testdir/tester.tcl 20rename finish_test really_finish_test 21proc finish_test {} {} 22set ISQUICK 1 23 24set INCLUDE { 25 select1.test 26 select2.test 27 select3.test 28 select4.test 29 insert.test 30 insert2.test 31 insert3.test 32} 33#set INCLUDE [lrange $INCLUDE 0 0] 34 35# Enable asynchronous IO. 36sqlite3async_enable 1 37sqlite3async_halt never 38sqlite3async_start 39 40rename do_test really_do_test 41proc do_test {name args} { 42 uplevel really_do_test async_io-$name $args 43 sqlite3async_halt idle 44 sqlite3async_wait 45 sqlite3async_halt never 46 sqlite3async_start 47} 48 49foreach testfile [lsort -dictionary [glob $testdir/*.test]] { 50 set tail [file tail $testfile] 51 if {[lsearch -exact $INCLUDE $tail]<0} continue 52 source $testfile 53 catch {db close} 54} 55 56 57set sqlite_open_file_count 0 58really_finish_test 59sqlite3async_halt now 60sqlite3async_wait 61sqlite3async_enable 0 62rename really_do_test do_test 63rename really_finish_test finish_test 64