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: quick.test,v 1.59 2007/06/18 12:22:43 drh Exp $ 10 11proc lshift {lvar} { 12 upvar $lvar l 13 set ret [lindex $l 0] 14 set l [lrange $l 1 end] 15 return $ret 16} 17while {[set arg [lshift argv]] != ""} { 18 switch -- $arg { 19 -sharedpagercache { 20 sqlite3_enable_shared_cache 1 21 } 22 -soak { 23 set SOAKTEST 1 24 } 25 default { 26 set argv [linsert $argv 0 $arg] 27 break 28 } 29 } 30} 31 32set testdir [file dirname $argv0] 33source $testdir/tester.tcl 34rename finish_test really_finish_test 35proc finish_test {} {} 36set ISQUICK 1 37 38set EXCLUDE { 39 all.test 40 async.test 41 async2.test 42 btree2.test 43 btree3.test 44 btree4.test 45 btree5.test 46 btree6.test 47 corrupt.test 48 crash.test 49 crash2.test 50 exclusive3.test 51 fuzz.test 52 fuzz_malloc.test 53 in2.test 54 loadext.test 55 malloc.test 56 malloc2.test 57 malloc3.test 58 memleak.test 59 misc7.test 60 misuse.test 61 quick.test 62 soak.test 63 speed1.test 64 speed2.test 65 sqllimits1.test 66 67 incrvacuum_ioerr.test 68 autovacuum_crash.test 69 btree8.test 70 utf16.test 71 shared_err.test 72 vtab_err.test 73} 74 75if {[sqlite3 -has-codec]} { 76 # lappend EXCLUDE \ 77 # conflict.test 78} 79 80 81# Files to include in the test. If this list is empty then everything 82# that is not in the EXCLUDE list is run. 83# 84set INCLUDE { 85} 86 87foreach testfile [lsort -dictionary [glob $testdir/*.test]] { 88 set tail [file tail $testfile] 89 if {[lsearch -exact $EXCLUDE $tail]>=0} continue 90 if {[llength $INCLUDE]>0 && [lsearch -exact $INCLUDE $tail]<0} continue 91 source $testfile 92 catch {db close} 93 if {$sqlite_open_file_count>0} { 94 puts "$tail did not close all files: $sqlite_open_file_count" 95 incr nErr 96 lappend ::failList $tail 97 set sqlite_open_file_count 0 98 } 99 if {$::sqlite3_tsd_count} { 100 puts "Thread-specific data leak: $::sqlite3_tsd_count instances" 101 incr nErr 102 lappend ::failList $tail 103 set ::sqlite3_tsd_count 0 104 } 105} 106source $testdir/misuse.test 107 108set sqlite_open_file_count 0 109really_finish_test 110