OLD | NEW |
1 # | 1 # |
2 # May you do good and not evil. | 2 # May you do good and not evil. |
3 # May you find forgiveness for yourself and forgive others. | 3 # May you find forgiveness for yourself and forgive others. |
4 # May you share freely, never taking more than you give. | 4 # May you share freely, never taking more than you give. |
5 # | 5 # |
6 #*********************************************************************** | 6 #*********************************************************************** |
7 # This file runs all tests. | 7 # This file runs all tests. |
8 # | 8 # |
9 # $Id: quick.test,v 1.95 2009/03/16 14:48:19 danielk1977 Exp $ | |
10 | |
11 proc lshift {lvar} { | |
12 upvar $lvar l | |
13 set ret [lindex $l 0] | |
14 set l [lrange $l 1 end] | |
15 return $ret | |
16 } | |
17 while {[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 | 9 |
35 set testdir [file dirname $argv0] | 10 set testdir [file dirname $argv0] |
36 source $testdir/tester.tcl | 11 source $testdir/permutations.test |
37 rename finish_test really_finish_test | |
38 proc finish_test {} { | |
39 catch {db close} | |
40 show_memstats | |
41 } | |
42 set ISQUICK 1 | |
43 | 12 |
44 set EXCLUDE { | 13 run_test_suite quick |
45 all.test | |
46 async.test | |
47 async2.test | |
48 async3.test | |
49 backup_ioerr.test | |
50 corrupt.test | |
51 corruptC.test | |
52 crash.test | |
53 crash2.test | |
54 crash3.test | |
55 crash4.test | |
56 crash5.test | |
57 crash6.test | |
58 crash7.test | |
59 delete3.test | |
60 fts3.test | |
61 fts2.test | |
62 fuzz.test | |
63 fuzz3.test | |
64 fuzz_malloc.test | |
65 in2.test | |
66 loadext.test | |
67 memleak.test | |
68 misc7.test | |
69 misuse.test | |
70 mutex2.test | |
71 notify2.test | |
72 onefile.test | |
73 permutations.test | |
74 quick.test | |
75 savepoint4.test | |
76 savepoint6.test | |
77 select9.test | |
78 soak.test | |
79 speed1.test | |
80 speed1p.test | |
81 speed2.test | |
82 speed3.test | |
83 speed4.test | |
84 speed4p.test | |
85 sqllimits1.test | |
86 tkt2686.test | |
87 thread001.test | |
88 thread002.test | |
89 thread003.test | |
90 thread004.test | |
91 thread005.test | |
92 trans2.test | |
93 vacuum3.test | |
94 | 14 |
95 incrvacuum_ioerr.test | 15 finish_test |
96 autovacuum_crash.test | |
97 btree8.test | |
98 shared_err.test | |
99 vtab_err.test | |
100 veryquick.test | |
101 mallocAll.test | |
102 } | |
103 | |
104 if {[sqlite3 -has-codec]} { | |
105 # lappend EXCLUDE \ | |
106 # conflict.test | |
107 } | |
108 | |
109 | |
110 # Files to include in the test. If this list is empty then everything | |
111 # that is not in the EXCLUDE list is run. | |
112 # | |
113 set INCLUDE { | |
114 } | |
115 | |
116 # If the QUICKTEST_INCLUDE environment variable is set, then interpret | |
117 # it as a list of test files. Always run these files, even if they | |
118 # begin with "malloc*" or "ioerr*" or are part of the EXCLUDE list | |
119 # defined above. | |
120 # | |
121 set QUICKTEST_INCLUDE {} | |
122 catch { set QUICKTEST_INCLUDE $env(QUICKTEST_INCLUDE) } | |
123 | |
124 foreach testfile [lsort -dictionary [glob $testdir/*.test]] { | |
125 set tail [file tail $testfile] | |
126 if { [lsearch $QUICKTEST_INCLUDE $tail]<0 } { | |
127 # If this is "veryquick.test", do not run any of the malloc or | |
128 # IO error simulations. | |
129 if {[info exists ISVERYQUICK] && ( | |
130 [string match *malloc* $testfile] || [string match *ioerr* $testfile] | |
131 ) } { | |
132 continue | |
133 } | |
134 if {[lsearch -exact $EXCLUDE $tail]>=0} continue | |
135 } | |
136 if {[llength $INCLUDE]>0 && [lsearch -exact $INCLUDE $tail]<0} continue | |
137 if {[info exists STARTAT] && [string match $STARTAT $tail]} {unset STARTAT} | |
138 if {[info exists STARTAT]} continue | |
139 source $testfile | |
140 catch {db close} | |
141 if {$sqlite_open_file_count>0} { | |
142 puts "$tail did not close all files: $sqlite_open_file_count" | |
143 incr nErr | |
144 lappend ::failList $tail | |
145 set sqlite_open_file_count 0 | |
146 } | |
147 } | |
148 #set argv quick | |
149 #source $testdir/permutations.test | |
150 #set argv "" | |
151 source $testdir/misuse.test | |
152 | |
153 set sqlite_open_file_count 0 | |
154 really_finish_test | |
OLD | NEW |