2001-09-16 04:13:26 +04:00
|
|
|
#
|
|
|
|
# May you do good and not evil.
|
|
|
|
# May you find forgiveness for yourself and forgive others.
|
|
|
|
# May you share freely, never taking more than you give.
|
|
|
|
#
|
|
|
|
#***********************************************************************
|
|
|
|
# This file runs all tests.
|
|
|
|
#
|
2008-10-13 18:16:11 +04:00
|
|
|
# $Id: quick.test,v 1.88 2008/10/13 14:16:11 drh Exp $
|
2005-12-30 19:28:01 +03:00
|
|
|
|
|
|
|
proc lshift {lvar} {
|
|
|
|
upvar $lvar l
|
|
|
|
set ret [lindex $l 0]
|
|
|
|
set l [lrange $l 1 end]
|
|
|
|
return $ret
|
|
|
|
}
|
|
|
|
while {[set arg [lshift argv]] != ""} {
|
|
|
|
switch -- $arg {
|
|
|
|
-sharedpagercache {
|
|
|
|
sqlite3_enable_shared_cache 1
|
|
|
|
}
|
2007-06-18 16:22:43 +04:00
|
|
|
-soak {
|
|
|
|
set SOAKTEST 1
|
|
|
|
}
|
2008-03-28 18:44:09 +03:00
|
|
|
-start {
|
|
|
|
set STARTAT "[lshift argv]*"
|
|
|
|
}
|
2005-12-30 19:28:01 +03:00
|
|
|
default {
|
|
|
|
set argv [linsert $argv 0 $arg]
|
|
|
|
break
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2001-09-16 04:13:26 +04:00
|
|
|
|
|
|
|
set testdir [file dirname $argv0]
|
|
|
|
source $testdir/tester.tcl
|
|
|
|
rename finish_test really_finish_test
|
2008-10-13 18:16:11 +04:00
|
|
|
proc finish_test {} {
|
|
|
|
catch {db close}
|
|
|
|
show_memstats
|
|
|
|
}
|
2002-07-07 20:52:46 +04:00
|
|
|
set ISQUICK 1
|
2001-09-16 04:13:26 +04:00
|
|
|
|
|
|
|
set EXCLUDE {
|
|
|
|
all.test
|
2005-12-15 13:11:30 +03:00
|
|
|
async.test
|
2006-02-14 13:48:39 +03:00
|
|
|
async2.test
|
2008-06-26 12:29:34 +04:00
|
|
|
async3.test
|
2004-08-30 20:52:17 +04:00
|
|
|
corrupt.test
|
|
|
|
crash.test
|
2007-03-17 13:26:59 +03:00
|
|
|
crash2.test
|
2007-08-23 20:27:21 +04:00
|
|
|
crash3.test
|
2008-01-08 21:57:50 +03:00
|
|
|
crash4.test
|
2008-06-25 21:54:53 +04:00
|
|
|
crash5.test
|
2008-03-20 07:45:49 +03:00
|
|
|
crash6.test
|
2008-03-20 19:26:48 +03:00
|
|
|
crash7.test
|
2008-06-25 21:54:53 +04:00
|
|
|
delete3.test
|
2007-11-23 20:31:17 +03:00
|
|
|
fts3.test
|
2007-05-10 19:37:52 +04:00
|
|
|
fuzz.test
|
2008-09-09 22:28:06 +04:00
|
|
|
fuzz3.test
|
2007-05-30 14:36:47 +04:00
|
|
|
fuzz_malloc.test
|
2007-05-12 13:30:47 +04:00
|
|
|
in2.test
|
2006-06-14 14:38:02 +04:00
|
|
|
loadext.test
|
2002-08-24 22:24:51 +04:00
|
|
|
memleak.test
|
2007-03-31 14:00:48 +04:00
|
|
|
misc7.test
|
2003-02-17 01:21:32 +03:00
|
|
|
misuse.test
|
2008-06-18 21:09:10 +04:00
|
|
|
mutex2.test
|
2007-09-14 20:20:00 +04:00
|
|
|
onefile.test
|
2008-06-21 16:15:04 +04:00
|
|
|
permutations.test
|
2004-08-30 20:52:17 +04:00
|
|
|
quick.test
|
2008-06-24 15:21:20 +04:00
|
|
|
select9.test
|
2007-05-30 12:18:04 +04:00
|
|
|
soak.test
|
2006-11-24 00:09:10 +03:00
|
|
|
speed1.test
|
2008-03-22 04:08:00 +03:00
|
|
|
speed1p.test
|
2007-03-26 17:48:12 +04:00
|
|
|
speed2.test
|
2008-04-11 18:56:53 +04:00
|
|
|
speed3.test
|
2007-10-23 14:25:30 +04:00
|
|
|
speed4.test
|
2008-04-11 18:56:53 +04:00
|
|
|
speed4p.test
|
2007-05-08 19:59:05 +04:00
|
|
|
sqllimits1.test
|
2008-06-25 21:54:53 +04:00
|
|
|
tkt2686.test
|
2007-09-10 14:53:01 +04:00
|
|
|
thread001.test
|
|
|
|
thread002.test
|
2008-08-28 12:31:48 +04:00
|
|
|
thread003.test
|
2008-08-27 22:56:36 +04:00
|
|
|
trans2.test
|
2008-06-25 21:54:53 +04:00
|
|
|
vacuum3.test
|
2007-09-10 14:53:01 +04:00
|
|
|
|
2007-04-28 19:47:43 +04:00
|
|
|
incrvacuum_ioerr.test
|
2004-11-08 12:26:09 +03:00
|
|
|
autovacuum_crash.test
|
2004-11-13 16:19:56 +03:00
|
|
|
btree8.test
|
2006-01-20 13:55:05 +03:00
|
|
|
shared_err.test
|
2006-06-23 12:05:19 +04:00
|
|
|
vtab_err.test
|
2008-04-01 03:51:35 +04:00
|
|
|
veryquick.test
|
2008-06-25 21:54:53 +04:00
|
|
|
mallocAll.test
|
2001-09-16 04:13:26 +04:00
|
|
|
}
|
|
|
|
|
2004-06-19 04:16:31 +04:00
|
|
|
if {[sqlite3 -has-codec]} {
|
2004-07-22 19:02:25 +04:00
|
|
|
# lappend EXCLUDE \
|
|
|
|
# conflict.test
|
2004-02-11 05:18:05 +03:00
|
|
|
}
|
|
|
|
|
2006-11-09 03:24:53 +03:00
|
|
|
|
|
|
|
# Files to include in the test. If this list is empty then everything
|
|
|
|
# that is not in the EXCLUDE list is run.
|
|
|
|
#
|
|
|
|
set INCLUDE {
|
|
|
|
}
|
|
|
|
|
2001-09-16 04:13:26 +04:00
|
|
|
foreach testfile [lsort -dictionary [glob $testdir/*.test]] {
|
2008-06-25 21:54:53 +04:00
|
|
|
# If this is "veryquick.test", do not run any of the malloc or
|
|
|
|
# IO error simulations.
|
|
|
|
if {[info exists ISVERYQUICK] && (
|
|
|
|
[string match *malloc* $testfile] || [string match *ioerr* $testfile]
|
|
|
|
) } {
|
|
|
|
continue
|
|
|
|
}
|
|
|
|
|
2001-09-16 04:13:26 +04:00
|
|
|
set tail [file tail $testfile]
|
|
|
|
if {[lsearch -exact $EXCLUDE $tail]>=0} continue
|
2006-11-09 03:24:53 +03:00
|
|
|
if {[llength $INCLUDE]>0 && [lsearch -exact $INCLUDE $tail]<0} continue
|
2008-03-28 18:44:09 +03:00
|
|
|
if {[info exists STARTAT] && [string match $STARTAT $tail]} {unset STARTAT}
|
|
|
|
if {[info exists STARTAT]} continue
|
2001-09-16 04:13:26 +04:00
|
|
|
source $testfile
|
2003-02-17 01:21:32 +03:00
|
|
|
catch {db close}
|
|
|
|
if {$sqlite_open_file_count>0} {
|
|
|
|
puts "$tail did not close all files: $sqlite_open_file_count"
|
|
|
|
incr nErr
|
|
|
|
lappend ::failList $tail
|
2007-04-16 21:07:55 +04:00
|
|
|
set sqlite_open_file_count 0
|
|
|
|
}
|
2001-09-16 04:13:26 +04:00
|
|
|
}
|
2008-06-25 21:54:53 +04:00
|
|
|
#set argv quick
|
|
|
|
#source $testdir/permutations.test
|
|
|
|
#set argv ""
|
2004-06-29 17:41:21 +04:00
|
|
|
source $testdir/misuse.test
|
2001-09-16 04:13:26 +04:00
|
|
|
|
2003-02-17 01:21:32 +03:00
|
|
|
set sqlite_open_file_count 0
|
2001-09-16 04:13:26 +04:00
|
|
|
really_finish_test
|