sl@0: # 2007 November 23 sl@0: # sl@0: # May you do good and not evil. sl@0: # May you find forgiveness for yourself and forgive others. sl@0: # May you share freely, never taking more than you give. sl@0: # sl@0: #*********************************************************************** sl@0: # This file runs all tests. sl@0: # sl@0: # $Id: fts3.test,v 1.2 2008/07/23 18:17:32 drh Exp $ sl@0: sl@0: proc lshift {lvar} { sl@0: upvar $lvar l sl@0: set ret [lindex $l 0] sl@0: set l [lrange $l 1 end] sl@0: return $ret sl@0: } sl@0: while {[set arg [lshift argv]] != ""} { sl@0: switch -- $arg { sl@0: -sharedpagercache { sl@0: sqlite3_enable_shared_cache 1 sl@0: } sl@0: -soak { sl@0: set SOAKTEST 1 sl@0: } sl@0: default { sl@0: set argv [linsert $argv 0 $arg] sl@0: break sl@0: } sl@0: } sl@0: } sl@0: sl@0: set testdir [file dirname $argv0] sl@0: source $testdir/tester.tcl sl@0: # If SQLITE_ENABLE_FTS3 is defined, omit this file. sl@0: ifcapable !fts3 { sl@0: return sl@0: } sl@0: rename finish_test really_finish_test sl@0: proc finish_test {} {} sl@0: set ISQUICK 1 sl@0: sl@0: set EXCLUDE { sl@0: fts3.test sl@0: } sl@0: sl@0: # Files to include in the test. If this list is empty then everything sl@0: # that is not in the EXCLUDE list is run. sl@0: # sl@0: set INCLUDE { sl@0: } sl@0: sl@0: foreach testfile [lsort -dictionary [glob $testdir/fts3*.test]] { sl@0: set tail [file tail $testfile] sl@0: if {[lsearch -exact $EXCLUDE $tail]>=0} continue sl@0: if {[llength $INCLUDE]>0 && [lsearch -exact $INCLUDE $tail]<0} continue sl@0: source $testfile sl@0: catch {db close} sl@0: if {$sqlite_open_file_count>0} { sl@0: puts "$tail did not close all files: $sqlite_open_file_count" sl@0: incr nErr sl@0: lappend ::failList $tail sl@0: set sqlite_open_file_count 0 sl@0: } sl@0: } sl@0: sl@0: set sqlite_open_file_count 0 sl@0: really_finish_test