|
1 # |
|
2 # Portions Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiaries. All rights reserved. |
|
3 # |
|
4 # May you do good and not evil. |
|
5 # May you find forgiveness for yourself and forgive others. |
|
6 # May you share freely, never taking more than you give. |
|
7 # |
|
8 #*********************************************************************** |
|
9 # This file runs all tests. |
|
10 # |
|
11 # $Id: quick.test,v 1.87 2008/09/09 18:28:07 danielk1977 Exp $ |
|
12 |
|
13 proc lshift {lvar} { |
|
14 upvar $lvar l |
|
15 set ret [lindex $l 0] |
|
16 set l [lrange $l 1 end] |
|
17 return $ret |
|
18 } |
|
19 while {[set arg [lshift argv]] != ""} { |
|
20 switch -- $arg { |
|
21 -sharedpagercache { |
|
22 sqlite3_enable_shared_cache 1 |
|
23 } |
|
24 -soak { |
|
25 set SOAKTEST 1 |
|
26 } |
|
27 -start { |
|
28 set STARTAT "[lshift argv]*" |
|
29 } |
|
30 default { |
|
31 set argv [linsert $argv 0 $arg] |
|
32 break |
|
33 } |
|
34 } |
|
35 } |
|
36 |
|
37 set testdir [file dirname $argv0] |
|
38 source $testdir/tester.tcl |
|
39 rename finish_test really_finish_test |
|
40 proc finish_test {} {} |
|
41 set ISQUICK 1 |
|
42 |
|
43 set EXCLUDE { |
|
44 all.test |
|
45 async.test |
|
46 async2.test |
|
47 async3.test |
|
48 corrupt.test |
|
49 crash.test |
|
50 crash2.test |
|
51 crash3.test |
|
52 crash4.test |
|
53 crash5.test |
|
54 crash6.test |
|
55 crash7.test |
|
56 delete3.test |
|
57 fts3.test |
|
58 fuzz.test |
|
59 fuzz3.test |
|
60 fuzz_malloc.test |
|
61 in2.test |
|
62 loadext.test |
|
63 memleak.test |
|
64 misc7.test |
|
65 misuse.test |
|
66 mutex2.test |
|
67 onefile.test |
|
68 permutations.test |
|
69 quick.test |
|
70 rtree.test |
|
71 select9.test |
|
72 soak.test |
|
73 speed1.test |
|
74 speed1p.test |
|
75 speed2.test |
|
76 speed3.test |
|
77 speed4.test |
|
78 speed4p.test |
|
79 sqllimits1.test |
|
80 tkt2686.test |
|
81 thread001.test |
|
82 thread002.test |
|
83 thread003.test |
|
84 trans2.test |
|
85 vacuum3.test |
|
86 |
|
87 incrvacuum_ioerr.test |
|
88 autovacuum_crash.test |
|
89 btree8.test |
|
90 shared_err.test |
|
91 vtab_err.test |
|
92 veryquick.test |
|
93 mallocAll.test |
|
94 } |
|
95 |
|
96 if {[sqlite3 -has-codec]} { |
|
97 # lappend EXCLUDE \ |
|
98 # conflict.test |
|
99 } |
|
100 |
|
101 |
|
102 # Files to include in the test. If this list is empty then everything |
|
103 # that is not in the EXCLUDE list is run. |
|
104 # |
|
105 set INCLUDE { |
|
106 } |
|
107 |
|
108 foreach testfile [lsort -dictionary [glob $testdir/*.test]] { |
|
109 # If this is "veryquick.test", do not run any of the malloc or |
|
110 # IO error simulations. |
|
111 if {[info exists ISVERYQUICK] && ( |
|
112 [string match *malloc* $testfile] || [string match *ioerr* $testfile] |
|
113 ) } { |
|
114 continue |
|
115 } |
|
116 |
|
117 #Symbian OS: tail is overwritten in misc5.test, so use a new var tname for it here. |
|
118 set tname [file tail $testfile] |
|
119 if {[lsearch -exact $EXCLUDE $tname]>=0} continue |
|
120 if {[llength $INCLUDE]>0 && [lsearch -exact $INCLUDE $tname]<0} continue |
|
121 if {[info exists STARTAT] && [string match $STARTAT $tname]} {unset STARTAT} |
|
122 if {[info exists STARTAT]} continue |
|
123 print_text "" $tname |
|
124 start_case $tname |
|
125 source $testfile |
|
126 catch {db close} |
|
127 if {$sqlite_open_file_count>0} { |
|
128 puts "$tname did not close all files: $sqlite_open_file_count" |
|
129 # Symbian OS: Set and increase error count with do_fail procedure (definition in Tester.tcl) |
|
130 do_fail $tname |
|
131 set sqlite_open_file_count 0 |
|
132 } |
|
133 |
|
134 foreach var [info vars] { |
|
135 catch { if {[string length [set $var]] > 25000} { unset $var } } |
|
136 } |
|
137 |
|
138 end_case $tname |
|
139 } |
|
140 #set argv quick |
|
141 #source $testdir/permutations.test |
|
142 #set argv "" |
|
143 source $testdir/misuse.test |
|
144 |
|
145 set sqlite_open_file_count 0 |
|
146 really_finish_test |