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