2001-09-16 04:13:26 +04:00
|
|
|
# 2001 September 15
|
2000-05-30 03:48:22 +04:00
|
|
|
#
|
2001-09-16 04:13:26 +04:00
|
|
|
# The author disclaims copyright to this source code. In place of
|
|
|
|
# a legal notice, here is a blessing:
|
2000-05-30 03:48:22 +04:00
|
|
|
#
|
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.
|
2000-05-30 03:48:22 +04:00
|
|
|
#
|
|
|
|
#***********************************************************************
|
|
|
|
# This file runs all tests.
|
|
|
|
#
|
2009-01-06 21:43:51 +03:00
|
|
|
# $Id: all.test,v 1.62 2009/01/06 18:43:51 drh Exp $
|
2000-05-30 03:48:22 +04:00
|
|
|
|
|
|
|
set testdir [file dirname $argv0]
|
|
|
|
source $testdir/tester.tcl
|
2010-06-08 19:50:53 +04:00
|
|
|
db close
|
2000-05-30 03:48:22 +04:00
|
|
|
|
2000-06-02 18:27:22 +04:00
|
|
|
if {[file exists ./sqlite_test_count]} {
|
|
|
|
set COUNT [exec cat ./sqlite_test_count]
|
|
|
|
} else {
|
2009-01-06 21:43:51 +03:00
|
|
|
set COUNT 1
|
2000-06-02 18:27:22 +04:00
|
|
|
}
|
|
|
|
|
2002-12-04 16:40:25 +03:00
|
|
|
if {[llength $argv]>0} {
|
|
|
|
foreach {name value} $argv {
|
|
|
|
switch -- $name {
|
|
|
|
-count {
|
|
|
|
set COUNT $value
|
|
|
|
}
|
|
|
|
-quick {
|
2010-06-07 21:47:26 +04:00
|
|
|
set G(isquick) $value
|
2002-12-04 16:40:25 +03:00
|
|
|
}
|
2007-06-18 16:22:43 +04:00
|
|
|
-soak {
|
2010-06-07 21:47:26 +04:00
|
|
|
set G(issoak) $value
|
2007-06-18 16:22:43 +04:00
|
|
|
}
|
2002-12-04 16:40:25 +03:00
|
|
|
default {
|
|
|
|
puts stderr "Unknown option: $name"
|
|
|
|
exit
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
set argv {}
|
|
|
|
|
2007-08-31 21:42:48 +04:00
|
|
|
set EXCLUDE {}
|
|
|
|
lappend EXCLUDE all.test ;# This file
|
|
|
|
lappend EXCLUDE async.test
|
2010-06-07 18:28:16 +04:00
|
|
|
lappend EXCLUDE crash.test ;# Run separately later.
|
|
|
|
lappend EXCLUDE crash2.test ;# Run separately later.
|
2007-08-31 21:42:48 +04:00
|
|
|
lappend EXCLUDE quick.test ;# Alternate test driver script
|
2008-04-01 03:51:35 +04:00
|
|
|
lappend EXCLUDE veryquick.test ;# Alternate test driver script
|
2010-06-07 18:28:16 +04:00
|
|
|
lappend EXCLUDE misuse.test ;# Run separately later.
|
2007-08-31 21:42:48 +04:00
|
|
|
lappend EXCLUDE memleak.test ;# Alternate test driver script
|
2010-06-07 18:28:16 +04:00
|
|
|
lappend EXCLUDE permutations.test ;# Run separately later.
|
2007-08-31 21:42:48 +04:00
|
|
|
lappend EXCLUDE soak.test ;# Takes a very long time (default 1 hr)
|
2007-11-23 21:19:22 +03:00
|
|
|
lappend EXCLUDE fts3.test ;# Wrapper for muliple fts3*.tests
|
2007-11-27 17:46:41 +03:00
|
|
|
lappend EXCLUDE mallocAll.test ;# Wrapper for running all malloc tests
|
2005-01-08 05:35:44 +03:00
|
|
|
|
2006-01-11 04:08:34 +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 {
|
|
|
|
}
|
|
|
|
|
2010-06-07 18:28:16 +04:00
|
|
|
for {set Counter 0} {$Counter<$COUNT} {incr Counter} {
|
2001-09-14 01:53:09 +04:00
|
|
|
foreach testfile [lsort -dictionary [glob $testdir/*.test]] {
|
2001-09-16 04:13:26 +04:00
|
|
|
set tail [file tail $testfile]
|
|
|
|
if {[lsearch -exact $EXCLUDE $tail]>=0} continue
|
2006-01-11 04:08:34 +03:00
|
|
|
if {[llength $INCLUDE]>0 && [lsearch -exact $INCLUDE $tail]<0} continue
|
2008-01-19 23:11:25 +03:00
|
|
|
reset_prng_state
|
2010-06-07 21:47:26 +04:00
|
|
|
slave_test_file $testfile
|
2000-12-10 21:23:50 +03:00
|
|
|
}
|
2010-06-07 18:28:16 +04:00
|
|
|
|
|
|
|
if {[set_test_counter errors]} break
|
2000-12-10 21:23:50 +03:00
|
|
|
}
|
2008-06-21 22:07:37 +04:00
|
|
|
set argv all
|
|
|
|
source $testdir/permutations.test
|
|
|
|
set argv ""
|
2000-12-10 21:23:50 +03:00
|
|
|
|
2005-01-08 05:35:44 +03:00
|
|
|
# Run the crashtest only on unix and only once. If the library does not
|
|
|
|
# always create auto-vacuum databases, also run autovacuum_crash.test.
|
2004-06-26 23:35:29 +04:00
|
|
|
#
|
2005-01-13 14:07:52 +03:00
|
|
|
if {$::tcl_platform(platform)=="unix"} {
|
2010-06-07 21:47:26 +04:00
|
|
|
slave_test_file [file join $testdir crash.test]
|
|
|
|
slave_test_file [file join $testdir crash2.test]
|
|
|
|
|
2005-01-08 05:35:44 +03:00
|
|
|
ifcapable !default_autovacuum {
|
2008-06-21 22:07:37 +04:00
|
|
|
set argv autovacuum_crash
|
|
|
|
source $testdir/permutations.test
|
|
|
|
set argv ""
|
2005-01-08 05:35:44 +03:00
|
|
|
}
|
2004-06-26 23:35:29 +04:00
|
|
|
}
|
|
|
|
|
2010-06-07 21:47:26 +04:00
|
|
|
# Run the misuse test after memory leak detection. It may leak memory.
|
|
|
|
# Currently, misuse.test also leaks a handful of file descriptors. This is
|
|
|
|
# not considered a problem.
|
2001-10-22 06:58:08 +04:00
|
|
|
#
|
2010-06-07 21:47:26 +04:00
|
|
|
slave_test_file [file join $testdir misuse.test]
|
|
|
|
finish_test
|
2001-04-11 18:28:42 +04:00
|
|
|
|