sl@0: # sl@0: # Portions Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiaries. All rights reserved. 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: quick.test,v 1.87 2008/09/09 18:28:07 danielk1977 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: -start { sl@0: set STARTAT "[lshift argv]*" 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: rename finish_test really_finish_test sl@0: proc finish_test {} {} sl@0: set ISQUICK 1 sl@0: sl@0: set EXCLUDE { sl@0: all.test sl@0: async.test sl@0: async2.test sl@0: async3.test sl@0: corrupt.test sl@0: crash.test sl@0: crash2.test sl@0: crash3.test sl@0: crash4.test sl@0: crash5.test sl@0: crash6.test sl@0: crash7.test sl@0: delete3.test sl@0: fts3.test sl@0: fuzz.test sl@0: fuzz3.test sl@0: fuzz_malloc.test sl@0: in2.test sl@0: loadext.test sl@0: memleak.test sl@0: misc7.test sl@0: misuse.test sl@0: mutex2.test sl@0: onefile.test sl@0: permutations.test sl@0: quick.test sl@0: rtree.test sl@0: select9.test sl@0: soak.test sl@0: speed1.test sl@0: speed1p.test sl@0: speed2.test sl@0: speed3.test sl@0: speed4.test sl@0: speed4p.test sl@0: sqllimits1.test sl@0: tkt2686.test sl@0: thread001.test sl@0: thread002.test sl@0: thread003.test sl@0: trans2.test sl@0: vacuum3.test sl@0: sl@0: incrvacuum_ioerr.test sl@0: autovacuum_crash.test sl@0: btree8.test sl@0: shared_err.test sl@0: vtab_err.test sl@0: veryquick.test sl@0: mallocAll.test sl@0: } sl@0: sl@0: if {[sqlite3 -has-codec]} { sl@0: # lappend EXCLUDE \ sl@0: # conflict.test sl@0: } 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/*.test]] { sl@0: # If this is "veryquick.test", do not run any of the malloc or sl@0: # IO error simulations. sl@0: if {[info exists ISVERYQUICK] && ( sl@0: [string match *malloc* $testfile] || [string match *ioerr* $testfile] sl@0: ) } { sl@0: continue sl@0: } sl@0: sl@0: #Symbian OS: tail is overwritten in misc5.test, so use a new var tname for it here. sl@0: set tname [file tail $testfile] sl@0: if {[lsearch -exact $EXCLUDE $tname]>=0} continue sl@0: if {[llength $INCLUDE]>0 && [lsearch -exact $INCLUDE $tname]<0} continue sl@0: if {[info exists STARTAT] && [string match $STARTAT $tname]} {unset STARTAT} sl@0: if {[info exists STARTAT]} continue sl@0: print_text "" $tname sl@0: start_case $tname sl@0: source $testfile sl@0: catch {db close} sl@0: if {$sqlite_open_file_count>0} { sl@0: puts "$tname did not close all files: $sqlite_open_file_count" sl@0: # Symbian OS: Set and increase error count with do_fail procedure (definition in Tester.tcl) sl@0: do_fail $tname sl@0: set sqlite_open_file_count 0 sl@0: } sl@0: sl@0: foreach var [info vars] { sl@0: catch { if {[string length [set $var]] > 25000} { unset $var } } sl@0: } sl@0: sl@0: end_case $tname sl@0: } sl@0: #set argv quick sl@0: #source $testdir/permutations.test sl@0: #set argv "" sl@0: source $testdir/misuse.test sl@0: sl@0: set sqlite_open_file_count 0 sl@0: really_finish_test