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 10set testdir [file dirname $argv0] 11source $testdir/tester.tcl 12db close 13 14proc lshift {lvar} { 15 upvar $lvar l 16 set ret [lindex $l 0] 17 set l [lrange $l 1 end] 18 return $ret 19} 20while {[set arg [lshift argv]] != ""} { 21 switch -- $arg { 22 -sharedpagercache { 23 sqlite3_enable_shared_cache 1 24 } 25 -soak { 26 set G(issoak) 1 27 } 28 -start { 29 set STARTAT "[lshift argv]*" 30 } 31 default { 32 set argv [linsert $argv 0 $arg] 33 break 34 } 35 } 36} 37 38set G(isquick) 1 39 40set EXCLUDE { 41 all.test 42 async.test 43 async2.test 44 async3.test 45 backup_ioerr.test 46 corrupt.test 47 corruptC.test 48 crash.test 49 crash2.test 50 crash3.test 51 crash4.test 52 crash5.test 53 crash6.test 54 crash7.test 55 delete3.test 56 e_fts3.test 57 fts3.test 58 fts3rnd.test 59 fkey_malloc.test 60 fuzz.test 61 fuzz3.test 62 fuzz_malloc.test 63 in2.test 64 loadext.test 65 memleak.test 66 misc7.test 67 misuse.test 68 mutex2.test 69 notify2.test 70 onefile.test 71 permutations.test 72 quick.test 73 savepoint4.test 74 savepoint6.test 75 select9.test 76 soak.test 77 speed1.test 78 speed1p.test 79 speed2.test 80 speed3.test 81 speed4.test 82 speed4p.test 83 sqllimits1.test 84 tkt2686.test 85 thread001.test 86 thread002.test 87 thread003.test 88 thread004.test 89 thread005.test 90 trans2.test 91 vacuum3.test 92 93 incrvacuum_ioerr.test 94 autovacuum_crash.test 95 btree8.test 96 shared_err.test 97 vtab_err.test 98 veryquick.test 99 mallocAll.test 100 101 walslow.test 102 walcrash.test 103 walthread.test 104} 105 106if {[sqlite3 -has-codec]} { 107 # lappend EXCLUDE \ 108 # conflict.test 109} 110 111 112# Files to include in the test. If this list is empty then everything 113# that is not in the EXCLUDE list is run. 114# 115set INCLUDE { 116} 117 118# If the QUICKTEST_INCLUDE environment variable is set, then interpret 119# it as a list of test files. Always run these files, even if they 120# begin with "malloc*" or "ioerr*" or are part of the EXCLUDE list 121# defined above. 122# 123set QUICKTEST_INCLUDE {} 124catch { set QUICKTEST_INCLUDE $env(QUICKTEST_INCLUDE) } 125 126# Run all test files in directory $testdir, subject to the following: 127# 128# 1. If a test file is specified as part of the $INCLUDE or 129# $QUICKTEST_INCLUDE list variables, run it. 130# 131# 2. If $INCLUDE is non-empty, and rule 1 does not apply to it, do not run it. 132# 133# 3. If a test file is specified as part of $EXCLUDE, and rule 1 does not 134# apply, do not run it. 135# 136foreach testfile [lsort -dictionary [glob $testdir/*.test]] { 137 set tail [file tail $testfile] 138 139 if {[info exists STARTAT] && [string match $STARTAT $tail]} {unset STARTAT} 140 if {[info exists STARTAT]} continue 141 142 set run [expr {[llength $INCLUDE]==0}] 143 if {[info exists ISVERYQUICK] && [string match *malloc* $tail]} { set run 0 } 144 if {[info exists ISVERYQUICK] && [string match *ioerr* $tail]} { set run 0 } 145 if {[lsearch -exact $EXCLUDE $tail]>=0} { set run 0 } 146 if {[lsearch -exact $INCLUDE $tail]>=0} { set run 1 } 147 if {[lsearch -exact $QUICKTEST_INCLUDE $tail]>=0} { set run 1 } 148 149 if {$run} { 150 slave_test_file $testfile 151 } 152} 153slave_test_file $testdir/misuse.test 154 155finish_test 156 157