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.85 2008/08/27 18:56:36 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 -start { 26 set STARTAT "[lshift argv]*" 27 } 28 default { 29 set argv [linsert $argv 0 $arg] 30 break 31 } 32 } 33} 34 35set testdir [file dirname $argv0] 36source $testdir/tester.tcl 37rename finish_test really_finish_test 38proc finish_test {} {} 39set ISQUICK 1 40 41set EXCLUDE { 42 all.test 43 async.test 44 async2.test 45 async3.test 46 corrupt.test 47 crash.test 48 crash2.test 49 crash3.test 50 crash4.test 51 crash5.test 52 crash6.test 53 crash7.test 54 delete3.test 55 fts3.test 56 fuzz.test 57 fuzz_malloc.test 58 in2.test 59 loadext.test 60 memleak.test 61 misc7.test 62 misuse.test 63 mutex2.test 64 onefile.test 65 permutations.test 66 quick.test 67 select9.test 68 soak.test 69 speed1.test 70 speed1p.test 71 speed2.test 72 speed3.test 73 speed4.test 74 speed4p.test 75 sqllimits1.test 76 tkt2686.test 77 thread001.test 78 thread002.test 79 trans2.test 80 vacuum3.test 81 82 incrvacuum_ioerr.test 83 autovacuum_crash.test 84 btree8.test 85 shared_err.test 86 vtab_err.test 87 veryquick.test 88 mallocAll.test 89} 90 91if {[sqlite3 -has-codec]} { 92 # lappend EXCLUDE \ 93 # conflict.test 94} 95 96 97# Files to include in the test. If this list is empty then everything 98# that is not in the EXCLUDE list is run. 99# 100set INCLUDE { 101} 102 103foreach testfile [lsort -dictionary [glob $testdir/*.test]] { 104 # If this is "veryquick.test", do not run any of the malloc or 105 # IO error simulations. 106 if {[info exists ISVERYQUICK] && ( 107 [string match *malloc* $testfile] || [string match *ioerr* $testfile] 108 ) } { 109 continue 110 } 111 112 set tail [file tail $testfile] 113 if {[lsearch -exact $EXCLUDE $tail]>=0} continue 114 if {[llength $INCLUDE]>0 && [lsearch -exact $INCLUDE $tail]<0} continue 115 if {[info exists STARTAT] && [string match $STARTAT $tail]} {unset STARTAT} 116 if {[info exists STARTAT]} continue 117 source $testfile 118 catch {db close} 119 if {$sqlite_open_file_count>0} { 120 puts "$tail did not close all files: $sqlite_open_file_count" 121 incr nErr 122 lappend ::failList $tail 123 set sqlite_open_file_count 0 124 } 125} 126#set argv quick 127#source $testdir/permutations.test 128#set argv "" 129source $testdir/misuse.test 130 131set sqlite_open_file_count 0 132really_finish_test 133