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