OLD | NEW |
1 # 2007 November 23 | 1 # 2007 November 23 |
2 # | 2 # |
3 # May you do good and not evil. | 3 # May you do good and not evil. |
4 # May you find forgiveness for yourself and forgive others. | 4 # May you find forgiveness for yourself and forgive others. |
5 # May you share freely, never taking more than you give. | 5 # May you share freely, never taking more than you give. |
6 # | 6 # |
7 #*********************************************************************** | 7 #*********************************************************************** |
8 # This file runs all tests. | 8 # This file runs all tests. |
9 # | 9 # |
10 # $Id: fts3.test,v 1.2 2008/07/23 18:17:32 drh Exp $ | 10 # $Id: fts3.test,v 1.2 2008/07/23 18:17:32 drh Exp $ |
11 | 11 |
12 proc lshift {lvar} { | 12 set testdir [file dirname $argv0] |
13 upvar $lvar l | 13 source $testdir/permutations.test |
14 set ret [lindex $l 0] | 14 |
15 set l [lrange $l 1 end] | 15 ifcapable fts3 { |
16 return $ret | 16 run_test_suite fts3 |
17 } | |
18 while {[set arg [lshift argv]] != ""} { | |
19 switch -- $arg { | |
20 -sharedpagercache { | |
21 sqlite3_enable_shared_cache 1 | |
22 } | |
23 -soak { | |
24 set SOAKTEST 1 | |
25 } | |
26 default { | |
27 set argv [linsert $argv 0 $arg] | |
28 break | |
29 } | |
30 } | |
31 } | 17 } |
32 | 18 |
33 set testdir [file dirname $argv0] | 19 finish_test |
34 source $testdir/tester.tcl | |
35 # If SQLITE_ENABLE_FTS3 is defined, omit this file. | |
36 ifcapable !fts3 { | |
37 return | |
38 } | |
39 rename finish_test really_finish_test | |
40 proc finish_test {} {} | |
41 set ISQUICK 1 | |
42 | |
43 set EXCLUDE { | |
44 fts3.test | |
45 } | |
46 | |
47 # Files to include in the test. If this list is empty then everything | |
48 # that is not in the EXCLUDE list is run. | |
49 # | |
50 set INCLUDE { | |
51 } | |
52 | |
53 foreach testfile [lsort -dictionary [glob $testdir/fts3*.test]] { | |
54 set tail [file tail $testfile] | |
55 if {[lsearch -exact $EXCLUDE $tail]>=0} continue | |
56 if {[llength $INCLUDE]>0 && [lsearch -exact $INCLUDE $tail]<0} continue | |
57 source $testfile | |
58 catch {db close} | |
59 if {$sqlite_open_file_count>0} { | |
60 puts "$tail did not close all files: $sqlite_open_file_count" | |
61 incr nErr | |
62 lappend ::failList $tail | |
63 set sqlite_open_file_count 0 | |
64 } | |
65 } | |
66 | |
67 set sqlite_open_file_count 0 | |
68 really_finish_test | |
OLD | NEW |