14dc754d9Sdrh# 2008 July 22 2b2822a2bSshess# 3b2822a2bSshess# May you do good and not evil. 4b2822a2bSshess# May you find forgiveness for yourself and forgive others. 5b2822a2bSshess# May you share freely, never taking more than you give. 6b2822a2bSshess# 7b2822a2bSshess#*********************************************************************** 8b2822a2bSshess# This file runs all tests. 9b2822a2bSshess# 104dc754d9Sdrh# $Id: fts2.test,v 1.2 2008/07/23 18:17:32 drh Exp $ 11b2822a2bSshess 12b2822a2bSshessproc lshift {lvar} { 13b2822a2bSshess upvar $lvar l 14b2822a2bSshess set ret [lindex $l 0] 15b2822a2bSshess set l [lrange $l 1 end] 16b2822a2bSshess return $ret 17b2822a2bSshess} 18b2822a2bSshesswhile {[set arg [lshift argv]] != ""} { 19b2822a2bSshess switch -- $arg { 20b2822a2bSshess -sharedpagercache { 21b2822a2bSshess sqlite3_enable_shared_cache 1 22b2822a2bSshess } 23b2822a2bSshess -soak { 24*430e74cdSdan set G(issoak) 1 25b2822a2bSshess } 26b2822a2bSshess default { 27b2822a2bSshess set argv [linsert $argv 0 $arg] 28b2822a2bSshess break 29b2822a2bSshess } 30b2822a2bSshess } 31b2822a2bSshess} 32b2822a2bSshess 33b2822a2bSshessset testdir [file dirname $argv0] 34b2822a2bSshesssource $testdir/tester.tcl 35b2822a2bSshess# If SQLITE_ENABLE_FTS2 is defined, omit this file. 36b2822a2bSshessifcapable !fts2 { 374dc754d9Sdrh return 38b2822a2bSshess} 39b2822a2bSshessrename finish_test really_finish_test 40b2822a2bSshessproc finish_test {} {} 41*430e74cdSdanset G(isquick) 1 42b2822a2bSshess 43b2822a2bSshessset EXCLUDE { 44b2822a2bSshess fts2.test 45b2822a2bSshess} 46b2822a2bSshess 47b2822a2bSshess# Files to include in the test. If this list is empty then everything 48b2822a2bSshess# that is not in the EXCLUDE list is run. 49b2822a2bSshess# 50b2822a2bSshessset INCLUDE { 51b2822a2bSshess} 52b2822a2bSshess 53b2822a2bSshessforeach testfile [lsort -dictionary [glob $testdir/fts2*.test]] { 54b2822a2bSshess set tail [file tail $testfile] 55b2822a2bSshess if {[lsearch -exact $EXCLUDE $tail]>=0} continue 56b2822a2bSshess if {[llength $INCLUDE]>0 && [lsearch -exact $INCLUDE $tail]<0} continue 57b2822a2bSshess source $testfile 58b2822a2bSshess catch {db close} 59b2822a2bSshess if {$sqlite_open_file_count>0} { 60b2822a2bSshess puts "$tail did not close all files: $sqlite_open_file_count" 61c1a60c51Sdan fail_test $tail 62b2822a2bSshess set sqlite_open_file_count 0 63b2822a2bSshess } 64b2822a2bSshess} 65b2822a2bSshess 66b2822a2bSshessset sqlite_open_file_count 0 67b2822a2bSshessreally_finish_test 68