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.90 2008/12/19 16:31:12 danielk1977 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 {} { 39 catch {db close} 40 show_memstats 41} 42set ISQUICK 1 43 44set EXCLUDE { 45 all.test 46 async.test 47 async2.test 48 async3.test 49 corrupt.test 50 corruptC.test 51 crash.test 52 crash2.test 53 crash3.test 54 crash4.test 55 crash5.test 56 crash6.test 57 crash7.test 58 delete3.test 59 fts3.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 onefile.test 70 permutations.test 71 quick.test 72 savepoint4.test 73 select9.test 74 soak.test 75 speed1.test 76 speed1p.test 77 speed2.test 78 speed3.test 79 speed4.test 80 speed4p.test 81 sqllimits1.test 82 tkt2686.test 83 thread001.test 84 thread002.test 85 thread003.test 86 trans2.test 87 vacuum3.test 88 89 incrvacuum_ioerr.test 90 autovacuum_crash.test 91 btree8.test 92 shared_err.test 93 vtab_err.test 94 veryquick.test 95 mallocAll.test 96} 97 98if {[sqlite3 -has-codec]} { 99 # lappend EXCLUDE \ 100 # conflict.test 101} 102 103 104# Files to include in the test. If this list is empty then everything 105# that is not in the EXCLUDE list is run. 106# 107set INCLUDE { 108} 109 110foreach testfile [lsort -dictionary [glob $testdir/*.test]] { 111 # If this is "veryquick.test", do not run any of the malloc or 112 # IO error simulations. 113 if {[info exists ISVERYQUICK] && ( 114 [string match *malloc* $testfile] || [string match *ioerr* $testfile] 115 ) } { 116 continue 117 } 118 119 set tail [file tail $testfile] 120 if {[lsearch -exact $EXCLUDE $tail]>=0} continue 121 if {[llength $INCLUDE]>0 && [lsearch -exact $INCLUDE $tail]<0} continue 122 if {[info exists STARTAT] && [string match $STARTAT $tail]} {unset STARTAT} 123 if {[info exists STARTAT]} continue 124 source $testfile 125 catch {db close} 126 if {$sqlite_open_file_count>0} { 127 puts "$tail did not close all files: $sqlite_open_file_count" 128 incr nErr 129 lappend ::failList $tail 130 set sqlite_open_file_count 0 131 } 132} 133#set argv quick 134#source $testdir/permutations.test 135#set argv "" 136source $testdir/misuse.test 137 138set sqlite_open_file_count 0 139really_finish_test 140