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.
|
|
|
|
#
|
2007-06-18 16:22:43 +04:00
|
|
|
# $Id: quick.test,v 1.59 2007/06/18 12:22:43 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
|
|
|
|
}
|
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
|
|
|
|
proc finish_test {} {}
|
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
|
2001-09-16 04:13:26 +04:00
|
|
|
btree2.test
|
2004-09-02 18:57:08 +04:00
|
|
|
btree3.test
|
|
|
|
btree4.test
|
|
|
|
btree5.test
|
|
|
|
btree6.test
|
2004-08-30 20:52:17 +04:00
|
|
|
corrupt.test
|
|
|
|
crash.test
|
2007-03-17 13:26:59 +03:00
|
|
|
crash2.test
|
2007-03-26 16:26:27 +04:00
|
|
|
exclusive3.test
|
2007-05-10 19:37:52 +04:00
|
|
|
fuzz.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
|
2001-10-22 06:58:08 +04:00
|
|
|
malloc.test
|
2005-03-21 07:04:02 +03:00
|
|
|
malloc2.test
|
2005-12-07 09:27:43 +03:00
|
|
|
malloc3.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
|
2004-08-30 20:52:17 +04:00
|
|
|
quick.test
|
2007-05-30 12:18:04 +04:00
|
|
|
soak.test
|
2006-11-24 00:09:10 +03:00
|
|
|
speed1.test
|
2007-03-26 17:48:12 +04:00
|
|
|
speed2.test
|
2007-05-08 19:59:05 +04:00
|
|
|
sqllimits1.test
|
2006-01-09 19:12:04 +03: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-10 10:14:23 +03:00
|
|
|
utf16.test
|
2006-01-20 13:55:05 +03:00
|
|
|
shared_err.test
|
2006-06-23 12:05:19 +04:00
|
|
|
vtab_err.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]] {
|
|
|
|
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
|
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
|
|
|
|
}
|
|
|
|
if {$::sqlite3_tsd_count} {
|
|
|
|
puts "Thread-specific data leak: $::sqlite3_tsd_count instances"
|
|
|
|
incr nErr
|
|
|
|
lappend ::failList $tail
|
|
|
|
set ::sqlite3_tsd_count 0
|
2003-02-17 01:21:32 +03:00
|
|
|
}
|
2001-09-16 04:13:26 +04:00
|
|
|
}
|
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
|