2008-06-21 22:07:37 +04:00
|
|
|
# 2008 June 21
|
|
|
|
#
|
|
|
|
# The author disclaims copyright to this source code. In place of
|
|
|
|
# a legal notice, here is a blessing:
|
|
|
|
#
|
|
|
|
# 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.
|
|
|
|
#
|
|
|
|
#***********************************************************************
|
|
|
|
#
|
|
|
|
|
|
|
|
set testdir [file dirname $argv0]
|
|
|
|
source $testdir/tester.tcl
|
2010-06-11 23:04:21 +04:00
|
|
|
db close
|
2008-06-21 22:07:37 +04:00
|
|
|
|
2010-06-15 10:56:37 +04:00
|
|
|
#-------------------------------------------------------------------------
|
|
|
|
# test_suite NAME OPTIONS
|
2008-06-21 22:07:37 +04:00
|
|
|
#
|
|
|
|
# where available options are:
|
|
|
|
#
|
2010-06-07 21:47:26 +04:00
|
|
|
# -description TITLE (default "")
|
2008-06-21 22:07:37 +04:00
|
|
|
# -initialize SCRIPT (default "")
|
|
|
|
# -shutdown SCRIPT (default "")
|
|
|
|
# -presql SQL (default "")
|
2010-06-15 10:56:37 +04:00
|
|
|
# -files LIST-OF-FILES (default $::ALLTESTS)
|
2010-06-15 22:00:06 +04:00
|
|
|
# -prefix NAME (default "$::NAME.")
|
2010-12-07 17:32:28 +03:00
|
|
|
# -dbconfig SCRIPT (default "")
|
2010-06-15 10:56:37 +04:00
|
|
|
#
|
|
|
|
proc test_suite {name args} {
|
2010-06-07 21:47:26 +04:00
|
|
|
|
2010-06-15 10:56:37 +04:00
|
|
|
set default(-shutdown) ""
|
|
|
|
set default(-initialize) ""
|
|
|
|
set default(-presql) ""
|
2010-06-07 21:47:26 +04:00
|
|
|
set default(-description) "no description supplied (fixme)"
|
2010-06-15 22:00:06 +04:00
|
|
|
set default(-files) ""
|
|
|
|
set default(-prefix) "${name}."
|
2010-12-07 17:32:28 +03:00
|
|
|
set default(-dbconfig) ""
|
2010-06-07 21:47:26 +04:00
|
|
|
|
|
|
|
array set options [array get default]
|
2010-06-15 10:56:37 +04:00
|
|
|
if {[llength $args]%2} {
|
|
|
|
error "uneven number of options/switches passed to test_suite"
|
2008-06-21 22:07:37 +04:00
|
|
|
}
|
2010-06-15 10:56:37 +04:00
|
|
|
foreach {k v} $args {
|
|
|
|
set o [array names options ${k}*]
|
|
|
|
if {[llength $o]>1} { error "ambiguous option: $k" }
|
|
|
|
if {[llength $o]==0} { error "unknown option: $k" }
|
|
|
|
set options([lindex $o 0]) $v
|
2008-08-25 21:23:29 +04:00
|
|
|
}
|
2008-06-21 22:07:37 +04:00
|
|
|
|
2010-06-15 10:56:37 +04:00
|
|
|
set ::testspec($name) [array get options]
|
|
|
|
lappend ::testsuitelist $name
|
|
|
|
}
|
2010-06-07 21:47:26 +04:00
|
|
|
|
2010-06-15 10:56:37 +04:00
|
|
|
#-------------------------------------------------------------------------
|
|
|
|
# test_set ARGS...
|
|
|
|
#
|
|
|
|
proc test_set {args} {
|
|
|
|
set isExclude 0
|
|
|
|
foreach a $args {
|
|
|
|
if {[string match -* $a]} {
|
|
|
|
switch -- $a {
|
|
|
|
-include { set isExclude 0 }
|
|
|
|
-exclude { set isExclude 1 }
|
|
|
|
default {
|
|
|
|
error "Unknown switch: $a"
|
|
|
|
}
|
2008-08-30 17:25:10 +04:00
|
|
|
}
|
2010-06-15 10:56:37 +04:00
|
|
|
} elseif {$isExclude == 0} {
|
|
|
|
foreach f $a { set t($f) 1 }
|
2008-08-25 21:23:29 +04:00
|
|
|
} else {
|
2010-06-15 10:56:37 +04:00
|
|
|
foreach f $a { array unset t $f }
|
2010-08-26 18:15:37 +04:00
|
|
|
foreach f $a { array unset t */$f }
|
2008-06-21 22:07:37 +04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2010-06-15 10:56:37 +04:00
|
|
|
return [array names t]
|
|
|
|
}
|
2010-06-07 21:47:26 +04:00
|
|
|
|
2010-06-15 10:56:37 +04:00
|
|
|
#-------------------------------------------------------------------------
|
|
|
|
# Set up the following global list variables containing the names of
|
|
|
|
# various test scripts:
|
|
|
|
#
|
|
|
|
# $alltests
|
2010-06-15 22:00:06 +04:00
|
|
|
# $allquicktests
|
2010-06-15 10:56:37 +04:00
|
|
|
#
|
|
|
|
set alltests [list]
|
|
|
|
foreach f [glob $testdir/*.test] { lappend alltests [file tail $f] }
|
2017-10-11 23:26:07 +03:00
|
|
|
foreach f [glob -nocomplain \
|
|
|
|
$testdir/../ext/rtree/*.test \
|
2016-03-01 19:02:57 +03:00
|
|
|
$testdir/../ext/fts5/test/*.test \
|
2017-10-11 23:26:07 +03:00
|
|
|
$testdir/../ext/expert/*.test \
|
2017-07-14 14:40:48 +03:00
|
|
|
$testdir/../ext/lsm1/test/*.test \
|
|
|
|
] {
|
2010-08-26 18:15:37 +04:00
|
|
|
lappend alltests $f
|
|
|
|
}
|
2011-03-19 18:37:02 +03:00
|
|
|
foreach f [glob -nocomplain $testdir/../ext/session/*.test] {
|
|
|
|
lappend alltests $f
|
|
|
|
}
|
2010-08-26 18:15:37 +04:00
|
|
|
|
2010-06-15 10:56:37 +04:00
|
|
|
if {$::tcl_platform(platform)!="unix"} {
|
|
|
|
set alltests [test_set $alltests -exclude crash.test crash2.test]
|
2008-06-21 22:07:37 +04:00
|
|
|
}
|
2010-06-15 10:56:37 +04:00
|
|
|
set alltests [test_set $alltests -exclude {
|
|
|
|
all.test async.test quick.test veryquick.test
|
|
|
|
memleak.test permutations.test soak.test fts3.test
|
2015-06-10 21:53:09 +03:00
|
|
|
mallocAll.test rtree.test full.test extraquick.test
|
2018-07-22 09:25:35 +03:00
|
|
|
session.test rbu.test
|
2010-06-15 10:56:37 +04:00
|
|
|
}]
|
2008-06-21 22:07:37 +04:00
|
|
|
|
2010-06-15 10:56:37 +04:00
|
|
|
set allquicktests [test_set $alltests -exclude {
|
|
|
|
async2.test async3.test backup_ioerr.test corrupt.test
|
|
|
|
corruptC.test crash.test crash2.test crash3.test crash4.test crash5.test
|
|
|
|
crash6.test crash7.test delete3.test e_fts3.test fts3rnd.test
|
|
|
|
fkey_malloc.test fuzz.test fuzz3.test fuzz_malloc.test in2.test loadext.test
|
2010-06-26 19:42:33 +04:00
|
|
|
misc7.test mutex2.test notify2.test onefile.test pagerfault2.test
|
2010-06-15 10:56:37 +04:00
|
|
|
savepoint4.test savepoint6.test select9.test
|
|
|
|
speed1.test speed1p.test speed2.test speed3.test speed4.test
|
|
|
|
speed4p.test sqllimits1.test tkt2686.test thread001.test thread002.test
|
|
|
|
thread003.test thread004.test thread005.test trans2.test vacuum3.test
|
|
|
|
incrvacuum_ioerr.test autovacuum_crash.test btree8.test shared_err.test
|
2011-12-17 12:10:34 +04:00
|
|
|
vtab_err.test walslow.test walcrash.test walcrash3.test
|
2012-08-07 21:41:50 +04:00
|
|
|
walthread.test rtree3.test indexfault.test securedel2.test
|
2014-05-20 03:17:33 +04:00
|
|
|
sort3.test sort4.test fts4growth.test fts4growth2.test
|
2018-07-23 00:08:35 +03:00
|
|
|
bigsort.test walprotocol.test mmap4.test fuzzer2.test
|
2016-02-04 20:31:03 +03:00
|
|
|
walcrash2.test e_fkey.test backup.test
|
|
|
|
|
|
|
|
fts4merge.test fts4merge2.test fts4merge4.test fts4check.test
|
2019-10-02 22:33:34 +03:00
|
|
|
fts4merge5.test
|
2016-02-04 20:31:03 +03:00
|
|
|
fts3cov.test fts3snippet.test fts3corrupt2.test fts3an.test
|
|
|
|
fts3defer.test fts4langid.test fts3sort.test fts5unicode.test
|
|
|
|
|
|
|
|
rtree4.test
|
2021-05-25 18:21:54 +03:00
|
|
|
sessionbig.test
|
2010-06-15 10:56:37 +04:00
|
|
|
}]
|
2010-07-05 09:54:55 +04:00
|
|
|
if {[info exists ::env(QUICKTEST_INCLUDE)]} {
|
|
|
|
set allquicktests [concat $allquicktests $::env(QUICKTEST_INCLUDE)]
|
|
|
|
}
|
2015-01-02 02:02:01 +03:00
|
|
|
if {[info exists ::env(QUICKTEST_OMIT)]} {
|
2020-08-13 20:27:57 +03:00
|
|
|
# If environment variable QUICKTEST_OMIT is set, it is a comma-separated
|
|
|
|
# list of regular expressions to match against test file names in
|
|
|
|
# the "allquicktests" set. Any matches are excluded. Only the filename
|
|
|
|
# is matched, not any directory component of the path.
|
|
|
|
set all [list]
|
|
|
|
foreach a $allquicktests {
|
|
|
|
set bIn 1
|
|
|
|
foreach x [split $::env(QUICKTEST_OMIT) ,] {
|
|
|
|
if {[regexp $x [file tail $a]]} {
|
|
|
|
set bIn 0
|
|
|
|
break
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if {$bIn} {
|
|
|
|
lappend all $a
|
|
|
|
}
|
2015-01-02 02:02:01 +03:00
|
|
|
}
|
2020-08-13 20:27:57 +03:00
|
|
|
set allquicktests $all
|
2015-01-02 02:02:01 +03:00
|
|
|
}
|
2008-08-30 17:25:10 +04:00
|
|
|
|
2015-01-08 05:15:11 +03:00
|
|
|
# If the TEST_FAILURE environment variable is set, it means that we what to
|
|
|
|
# deliberately provoke test failures in order to test the test infrastructure.
|
|
|
|
# Only the main.test module is needed for this.
|
|
|
|
#
|
|
|
|
if {[info exists ::env(TEST_FAILURE)]} {
|
|
|
|
set allquicktests main.test
|
|
|
|
}
|
2008-08-30 17:25:10 +04:00
|
|
|
|
2008-06-21 22:07:37 +04:00
|
|
|
#############################################################################
|
|
|
|
# Start of tests
|
2010-06-15 10:56:37 +04:00
|
|
|
#
|
|
|
|
|
|
|
|
#-------------------------------------------------------------------------
|
|
|
|
# Define the generic test suites:
|
|
|
|
#
|
|
|
|
# veryquick
|
|
|
|
# quick
|
|
|
|
# full
|
|
|
|
#
|
2010-06-15 21:44:47 +04:00
|
|
|
lappend ::testsuitelist xxx
|
2010-06-15 10:56:37 +04:00
|
|
|
|
2010-06-15 22:00:06 +04:00
|
|
|
test_suite "veryquick" -prefix "" -description {
|
2015-06-10 21:53:09 +03:00
|
|
|
"Very" quick test suite. Runs in minutes on a workstation.
|
2010-06-15 10:56:37 +04:00
|
|
|
This test suite is the same as the "quick" tests, except that some files
|
|
|
|
that test malloc and IO errors are omitted.
|
|
|
|
} -files [
|
2016-03-01 19:02:57 +03:00
|
|
|
test_set $allquicktests -exclude *malloc* *ioerr* *fault* *bigfile* *_err* \
|
2018-05-19 17:15:29 +03:00
|
|
|
*fts5corrupt* *fts5big* *fts5aj*
|
2015-06-10 21:53:09 +03:00
|
|
|
]
|
|
|
|
|
2020-05-29 22:39:35 +03:00
|
|
|
test_suite "shell" -prefix "" -description {
|
|
|
|
Run tests of the command-line shell
|
|
|
|
} -files [
|
|
|
|
test_set [glob $testdir/shell*.test]
|
|
|
|
]
|
|
|
|
|
2015-06-10 21:53:09 +03:00
|
|
|
test_suite "extraquick" -prefix "" -description {
|
|
|
|
"Extra" quick test suite. Runs in a few minutes on a workstation.
|
|
|
|
This test suite is the same as the "veryquick" tests, except that
|
|
|
|
slower tests are omitted.
|
|
|
|
} -files [
|
2016-02-04 20:31:03 +03:00
|
|
|
test_set $allquicktests -exclude *malloc* *ioerr* *fault* *bigfile* *_err* \
|
2015-06-10 21:53:09 +03:00
|
|
|
wal3.test fts4merge* sort2.test mmap1.test walcrash* \
|
|
|
|
percentile.test where8m.test walcksum.test savepoint3.test \
|
|
|
|
fuzzer1.test fuzzer3.test fts3expr3.test
|
2010-06-15 10:56:37 +04:00
|
|
|
]
|
|
|
|
|
2013-04-15 21:03:42 +04:00
|
|
|
test_suite "mmap" -prefix "mm-" -description {
|
2014-12-31 12:52:15 +03:00
|
|
|
Similar to veryquick. Except with memory mapping enabled.
|
2013-03-19 23:28:06 +04:00
|
|
|
} -presql {
|
2013-04-15 21:03:42 +04:00
|
|
|
pragma mmap_size = 268435456;
|
2010-06-15 10:56:37 +04:00
|
|
|
} -files [
|
2014-12-31 21:08:46 +03:00
|
|
|
test_set $allquicktests -exclude *malloc* *ioerr* *fault* -include malloc.test
|
2010-06-15 10:56:37 +04:00
|
|
|
]
|
|
|
|
|
2010-12-03 13:32:06 +03:00
|
|
|
test_suite "valgrind" -prefix "" -description {
|
|
|
|
Run the "veryquick" test suite with a couple of multi-process tests (that
|
|
|
|
fail under valgrind) omitted.
|
|
|
|
} -files [
|
2016-02-04 20:31:03 +03:00
|
|
|
test_set $allquicktests -exclude *malloc* *ioerr* *fault* *_err* wal.test \
|
2015-01-09 01:08:57 +03:00
|
|
|
shell*.test crash8.test atof1.test selectG.test \
|
2017-10-19 18:17:38 +03:00
|
|
|
tkt-fc62af4523.test numindex1.test corruptK.test
|
2010-12-03 13:32:06 +03:00
|
|
|
] -initialize {
|
|
|
|
set ::G(valgrind) 1
|
|
|
|
} -shutdown {
|
|
|
|
unset -nocomplain ::G(valgrind)
|
|
|
|
}
|
|
|
|
|
2014-06-02 13:39:24 +04:00
|
|
|
test_suite "valgrind-nolookaside" -prefix "" -description {
|
|
|
|
Run the "veryquick" test suite with a couple of multi-process tests (that
|
|
|
|
fail under valgrind) omitted.
|
|
|
|
} -files [
|
2016-02-04 20:31:03 +03:00
|
|
|
test_set $allquicktests -exclude *malloc* *ioerr* *fault* *_err* \
|
|
|
|
wal.test atof1.test
|
2014-06-02 13:39:24 +04:00
|
|
|
] -initialize {
|
|
|
|
set ::G(valgrind) 1
|
|
|
|
catch {db close}
|
|
|
|
sqlite3_shutdown
|
|
|
|
sqlite3_config_lookaside 0 0
|
|
|
|
sqlite3_initialize
|
|
|
|
autoinstall_test_functions
|
|
|
|
} -shutdown {
|
|
|
|
catch {db close}
|
|
|
|
sqlite3_shutdown
|
|
|
|
sqlite3_config_lookaside 100 500
|
|
|
|
sqlite3_initialize
|
|
|
|
autoinstall_test_functions
|
|
|
|
unset -nocomplain ::G(valgrind)
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2010-06-15 22:00:06 +04:00
|
|
|
test_suite "quick" -prefix "" -description {
|
2010-06-15 10:56:37 +04:00
|
|
|
Quick test suite. Runs in around 10 minutes on a workstation.
|
|
|
|
} -files [
|
|
|
|
test_set $allquicktests
|
|
|
|
]
|
|
|
|
|
2010-06-15 22:00:06 +04:00
|
|
|
test_suite "full" -prefix "" -description {
|
2010-06-15 10:56:37 +04:00
|
|
|
Full test suite. Takes a long time.
|
|
|
|
} -files [
|
|
|
|
test_set $alltests
|
|
|
|
] -initialize {
|
|
|
|
unset -nocomplain ::G(isquick)
|
|
|
|
}
|
|
|
|
|
2010-07-06 15:26:15 +04:00
|
|
|
test_suite "threads" -prefix "" -description {
|
|
|
|
All multi-threaded tests.
|
|
|
|
} -files {
|
|
|
|
notify2.test thread001.test thread002.test thread003.test
|
|
|
|
thread004.test thread005.test walthread.test
|
|
|
|
}
|
|
|
|
|
2010-07-19 15:16:36 +04:00
|
|
|
test_suite "fts3" -prefix "" -description {
|
2010-10-25 16:47:43 +04:00
|
|
|
All FTS3 tests except fts3rnd.test.
|
2010-07-19 15:16:36 +04:00
|
|
|
} -files {
|
2017-03-21 20:19:31 +03:00
|
|
|
fts3aa.test fts3ab.test fts3ac.test fts3ad.test
|
|
|
|
fts3ae.test fts3af.test fts3ag.test fts3ah.test
|
|
|
|
fts3ai.test fts3aj.test fts3ak.test fts3al.test
|
|
|
|
fts3am.test fts3an.test fts3ao.test fts3atoken.test
|
|
|
|
fts3auto.test fts3aux1.test fts3aux2.test fts3b.test
|
|
|
|
fts3comp1.test fts3conf.test fts3corrupt2.test fts3corrupt.test
|
2018-11-03 19:51:30 +03:00
|
|
|
fts3corrupt4.test
|
2017-03-21 20:19:31 +03:00
|
|
|
fts3cov.test fts3c.test fts3defer2.test fts3defer3.test
|
|
|
|
fts3defer.test fts3drop.test fts3d.test fts3e.test
|
|
|
|
fts3expr2.test fts3expr3.test fts3expr4.test fts3expr5.test
|
|
|
|
fts3expr.test fts3fault2.test fts3fault.test fts3first.test
|
|
|
|
fts3join.test fts3malloc.test fts3matchinfo.test fts3near.test
|
|
|
|
fts3offsets.test fts3prefix2.test fts3prefix.test fts3query.test
|
|
|
|
fts3shared.test fts3snippet.test fts3sort.test fts3tok1.test
|
|
|
|
fts3tok_err.test fts3varint.test fts4aa.test fts4check.test
|
|
|
|
fts4content.test fts4docid.test fts4growth2.test fts4growth.test
|
|
|
|
fts4incr.test fts4langid.test fts4lastrowid.test fts4merge2.test
|
|
|
|
fts4merge4.test fts4merge.test fts4noti.test fts4onepass.test
|
|
|
|
fts4opt.test fts4unicode.test
|
2017-04-17 16:38:09 +03:00
|
|
|
fts3corrupt3.test
|
2017-04-17 19:07:25 +03:00
|
|
|
fts3misc.test
|
2010-07-19 15:16:36 +04:00
|
|
|
}
|
|
|
|
|
2014-06-26 00:28:38 +04:00
|
|
|
test_suite "fts5" -prefix "" -description {
|
|
|
|
All FTS5 tests.
|
2014-12-29 18:59:36 +03:00
|
|
|
} -files [glob -nocomplain $::testdir/../ext/fts5/test/*.test]
|
2014-06-26 00:28:38 +04:00
|
|
|
|
2015-05-13 20:15:32 +03:00
|
|
|
test_suite "fts5-light" -prefix "" -description {
|
|
|
|
All FTS5 tests.
|
|
|
|
} -files [
|
|
|
|
test_set \
|
|
|
|
[glob -nocomplain $::testdir/../ext/fts5/test/*.test] \
|
|
|
|
-exclude *corrupt* *fault* *big* *fts5aj*
|
|
|
|
]
|
|
|
|
|
2018-06-14 22:06:36 +03:00
|
|
|
test_suite "window" -prefix "" -description {
|
|
|
|
All window function related tests .
|
|
|
|
} -files [
|
|
|
|
test_set [glob -nocomplain $::testdir/window*.test]
|
|
|
|
]
|
|
|
|
|
2017-07-14 18:45:27 +03:00
|
|
|
test_suite "lsm1" -prefix "" -description {
|
|
|
|
All LSM1 tests.
|
|
|
|
} -files [glob -nocomplain $::testdir/../ext/lsm1/test/*.test]
|
|
|
|
|
2012-06-07 11:24:04 +04:00
|
|
|
test_suite "nofaultsim" -prefix "" -description {
|
|
|
|
"Very" quick test suite. Runs in less than 5 minutes on a workstation.
|
|
|
|
This test suite is the same as the "quick" tests, except that some files
|
|
|
|
that test malloc and IO errors are omitted.
|
|
|
|
} -files [
|
2016-02-04 20:31:03 +03:00
|
|
|
test_set $allquicktests -exclude *malloc* *ioerr* *fault* *_err*
|
2012-06-07 11:24:04 +04:00
|
|
|
] -initialize {
|
|
|
|
catch {db close}
|
|
|
|
sqlite3_shutdown
|
|
|
|
install_malloc_faultsim 0
|
|
|
|
sqlite3_initialize
|
|
|
|
autoinstall_test_functions
|
|
|
|
} -shutdown {
|
|
|
|
unset -nocomplain ::G(valgrind)
|
|
|
|
}
|
2010-07-06 15:26:15 +04:00
|
|
|
|
2013-06-12 18:52:39 +04:00
|
|
|
test_suite "queryplanner" -prefix "" -description {
|
|
|
|
Tests of the query planner and query optimizer
|
|
|
|
} -files {
|
|
|
|
alter2.test alter3.test alter4.test alter.test analyze3.test
|
|
|
|
analyze4.test analyze5.test analyze6.test analyze7.test analyze8.test
|
2013-06-12 21:08:06 +04:00
|
|
|
analyze.test attach2.test attach3.test attach4.test
|
2013-06-12 18:52:39 +04:00
|
|
|
attach.test autoinc.test autoindex1.test between.test cast.test
|
|
|
|
check.test closure01.test coalesce.test collate1.test collate2.test
|
|
|
|
collate3.test collate4.test collate5.test collate6.test collate7.test
|
|
|
|
collate8.test collate9.test collateA.test colmeta.test colname.test
|
|
|
|
conflict.test count.test coveridxscan.test createtab.test cse.test
|
|
|
|
date.test dbstatus2.test dbstatus.test default.test delete2.test
|
|
|
|
delete3.test delete.test descidx1.test descidx2.test descidx3.test
|
|
|
|
distinctagg.test distinct.test e_createtable.test e_delete.test
|
2013-06-12 21:08:06 +04:00
|
|
|
e_droptrigger.test e_dropview.test e_expr.test e_insert.test
|
2013-06-12 18:52:39 +04:00
|
|
|
eqp.test e_reindex.test e_resolve.test e_select2.test e_select.test
|
|
|
|
e_update.test exists.test expr.test fkey1.test fkey2.test fkey3.test
|
2013-06-12 21:08:06 +04:00
|
|
|
fkey4.test fkey5.test func2.test func3.test func.test
|
|
|
|
in3.test in4.test in5.test index2.test index3.test
|
|
|
|
index4.test index5.test indexedby.test index.test
|
2013-06-12 18:52:39 +04:00
|
|
|
insert2.test insert3.test insert4.test insert5.test insert.test
|
|
|
|
instr.test in.test intpkey.test join2.test join3.test join4.test
|
|
|
|
join5.test join6.test join.test like2.test like.test limit.test
|
|
|
|
minmax2.test minmax3.test minmax4.test minmax.test misc1.test misc2.test
|
|
|
|
misc3.test misc4.test misc5.test misc6.test misc7.test orderby1.test
|
|
|
|
orderby2.test orderby3.test orderby4.test randexpr1.test regexp1.test
|
|
|
|
reindex.test rowhash.test rowid.test schema2.test schema3.test
|
2013-06-12 21:08:06 +04:00
|
|
|
schema4.test schema5.test schema.test
|
2013-06-12 18:52:39 +04:00
|
|
|
select1.test select2.test select3.test select4.test select5.test
|
|
|
|
select6.test select7.test select8.test select9.test selectA.test
|
|
|
|
selectB.test selectC.test selectD.test selectE.test sidedelete.test
|
|
|
|
sort.test spellfix.test subquery2.test subquery.test subselect.test
|
|
|
|
substr.test tkt-02a8e81d44.test tkt1435.test tkt1443.test tkt1444.test
|
|
|
|
tkt1449.test tkt1473.test tkt1501.test tkt1512.test tkt1514.test
|
|
|
|
tkt1536.test tkt1537.test tkt1567.test tkt1644.test tkt1667.test
|
|
|
|
tkt1873.test tkt2141.test tkt2192.test tkt2213.test tkt2251.test
|
|
|
|
tkt2285.test tkt2332.test tkt2339.test tkt2391.test tkt2409.test
|
|
|
|
tkt2450.test tkt2565.test tkt2640.test tkt2643.test tkt2686.test
|
|
|
|
tkt-26ff0c2d1e.test tkt2767.test tkt2817.test tkt2820.test tkt2822.test
|
|
|
|
tkt2832.test tkt2854.test tkt2920.test tkt2927.test tkt2942.test
|
|
|
|
tkt-2a5629202f.test tkt-2d1a5c67d.test tkt-2ea2425d34.test tkt3080.test
|
|
|
|
tkt3093.test tkt3121.test tkt-31338dca7e.test tkt-313723c356.test
|
|
|
|
tkt3201.test tkt3292.test tkt3298.test tkt3334.test tkt3346.test
|
|
|
|
tkt3357.test tkt3419.test tkt3424.test tkt3442.test tkt3457.test
|
|
|
|
tkt3461.test tkt3493.test tkt3508.test tkt3522.test tkt3527.test
|
|
|
|
tkt3541.test tkt3554.test tkt3581.test tkt35xx.test tkt3630.test
|
|
|
|
tkt3718.test tkt3731.test tkt3757.test tkt3761.test tkt3762.test
|
|
|
|
tkt3773.test tkt3791.test tkt3793.test tkt3810.test tkt3824.test
|
|
|
|
tkt3832.test tkt3838.test tkt3841.test tkt-385a5b56b9.test tkt3871.test
|
|
|
|
tkt3879.test tkt-38cb5df375.test tkt3911.test tkt3918.test tkt3922.test
|
|
|
|
tkt3929.test tkt3935.test tkt3992.test tkt3997.test tkt-3998683a16.test
|
|
|
|
tkt-3a77c9714e.test tkt-3fe897352e.test tkt4018.test tkt-4a03edc4c8.test
|
|
|
|
tkt-4dd95f6943.test tkt-54844eea3f.test tkt-5d863f876e.test
|
|
|
|
tkt-5e10420e8d.test tkt-5ee23731f.test tkt-6bfb98dfc0.test
|
|
|
|
tkt-752e1646fc.test tkt-78e04e52ea.test tkt-7a31705a7e6.test
|
|
|
|
tkt-7bbfb7d442.test tkt-80ba201079.test tkt-80e031a00f.test
|
|
|
|
tkt-8454a207b9.test tkt-91e2e8ba6f.test tkt-94c04eaadb.test
|
|
|
|
tkt-9d68c883.test tkt-a7b7803e.test tkt-b1d3a2e531.test
|
|
|
|
tkt-b351d95f9.test tkt-b72787b1.test tkt-bd484a090c.test
|
|
|
|
tkt-bdc6bbbb38.test tkt-c48d99d690.test tkt-cbd054fa6b.test
|
|
|
|
tkt-d11f09d36e.test tkt-d635236375.test tkt-d82e3f3721.test
|
|
|
|
tkt-f3e5abed55.test tkt-f777251dc7a.test tkt-f7b4edec.test
|
|
|
|
tkt-f973c7ac31.test tkt-fa7bf5ec.test tkt-fc62af4523.test
|
|
|
|
tkt-fc7bd6358f.test trigger1.test trigger2.test trigger3.test
|
|
|
|
trigger4.test trigger5.test trigger6.test trigger7.test trigger8.test
|
|
|
|
trigger9.test triggerA.test triggerB.test triggerC.test triggerD.test
|
|
|
|
types2.test types3.test types.test unique.test unordered.test
|
|
|
|
update.test view.test vtab1.test vtab2.test vtab3.test vtab4.test
|
|
|
|
vtab5.test vtab6.test vtab7.test vtab8.test vtab9.test vtab_alter.test
|
2013-06-12 21:08:06 +04:00
|
|
|
vtabA.test vtabB.test vtabC.test vtabD.test vtabE.test
|
2013-06-12 18:52:39 +04:00
|
|
|
vtabF.test where2.test where3.test where4.test where5.test where6.test
|
|
|
|
where7.test where8m.test where8.test where9.test whereA.test whereB.test
|
|
|
|
whereC.test whereD.test whereE.test whereF.test wherelimit.test
|
|
|
|
where.test
|
|
|
|
}
|
|
|
|
|
2013-10-10 17:04:46 +04:00
|
|
|
test_suite "vfslog" -prefix "" -description {
|
|
|
|
"Vfslog" quick test suite. Like "veryquick" except does not omits
|
|
|
|
a few tests that do not work with a version 1 VFS. And the quota* tests,
|
|
|
|
which do not work with a VFS that uses the pVfs argument passed to
|
|
|
|
sqlite3_vfs methods.
|
|
|
|
} -files [
|
|
|
|
test_set $allquicktests -exclude *malloc* *ioerr* *fault* oserror.test \
|
|
|
|
pager1.test syscall.test sysfault.test tkt3457.test quota* superlock* \
|
|
|
|
wal* mmap*
|
|
|
|
]
|
|
|
|
|
2017-07-22 19:58:47 +03:00
|
|
|
test_suite "atomic-batch-write" -prefix "" -description {
|
|
|
|
Like veryquick.test, but must be run on a file-system that supports
|
|
|
|
atomic-batch-writes. Tests that depend on the journal file being present
|
|
|
|
are omitted.
|
|
|
|
} -files [
|
|
|
|
test_set $allquicktests -exclude *malloc* *ioerr* *fault* *bigfile* *_err* \
|
|
|
|
*fts5corrupt* *fts5big* *fts5aj* \
|
|
|
|
crash8.test delete_db.test \
|
|
|
|
exclusive.test journal3.test \
|
|
|
|
journal1.test \
|
|
|
|
jrnlmode.test jrnlmode2.test \
|
|
|
|
lock4.test pager1.test \
|
|
|
|
pager3.test sharedA.test \
|
|
|
|
symlink.test stmt.test \
|
|
|
|
sync.test sync2.test \
|
|
|
|
tempdb.test tkt3457.test \
|
|
|
|
vacuum5.test wal2.test \
|
|
|
|
walmode.test zerodamage.test
|
|
|
|
] -initialize {
|
|
|
|
if {[atomic_batch_write test.db]==0} {
|
|
|
|
error "File system does NOT support atomic-batch-write"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2010-06-15 21:44:47 +04:00
|
|
|
lappend ::testsuitelist xxx
|
2010-06-15 10:56:37 +04:00
|
|
|
#-------------------------------------------------------------------------
|
|
|
|
# Define the coverage related test suites:
|
|
|
|
#
|
|
|
|
# coverage-wal
|
|
|
|
#
|
|
|
|
test_suite "coverage-wal" -description {
|
|
|
|
Coverage tests for file wal.c.
|
|
|
|
} -files {
|
2018-12-22 23:32:28 +03:00
|
|
|
wal.test wal2.test wal3.test wal4.test wal5.test
|
|
|
|
wal64k.test wal6.test wal7.test wal8.test wal9.test
|
|
|
|
walbak.test walbig.test walblock.test walcksum.test walcrash2.test
|
|
|
|
walcrash3.test walcrash4.test walcrash.test walfault.test walhook.test
|
|
|
|
walmode.test walnoshm.test waloverwrite.test walpersist.test
|
|
|
|
walprotocol2.test walprotocol.test walro2.test walrofault.test
|
|
|
|
walro.test walshared.test walslow.test walvfs.test
|
2018-12-24 23:00:27 +03:00
|
|
|
walfault2.test
|
2018-12-22 23:32:28 +03:00
|
|
|
nockpt.test
|
2018-12-26 21:34:56 +03:00
|
|
|
|
|
|
|
snapshot2.test snapshot3.test snapshot4.test
|
|
|
|
snapshot_fault.test snapshot.test snapshot_up.test
|
2010-06-15 10:56:37 +04:00
|
|
|
}
|
|
|
|
|
2010-06-15 21:44:47 +04:00
|
|
|
test_suite "coverage-pager" -description {
|
|
|
|
Coverage tests for file pager.c.
|
|
|
|
} -files {
|
2010-07-03 14:00:00 +04:00
|
|
|
pager1.test pager2.test pagerfault.test pagerfault2.test
|
|
|
|
walfault.test walbak.test journal2.test tkt-9d68c883.test
|
2010-06-15 21:44:47 +04:00
|
|
|
}
|
2010-06-15 10:56:37 +04:00
|
|
|
|
2013-09-02 22:58:11 +04:00
|
|
|
test_suite "coverage-analyze" -description {
|
|
|
|
Coverage tests for file analyze.c.
|
|
|
|
} -files {
|
|
|
|
analyze3.test analyze4.test analyze5.test analyze6.test
|
2019-10-02 00:31:57 +03:00
|
|
|
analyze7.test analyze8.test analyze9.test
|
|
|
|
analyze.test mallocA.test
|
2013-09-02 22:58:11 +04:00
|
|
|
}
|
|
|
|
|
2014-05-03 18:28:14 +04:00
|
|
|
test_suite "coverage-sorter" -description {
|
|
|
|
Coverage tests for file vdbesort.c.
|
|
|
|
} -files {
|
|
|
|
sort.test sortfault.test
|
|
|
|
}
|
|
|
|
|
2010-06-15 10:56:37 +04:00
|
|
|
|
2010-06-15 21:44:47 +04:00
|
|
|
lappend ::testsuitelist xxx
|
2010-06-15 10:56:37 +04:00
|
|
|
#-------------------------------------------------------------------------
|
|
|
|
# Define the permutation test suites:
|
|
|
|
#
|
2008-06-21 22:07:37 +04:00
|
|
|
|
2017-08-28 18:51:35 +03:00
|
|
|
# Run some tests using pre-allocated page blocks.
|
2008-06-21 22:07:37 +04:00
|
|
|
#
|
2013-05-16 23:15:07 +04:00
|
|
|
# mmap1.test is excluded because a good number of its tests depend on
|
|
|
|
# the page-cache being larger than the database. But this permutation
|
|
|
|
# causes the effective limit on the page-cache to be just 24 pages.
|
|
|
|
#
|
2010-06-15 10:56:37 +04:00
|
|
|
test_suite "memsubsys1" -description {
|
2017-08-28 18:51:35 +03:00
|
|
|
Tests using pre-allocated page blocks
|
2010-06-15 10:56:37 +04:00
|
|
|
} -files [
|
2013-05-16 23:15:07 +04:00
|
|
|
test_set $::allquicktests -exclude ioerr5.test malloc5.test mmap1.test
|
2010-06-15 10:56:37 +04:00
|
|
|
] -initialize {
|
2015-07-24 17:17:17 +03:00
|
|
|
test_set_config_pagecache 4096 24
|
2008-07-30 17:15:46 +04:00
|
|
|
catch {db close}
|
2008-06-21 22:07:37 +04:00
|
|
|
sqlite3_shutdown
|
|
|
|
sqlite3_initialize
|
2009-04-09 05:23:49 +04:00
|
|
|
autoinstall_test_functions
|
2008-06-21 22:07:37 +04:00
|
|
|
} -shutdown {
|
2015-07-24 17:17:17 +03:00
|
|
|
test_restore_config_pagecache
|
2008-06-21 22:07:37 +04:00
|
|
|
catch {db close}
|
|
|
|
sqlite3_shutdown
|
|
|
|
sqlite3_initialize
|
2009-04-09 05:23:49 +04:00
|
|
|
autoinstall_test_functions
|
2008-06-21 22:07:37 +04:00
|
|
|
}
|
|
|
|
|
2017-08-28 18:51:35 +03:00
|
|
|
# Run some tests using pre-allocated page blocks. This time
|
2008-06-21 22:07:37 +04:00
|
|
|
# the allocations are too small to use in most cases.
|
|
|
|
#
|
2008-08-29 16:00:20 +04:00
|
|
|
# Both ioerr5.test and malloc5.test are excluded because they test the
|
|
|
|
# sqlite3_soft_heap_limit() and sqlite3_release_memory() functionality.
|
|
|
|
# This functionality is disabled if a pre-allocated page block is provided.
|
|
|
|
#
|
2010-06-15 10:56:37 +04:00
|
|
|
test_suite "memsubsys2" -description {
|
2017-08-28 18:51:35 +03:00
|
|
|
Tests using small pre-allocated page blocks
|
2010-06-15 10:56:37 +04:00
|
|
|
} -files [
|
|
|
|
test_set $::allquicktests -exclude ioerr5.test malloc5.test
|
|
|
|
] -initialize {
|
2015-07-24 17:17:17 +03:00
|
|
|
test_set_config_pagecache 512 5
|
2008-07-30 17:15:46 +04:00
|
|
|
catch {db close}
|
2008-06-21 22:07:37 +04:00
|
|
|
sqlite3_shutdown
|
|
|
|
sqlite3_initialize
|
2009-04-09 05:23:49 +04:00
|
|
|
autoinstall_test_functions
|
2008-06-21 22:07:37 +04:00
|
|
|
} -shutdown {
|
2015-07-24 17:17:17 +03:00
|
|
|
test_restore_config_pagecache
|
2008-06-21 22:07:37 +04:00
|
|
|
catch {db close}
|
|
|
|
sqlite3_shutdown
|
|
|
|
sqlite3_initialize
|
2009-04-09 05:23:49 +04:00
|
|
|
autoinstall_test_functions
|
2008-06-21 22:07:37 +04:00
|
|
|
}
|
|
|
|
|
2008-08-01 19:06:30 +04:00
|
|
|
# Run all tests with the lookaside allocator disabled.
|
|
|
|
#
|
2010-06-15 10:56:37 +04:00
|
|
|
test_suite "nolookaside" -description {
|
2008-08-01 19:06:30 +04:00
|
|
|
OOM tests with lookaside disabled
|
|
|
|
} -initialize {
|
|
|
|
catch {db close}
|
|
|
|
sqlite3_shutdown
|
|
|
|
sqlite3_config_lookaside 0 0
|
|
|
|
sqlite3_initialize
|
2009-04-09 05:23:49 +04:00
|
|
|
autoinstall_test_functions
|
2008-08-01 19:06:30 +04:00
|
|
|
} -shutdown {
|
|
|
|
catch {db close}
|
|
|
|
sqlite3_shutdown
|
|
|
|
sqlite3_config_lookaside 100 500
|
|
|
|
sqlite3_initialize
|
2009-04-09 05:23:49 +04:00
|
|
|
autoinstall_test_functions
|
2010-06-15 10:56:37 +04:00
|
|
|
} -files $::allquicktests
|
2008-08-01 19:06:30 +04:00
|
|
|
|
2008-06-21 22:07:37 +04:00
|
|
|
# Run some tests in SQLITE_CONFIG_SINGLETHREAD mode.
|
|
|
|
#
|
2010-06-15 10:56:37 +04:00
|
|
|
test_suite "singlethread" -description {
|
2008-06-21 22:07:37 +04:00
|
|
|
Tests run in SQLITE_CONFIG_SINGLETHREAD mode
|
|
|
|
} -initialize {
|
2009-01-06 17:50:11 +03:00
|
|
|
catch {db close}
|
|
|
|
sqlite3_shutdown
|
|
|
|
catch {sqlite3_config singlethread}
|
2009-04-09 05:23:49 +04:00
|
|
|
sqlite3_initialize
|
|
|
|
autoinstall_test_functions
|
2010-06-15 10:56:37 +04:00
|
|
|
} -files {
|
2008-06-21 22:07:37 +04:00
|
|
|
delete.test delete2.test insert.test rollback.test select1.test
|
|
|
|
select2.test trans.test update.test vacuum.test types.test
|
|
|
|
types2.test types3.test
|
|
|
|
} -shutdown {
|
2009-01-06 17:50:11 +03:00
|
|
|
catch {db close}
|
|
|
|
sqlite3_shutdown
|
|
|
|
catch {sqlite3_config serialized}
|
2009-04-09 05:23:49 +04:00
|
|
|
sqlite3_initialize
|
|
|
|
autoinstall_test_functions
|
2008-06-21 22:07:37 +04:00
|
|
|
}
|
|
|
|
|
2010-06-15 10:56:37 +04:00
|
|
|
test_suite "nomutex" -description {
|
2008-09-03 04:43:15 +04:00
|
|
|
Tests run with the SQLITE_OPEN_MULTITHREADED flag passed to sqlite3_open().
|
2008-07-10 21:52:49 +04:00
|
|
|
} -initialize {
|
2018-09-18 19:06:42 +03:00
|
|
|
set ::G(perm:sqlite3_args) [list -fullmutex 0 -nomutex 1]
|
2010-06-15 10:56:37 +04:00
|
|
|
} -files {
|
2008-07-10 21:52:49 +04:00
|
|
|
delete.test delete2.test insert.test rollback.test select1.test
|
|
|
|
select2.test trans.test update.test vacuum.test types.test
|
|
|
|
types2.test types3.test
|
2018-09-18 19:06:42 +03:00
|
|
|
}
|
2008-07-10 21:52:49 +04:00
|
|
|
|
2008-06-21 22:07:37 +04:00
|
|
|
# Run some tests in SQLITE_CONFIG_MULTITHREAD mode.
|
|
|
|
#
|
2010-06-15 10:56:37 +04:00
|
|
|
test_suite "multithread" -description {
|
2008-06-21 22:07:37 +04:00
|
|
|
Tests run in SQLITE_CONFIG_MULTITHREAD mode
|
|
|
|
} -initialize {
|
2009-01-06 17:50:11 +03:00
|
|
|
catch {db close}
|
|
|
|
sqlite3_shutdown
|
|
|
|
catch {sqlite3_config multithread}
|
2009-04-09 05:23:49 +04:00
|
|
|
sqlite3_initialize
|
|
|
|
autoinstall_test_functions
|
2010-06-15 10:56:37 +04:00
|
|
|
} -files {
|
2008-06-21 22:07:37 +04:00
|
|
|
delete.test delete2.test insert.test rollback.test select1.test
|
|
|
|
select2.test trans.test update.test vacuum.test types.test
|
2014-05-06 19:38:07 +04:00
|
|
|
types2.test types3.test sort4.test
|
2008-06-21 22:07:37 +04:00
|
|
|
} -shutdown {
|
2009-01-06 17:50:11 +03:00
|
|
|
catch {db close}
|
|
|
|
sqlite3_shutdown
|
|
|
|
catch {sqlite3_config serialized}
|
2009-04-09 05:23:49 +04:00
|
|
|
sqlite3_initialize
|
|
|
|
autoinstall_test_functions
|
2008-06-21 22:07:37 +04:00
|
|
|
}
|
|
|
|
|
2008-09-03 04:43:15 +04:00
|
|
|
# Run some tests in SQLITE_OPEN_FULLMUTEX mode.
|
|
|
|
#
|
2010-06-15 10:56:37 +04:00
|
|
|
test_suite "fullmutex" -description {
|
2008-09-03 04:43:15 +04:00
|
|
|
Tests run in SQLITE_OPEN_FULLMUTEX mode
|
|
|
|
} -initialize {
|
2018-09-18 19:06:42 +03:00
|
|
|
set ::G(perm:sqlite3_args) [list -nomutex 0 -fullmutex 1]
|
2010-06-15 10:56:37 +04:00
|
|
|
} -files {
|
2008-09-03 04:43:15 +04:00
|
|
|
delete.test delete2.test insert.test rollback.test select1.test
|
|
|
|
select2.test trans.test update.test vacuum.test types.test
|
|
|
|
types2.test types3.test
|
|
|
|
}
|
|
|
|
|
2008-06-21 22:07:37 +04:00
|
|
|
# Run some tests using the "onefile" demo.
|
|
|
|
#
|
2010-06-15 10:56:37 +04:00
|
|
|
test_suite "onefile" -description {
|
2008-06-21 22:07:37 +04:00
|
|
|
Run some tests using the "test_onefile.c" demo
|
|
|
|
} -initialize {
|
2018-09-18 19:06:42 +03:00
|
|
|
set ::G(perm:sqlite3_args) [list -vfs fs]
|
2010-06-15 10:56:37 +04:00
|
|
|
} -files {
|
2008-06-21 22:07:37 +04:00
|
|
|
conflict.test insert.test insert2.test insert3.test
|
|
|
|
rollback.test select1.test select2.test select3.test
|
|
|
|
}
|
|
|
|
|
|
|
|
# Run some tests using UTF-16 databases.
|
|
|
|
#
|
2010-06-15 10:56:37 +04:00
|
|
|
test_suite "utf16" -description {
|
2008-06-21 22:07:37 +04:00
|
|
|
Run tests using UTF-16 databases
|
2008-06-21 23:10:27 +04:00
|
|
|
} -presql {
|
2008-06-21 22:07:37 +04:00
|
|
|
pragma encoding = 'UTF-16'
|
2010-06-15 10:56:37 +04:00
|
|
|
} -files {
|
2008-06-21 22:07:37 +04:00
|
|
|
alter.test alter3.test
|
2013-08-16 18:48:23 +04:00
|
|
|
analyze.test analyze3.test analyze4.test analyze5.test analyze6.test
|
2019-10-02 00:31:57 +03:00
|
|
|
analyze7.test analyze8.test analyze9.test
|
2008-06-21 22:07:37 +04:00
|
|
|
auth.test bind.test blob.test capi2.test capi3.test collate1.test
|
|
|
|
collate2.test collate3.test collate4.test collate5.test collate6.test
|
|
|
|
conflict.test date.test delete.test expr.test fkey1.test func.test
|
|
|
|
hook.test index.test insert2.test insert.test interrupt.test in.test
|
|
|
|
intpkey.test ioerr.test join2.test join.test lastinsert.test
|
|
|
|
laststmtchanges.test limit.test lock2.test lock.test main.test
|
|
|
|
memdb.test minmax.test misc1.test misc2.test misc3.test notnull.test
|
|
|
|
null.test progress.test quote.test rowid.test select1.test select2.test
|
|
|
|
select3.test select4.test select5.test select6.test sort.test
|
|
|
|
subselect.test tableapi.test table.test temptable.test
|
|
|
|
trace.test trigger1.test trigger2.test trigger3.test
|
|
|
|
trigger4.test types2.test types.test unique.test update.test
|
|
|
|
vacuum.test view.test where.test
|
2016-03-02 20:57:53 +03:00
|
|
|
bestindex1.test
|
2008-06-21 22:07:37 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
# Run some tests in exclusive locking mode.
|
|
|
|
#
|
2010-06-15 10:56:37 +04:00
|
|
|
test_suite "exclusive" -description {
|
2008-06-21 22:07:37 +04:00
|
|
|
Run tests in exclusive locking mode.
|
|
|
|
} -presql {
|
|
|
|
pragma locking_mode = 'exclusive'
|
2010-06-15 10:56:37 +04:00
|
|
|
} -files {
|
2008-06-21 22:07:37 +04:00
|
|
|
rollback.test select1.test select2.test
|
|
|
|
malloc.test ioerr.test
|
|
|
|
}
|
|
|
|
|
2008-09-27 01:08:08 +04:00
|
|
|
# Run some tests in exclusive locking mode with truncated journals.
|
|
|
|
#
|
2010-06-15 10:56:37 +04:00
|
|
|
test_suite "exclusive-truncate" -description {
|
2008-09-27 01:08:08 +04:00
|
|
|
Run tests in exclusive locking mode and truncate journal mode.
|
|
|
|
} -presql {
|
|
|
|
pragma locking_mode = 'exclusive';
|
|
|
|
pragma journal_mode = TRUNCATE;
|
2010-06-15 10:56:37 +04:00
|
|
|
} -files {
|
2008-09-27 01:08:08 +04:00
|
|
|
delete.test delete2.test insert.test rollback.test select1.test
|
|
|
|
select2.test update.test malloc.test ioerr.test
|
|
|
|
}
|
|
|
|
|
2008-06-21 22:07:37 +04:00
|
|
|
# Run some tests in persistent journal mode.
|
|
|
|
#
|
2010-06-15 10:56:37 +04:00
|
|
|
test_suite "persistent_journal" -description {
|
2008-06-21 22:07:37 +04:00
|
|
|
Run tests in persistent-journal mode.
|
|
|
|
} -presql {
|
|
|
|
pragma journal_mode = persist
|
2010-06-15 10:56:37 +04:00
|
|
|
} -files {
|
2008-06-21 22:07:37 +04:00
|
|
|
delete.test delete2.test insert.test rollback.test select1.test
|
|
|
|
select2.test trans.test update.test vacuum.test
|
|
|
|
}
|
|
|
|
|
2008-09-27 01:08:08 +04:00
|
|
|
# Run some tests in truncating journal mode.
|
|
|
|
#
|
2010-06-15 10:56:37 +04:00
|
|
|
test_suite "truncate_journal" -description {
|
2008-09-27 01:08:08 +04:00
|
|
|
Run tests in persistent-journal mode.
|
|
|
|
} -presql {
|
|
|
|
pragma journal_mode = truncate
|
2010-06-15 10:56:37 +04:00
|
|
|
} -files {
|
2008-09-27 01:08:08 +04:00
|
|
|
delete.test delete2.test insert.test rollback.test select1.test
|
|
|
|
select2.test trans.test update.test vacuum.test
|
|
|
|
malloc.test ioerr.test
|
|
|
|
}
|
|
|
|
|
2008-06-21 22:07:37 +04:00
|
|
|
# Run some error tests in persistent journal mode.
|
|
|
|
#
|
2010-06-15 10:56:37 +04:00
|
|
|
test_suite "persistent_journal_error" -description {
|
2008-06-21 22:07:37 +04:00
|
|
|
Run malloc.test and ioerr.test in persistent-journal mode.
|
|
|
|
} -presql {
|
|
|
|
pragma journal_mode = persist
|
2010-06-15 10:56:37 +04:00
|
|
|
} -files {
|
2008-06-21 22:07:37 +04:00
|
|
|
malloc.test ioerr.test
|
|
|
|
}
|
|
|
|
|
|
|
|
# Run some tests in no journal mode.
|
|
|
|
#
|
2010-06-15 10:56:37 +04:00
|
|
|
test_suite "no_journal" -description {
|
2008-06-21 22:07:37 +04:00
|
|
|
Run tests in no-journal mode.
|
|
|
|
} -presql {
|
|
|
|
pragma journal_mode = persist
|
2010-06-15 10:56:37 +04:00
|
|
|
} -files {
|
2008-06-21 22:07:37 +04:00
|
|
|
delete.test delete2.test insert.test rollback.test select1.test
|
|
|
|
select2.test trans.test update.test vacuum.test
|
|
|
|
}
|
|
|
|
|
|
|
|
# Run some error tests in no journal mode.
|
|
|
|
#
|
2010-06-15 10:56:37 +04:00
|
|
|
test_suite "no_journal_error" -description {
|
2008-06-21 22:07:37 +04:00
|
|
|
Run malloc.test and ioerr.test in no-journal mode.
|
|
|
|
} -presql {
|
|
|
|
pragma journal_mode = persist
|
2010-06-15 10:56:37 +04:00
|
|
|
} -files {
|
2008-06-21 22:07:37 +04:00
|
|
|
malloc.test ioerr.test
|
|
|
|
}
|
|
|
|
|
|
|
|
# Run some crash-tests in autovacuum mode.
|
|
|
|
#
|
2010-06-15 10:56:37 +04:00
|
|
|
test_suite "autovacuum_crash" -description {
|
2008-06-21 22:07:37 +04:00
|
|
|
Run crash.test in autovacuum mode.
|
|
|
|
} -presql {
|
|
|
|
pragma auto_vacuum = 1
|
2010-06-15 10:56:37 +04:00
|
|
|
} -files crash.test
|
2008-06-21 22:07:37 +04:00
|
|
|
|
|
|
|
# Run some ioerr-tests in autovacuum mode.
|
|
|
|
#
|
2010-06-15 10:56:37 +04:00
|
|
|
test_suite "autovacuum_ioerr" -description {
|
2008-06-21 22:07:37 +04:00
|
|
|
Run ioerr.test in autovacuum mode.
|
|
|
|
} -presql {
|
|
|
|
pragma auto_vacuum = 1
|
2010-06-15 10:56:37 +04:00
|
|
|
} -files ioerr.test
|
2008-06-21 22:07:37 +04:00
|
|
|
|
2008-10-17 22:51:52 +04:00
|
|
|
# Run tests with an in-memory journal.
|
|
|
|
#
|
2010-06-15 10:56:37 +04:00
|
|
|
test_suite "inmemory_journal" -description {
|
2008-10-17 22:51:52 +04:00
|
|
|
Run tests with an in-memory journal file.
|
|
|
|
} -presql {
|
|
|
|
pragma journal_mode = 'memory'
|
2010-06-15 10:56:37 +04:00
|
|
|
} -files [test_set $::allquicktests -exclude {
|
2008-10-17 22:51:52 +04:00
|
|
|
# Exclude all tests that simulate IO errors.
|
2015-11-04 16:03:36 +03:00
|
|
|
autovacuum_ioerr2.test cffault.test incrvacuum_ioerr.test ioerr.test
|
2008-10-17 22:51:52 +04:00
|
|
|
ioerr.test ioerr2.test ioerr3.test ioerr4.test ioerr5.test
|
2009-04-02 03:09:43 +04:00
|
|
|
vacuum3.test incrblob_err.test diskfull.test backup_ioerr.test
|
2010-07-09 23:32:28 +04:00
|
|
|
e_fts3.test fts3cov.test fts3malloc.test fts3rnd.test
|
2016-04-28 17:54:54 +03:00
|
|
|
fts3snippet.test mmapfault.test sessionfault.test sessionfault2.test
|
2008-10-17 22:51:52 +04:00
|
|
|
|
|
|
|
# Exclude test scripts that use tcl IO to access journal files or count
|
|
|
|
# the number of fsync() calls.
|
|
|
|
pager.test exclusive.test jrnlmode.test sync.test misc1.test
|
2009-04-10 22:32:29 +04:00
|
|
|
journal1.test conflict.test crash8.test tkt3457.test io.test
|
2019-02-04 19:42:57 +03:00
|
|
|
journal3.test 8_3_names.test shmlock.test
|
2010-03-08 13:32:38 +03:00
|
|
|
|
2010-07-08 13:44:42 +04:00
|
|
|
pager1.test async4.test corrupt.test filefmt.test pager2.test
|
|
|
|
corrupt5.test corruptA.test pageropt.test
|
|
|
|
|
2010-03-08 13:32:38 +03:00
|
|
|
# Exclude stmt.test, which expects sub-journals to use temporary files.
|
2015-11-04 16:03:36 +03:00
|
|
|
stmt.test symlink.test
|
2010-05-25 00:24:38 +04:00
|
|
|
|
2012-01-13 14:51:52 +04:00
|
|
|
zerodamage.test
|
|
|
|
|
2010-05-25 00:24:38 +04:00
|
|
|
# WAL mode is different.
|
2015-05-29 18:15:40 +03:00
|
|
|
wal* tkt-2d1a5c67d.test backcompat.test e_wal* rowallock.test
|
2016-05-16 17:35:15 +03:00
|
|
|
|
|
|
|
# This test does not work as the "PRAGMA journal_mode = memory"
|
|
|
|
# statement switches the database out of wal mode at inopportune
|
|
|
|
# times.
|
|
|
|
snapshot_fault.test
|
2016-09-21 20:47:59 +03:00
|
|
|
|
|
|
|
# This test assumes a journal file is created on disk.
|
|
|
|
delete_db.test
|
2017-02-07 22:36:14 +03:00
|
|
|
|
|
|
|
# This test depends on a successful recovery from the pager error
|
|
|
|
# state. Which is not possible with an in-memory journal
|
|
|
|
fts5fault1.test
|
2010-06-15 10:56:37 +04:00
|
|
|
}]
|
2008-10-17 22:51:52 +04:00
|
|
|
|
2008-06-25 18:57:53 +04:00
|
|
|
ifcapable mem3 {
|
2010-06-15 10:56:37 +04:00
|
|
|
test_suite "memsys3" -description {
|
2008-06-25 18:57:53 +04:00
|
|
|
Run tests using the allocator in mem3.c.
|
2010-07-05 09:31:48 +04:00
|
|
|
} -files [test_set $::allquicktests -exclude {
|
2008-07-10 22:13:42 +04:00
|
|
|
autovacuum.test delete3.test manydb.test
|
|
|
|
bigrow.test incrblob2.test memdb.test
|
|
|
|
bitvec.test index2.test memsubsys1.test
|
|
|
|
capi3c.test ioerr.test memsubsys2.test
|
|
|
|
capi3.test join3.test pagesize.test
|
2009-07-01 22:09:01 +04:00
|
|
|
collate5.test limit.test backup_ioerr.test
|
|
|
|
backup_malloc.test
|
2010-06-15 10:56:37 +04:00
|
|
|
}] -initialize {
|
2008-06-25 18:57:53 +04:00
|
|
|
catch {db close}
|
|
|
|
sqlite3_reset_auto_extension
|
|
|
|
sqlite3_shutdown
|
2008-07-16 16:25:32 +04:00
|
|
|
sqlite3_config_heap 25000000 0
|
2008-08-01 19:06:30 +04:00
|
|
|
sqlite3_config_lookaside 0 0
|
2009-07-01 22:09:01 +04:00
|
|
|
ifcapable mem5 {
|
|
|
|
# If both memsys3 and memsys5 are enabled in the build, the call to
|
|
|
|
# [sqlite3_config_heap] will initialize the system to use memsys5.
|
|
|
|
# The following overrides this preference and installs the memsys3
|
|
|
|
# allocator.
|
|
|
|
sqlite3_install_memsys3
|
|
|
|
}
|
2008-06-25 18:57:53 +04:00
|
|
|
install_malloc_faultsim 1
|
|
|
|
sqlite3_initialize
|
|
|
|
autoinstall_test_functions
|
|
|
|
} -shutdown {
|
|
|
|
catch {db close}
|
|
|
|
sqlite3_shutdown
|
2008-06-27 18:05:24 +04:00
|
|
|
sqlite3_config_heap 0 0
|
2008-08-01 19:06:30 +04:00
|
|
|
sqlite3_config_lookaside 100 500
|
2008-06-25 18:57:53 +04:00
|
|
|
install_malloc_faultsim 1
|
|
|
|
sqlite3_initialize
|
2009-04-09 05:23:49 +04:00
|
|
|
autoinstall_test_functions
|
2008-06-25 18:57:53 +04:00
|
|
|
}
|
2008-06-24 23:02:55 +04:00
|
|
|
}
|
|
|
|
|
2008-06-25 18:57:53 +04:00
|
|
|
ifcapable mem5 {
|
2010-06-15 10:56:37 +04:00
|
|
|
test_suite "memsys5" -description {
|
2008-06-25 18:57:53 +04:00
|
|
|
Run tests using the allocator in mem5.c.
|
2010-07-05 09:31:48 +04:00
|
|
|
} -files [test_set $::allquicktests -exclude {
|
2008-07-10 22:13:42 +04:00
|
|
|
autovacuum.test delete3.test manydb.test
|
|
|
|
bigrow.test incrblob2.test memdb.test
|
|
|
|
bitvec.test index2.test memsubsys1.test
|
|
|
|
capi3c.test ioerr.test memsubsys2.test
|
|
|
|
capi3.test join3.test pagesize.test
|
2008-11-13 19:21:50 +03:00
|
|
|
collate5.test limit.test zeroblob.test
|
2010-06-15 10:56:37 +04:00
|
|
|
}] -initialize {
|
2008-06-25 18:57:53 +04:00
|
|
|
catch {db close}
|
|
|
|
sqlite3_shutdown
|
2008-07-16 16:25:32 +04:00
|
|
|
sqlite3_config_heap 25000000 64
|
2008-08-01 19:06:30 +04:00
|
|
|
sqlite3_config_lookaside 0 0
|
2008-06-27 17:27:03 +04:00
|
|
|
install_malloc_faultsim 1
|
|
|
|
sqlite3_initialize
|
|
|
|
autoinstall_test_functions
|
|
|
|
} -shutdown {
|
|
|
|
catch {db close}
|
|
|
|
sqlite3_shutdown
|
2008-06-27 18:05:24 +04:00
|
|
|
sqlite3_config_heap 0 0
|
2008-08-01 19:06:30 +04:00
|
|
|
sqlite3_config_lookaside 100 500
|
2008-06-27 17:27:03 +04:00
|
|
|
install_malloc_faultsim 1
|
|
|
|
sqlite3_initialize
|
2009-04-09 05:23:49 +04:00
|
|
|
autoinstall_test_functions
|
2008-06-27 17:27:03 +04:00
|
|
|
}
|
|
|
|
|
2010-06-15 10:56:37 +04:00
|
|
|
test_suite "memsys5-2" -description {
|
2008-06-27 17:27:03 +04:00
|
|
|
Run tests using the allocator in mem5.c in a different configuration.
|
2010-06-15 10:56:37 +04:00
|
|
|
} -files {
|
2008-07-10 22:13:42 +04:00
|
|
|
select1.test
|
2008-06-27 17:27:03 +04:00
|
|
|
} -initialize {
|
|
|
|
catch {db close}
|
|
|
|
sqlite3_shutdown
|
2010-09-02 14:08:41 +04:00
|
|
|
sqlite3_config_memstatus 0
|
2008-07-16 16:25:32 +04:00
|
|
|
sqlite3_config_heap 40000000 16
|
2008-08-01 19:06:30 +04:00
|
|
|
sqlite3_config_lookaside 0 0
|
2008-06-25 18:57:53 +04:00
|
|
|
install_malloc_faultsim 1
|
|
|
|
sqlite3_initialize
|
|
|
|
autoinstall_test_functions
|
|
|
|
} -shutdown {
|
|
|
|
catch {db close}
|
|
|
|
sqlite3_shutdown
|
2008-06-27 18:05:24 +04:00
|
|
|
sqlite3_config_heap 0 0
|
2008-08-01 19:06:30 +04:00
|
|
|
sqlite3_config_lookaside 100 500
|
2008-06-25 18:57:53 +04:00
|
|
|
install_malloc_faultsim 1
|
|
|
|
sqlite3_initialize
|
2009-04-09 05:23:49 +04:00
|
|
|
autoinstall_test_functions
|
2008-06-25 18:57:53 +04:00
|
|
|
}
|
2008-06-25 18:26:07 +04:00
|
|
|
}
|
|
|
|
|
2008-07-10 22:13:42 +04:00
|
|
|
ifcapable threadsafe {
|
2010-06-15 10:56:37 +04:00
|
|
|
test_suite "no_mutex_try" -description {
|
2008-07-10 22:13:42 +04:00
|
|
|
The sqlite3_mutex_try() interface always fails
|
2010-06-15 10:56:37 +04:00
|
|
|
} -files [
|
|
|
|
test_set $::allquicktests -exclude mutex1.test mutex2.test
|
|
|
|
] -initialize {
|
2008-07-10 22:13:42 +04:00
|
|
|
catch {db close}
|
|
|
|
sqlite3_shutdown
|
|
|
|
install_mutex_counters 1
|
|
|
|
set ::disable_mutex_try 1
|
2009-04-09 05:23:49 +04:00
|
|
|
sqlite3_initialize
|
|
|
|
autoinstall_test_functions
|
2008-07-10 22:13:42 +04:00
|
|
|
} -shutdown {
|
|
|
|
catch {db close}
|
|
|
|
sqlite3_shutdown
|
|
|
|
install_mutex_counters 0
|
2009-04-09 05:23:49 +04:00
|
|
|
sqlite3_initialize
|
|
|
|
autoinstall_test_functions
|
2008-07-10 22:13:42 +04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2008-06-23 19:55:52 +04:00
|
|
|
# run_tests "crash_safe_append" -description {
|
|
|
|
# Run crash.test with persistent journals on a SAFE_APPEND file-system.
|
|
|
|
# } -initialize {
|
|
|
|
# rename crashsql sa_crashsql
|
|
|
|
# proc crashsql {args} {
|
|
|
|
# set options [lrange $args 0 [expr {[llength $args]-2}]]
|
|
|
|
# lappend options -char safe_append
|
|
|
|
# set sql [lindex $args end]
|
|
|
|
# lappend options "
|
|
|
|
# PRAGMA journal_mode=persistent;
|
|
|
|
# $sql
|
|
|
|
# "
|
|
|
|
# set fd [open test.db-journal w]
|
|
|
|
# puts $fd [string repeat 1234567890 100000]
|
|
|
|
# close $fd
|
|
|
|
# eval sa_crashsql $options
|
|
|
|
# }
|
|
|
|
# } -shutdown {
|
|
|
|
# rename crashsql {}
|
|
|
|
# rename sa_crashsql crashsql
|
2010-06-15 10:56:37 +04:00
|
|
|
# } -files crash.test
|
2008-06-23 19:55:52 +04:00
|
|
|
|
2010-06-15 10:56:37 +04:00
|
|
|
test_suite "safe_append" -description {
|
2008-09-12 14:22:40 +04:00
|
|
|
Run some tests on a SAFE_APPEND file-system.
|
|
|
|
} -initialize {
|
2018-09-18 19:06:42 +03:00
|
|
|
set ::G(perm:sqlite3_args) [list -vfs devsym]
|
2008-09-12 14:22:40 +04:00
|
|
|
sqlite3_simulate_device -char safe_append
|
2010-06-15 10:56:37 +04:00
|
|
|
} -files [
|
|
|
|
test_set $::allquicktests shared_err.test -exclude async3.test
|
|
|
|
]
|
2008-09-12 14:22:40 +04:00
|
|
|
|
2008-11-19 04:20:26 +03:00
|
|
|
# The set of tests to run on the alternative-pcache
|
|
|
|
set perm-alt-pcache-testset {
|
|
|
|
async.test
|
|
|
|
attach.test
|
|
|
|
delete.test delete2.test
|
|
|
|
index.test
|
|
|
|
insert.test insert2.test
|
|
|
|
join.test join2.test
|
|
|
|
rollback.test
|
|
|
|
select1.test select2.test
|
|
|
|
trans.test
|
|
|
|
update.test
|
|
|
|
}
|
|
|
|
|
2010-07-13 18:22:39 +04:00
|
|
|
foreach discard_rate {0 10 50 90 100} {
|
|
|
|
test_suite "pcache${discard_rate}" -description "
|
|
|
|
Alternative pcache implementation with ${discard_rate}% random discard
|
|
|
|
" -initialize "
|
|
|
|
catch {db close}
|
|
|
|
sqlite3_shutdown
|
|
|
|
sqlite3_config_alt_pcache 1 $discard_rate 1
|
|
|
|
sqlite3_initialize
|
|
|
|
autoinstall_test_functions
|
|
|
|
" -shutdown {
|
|
|
|
catch {db close}
|
|
|
|
sqlite3_shutdown
|
|
|
|
sqlite3_config_alt_pcache 0 0 0
|
|
|
|
sqlite3_config_lookaside 100 500
|
|
|
|
install_malloc_faultsim 1
|
|
|
|
sqlite3_initialize
|
|
|
|
autoinstall_test_functions
|
|
|
|
} -files ${perm-alt-pcache-testset}
|
|
|
|
}
|
2008-06-23 19:55:52 +04:00
|
|
|
|
2010-06-15 10:56:37 +04:00
|
|
|
test_suite "journaltest" -description {
|
2008-12-22 13:58:46 +03:00
|
|
|
Check that pages are synced before being written (test_journal.c).
|
|
|
|
} -initialize {
|
|
|
|
catch {db close}
|
|
|
|
register_jt_vfs -default ""
|
|
|
|
} -shutdown {
|
|
|
|
unregister_jt_vfs
|
2010-06-15 10:56:37 +04:00
|
|
|
} -files [test_set $::allquicktests -exclude {
|
|
|
|
wal* incrvacuum.test ioerr.test corrupt4.test io.test crash8.test
|
2016-04-27 21:54:49 +03:00
|
|
|
async4.test bigfile.test backcompat.test e_wal* fstat.test mmap2.test
|
|
|
|
pager1.test syscall.test tkt3457.test *malloc* mmap* multiplex* nolock*
|
|
|
|
pager2.test *fault* rowal* snapshot* superlock* symlink.test
|
2019-07-04 22:19:08 +03:00
|
|
|
delete_db.test shmlock.test chunksize.test
|
2021-04-17 22:59:14 +03:00
|
|
|
busy2.test avfs.test external_reader.test
|
2010-05-06 23:55:57 +04:00
|
|
|
}]
|
2008-12-22 13:58:46 +03:00
|
|
|
|
2010-04-07 11:57:38 +04:00
|
|
|
if {[info commands register_demovfs] != ""} {
|
2010-06-15 10:56:37 +04:00
|
|
|
test_suite "demovfs" -description {
|
2010-06-07 21:47:26 +04:00
|
|
|
Check that the demovfs (code in test_demovfs.c) more or less works.
|
2010-04-07 11:57:38 +04:00
|
|
|
} -initialize {
|
|
|
|
register_demovfs
|
|
|
|
} -shutdown {
|
|
|
|
unregister_demovfs
|
2010-06-15 10:56:37 +04:00
|
|
|
} -files {
|
2010-04-07 11:57:38 +04:00
|
|
|
insert.test insert2.test insert3.test rollback.test
|
|
|
|
select1.test select2.test select3.test
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2010-06-15 10:56:37 +04:00
|
|
|
test_suite "wal" -description {
|
2010-04-26 16:39:03 +04:00
|
|
|
Run tests with journal_mode=WAL
|
2010-04-27 09:42:32 +04:00
|
|
|
} -initialize {
|
2010-06-07 21:47:26 +04:00
|
|
|
set ::G(savepoint6_iterations) 100
|
2010-04-27 09:42:32 +04:00
|
|
|
} -shutdown {
|
2010-06-07 21:47:26 +04:00
|
|
|
unset -nocomplain ::G(savepoint6_iterations)
|
2010-06-15 10:56:37 +04:00
|
|
|
} -files {
|
2010-04-27 10:49:34 +04:00
|
|
|
savepoint.test savepoint2.test savepoint6.test
|
|
|
|
trans.test avtrans.test
|
2010-07-07 15:42:59 +04:00
|
|
|
|
|
|
|
fts3aa.test fts3ab.test fts3ac.test fts3ad.test
|
|
|
|
fts3ae.test fts3af.test fts3ag.test fts3ah.test
|
|
|
|
fts3ai.test fts3aj.test fts3ak.test fts3al.test
|
|
|
|
fts3am.test fts3an.test fts3ao.test fts3b.test
|
|
|
|
fts3c.test fts3d.test fts3e.test fts3query.test
|
2010-04-26 16:39:03 +04:00
|
|
|
}
|
2010-08-26 18:15:37 +04:00
|
|
|
|
|
|
|
test_suite "rtree" -description {
|
|
|
|
All R-tree related tests. Provides coverage of source file rtree.c.
|
|
|
|
} -files [glob -nocomplain $::testdir/../ext/rtree/*.test]
|
|
|
|
|
2011-03-19 18:37:02 +03:00
|
|
|
test_suite "session" -description {
|
|
|
|
All session module related tests.
|
|
|
|
} -files [glob -nocomplain $::testdir/../ext/session/*.test]
|
|
|
|
|
2013-07-03 00:23:40 +04:00
|
|
|
test_suite "session_eec" -description {
|
|
|
|
All session module related tests with sqlite3_extended_result_codes() set.
|
|
|
|
} -files [
|
|
|
|
glob -nocomplain $::testdir/../ext/session/*.test
|
|
|
|
] -dbconfig {
|
|
|
|
sqlite3_extended_result_codes $::dbhandle 1
|
|
|
|
}
|
|
|
|
|
2014-09-28 00:45:48 +04:00
|
|
|
test_suite "session_strm" -description {
|
2014-09-24 00:39:55 +04:00
|
|
|
All session module related tests using the streaming APIs.
|
|
|
|
} -files [
|
|
|
|
glob -nocomplain $::testdir/../ext/session/*.test
|
|
|
|
] -dbconfig {
|
|
|
|
set ::sqlite3session_streams 1
|
|
|
|
}
|
|
|
|
|
2015-07-23 23:44:49 +03:00
|
|
|
test_suite "rbu" -description {
|
|
|
|
RBU tests.
|
2014-09-19 22:08:39 +04:00
|
|
|
} -files [
|
2015-07-23 23:44:49 +03:00
|
|
|
test_set [glob -nocomplain $::testdir/../ext/rbu/*.test] -exclude rbu.test
|
2014-09-19 22:08:39 +04:00
|
|
|
]
|
|
|
|
|
2010-12-07 17:32:28 +03:00
|
|
|
test_suite "no_optimization" -description {
|
|
|
|
Run test scripts with optimizations disabled using the
|
|
|
|
sqlite3_test_control(SQLITE_TESTCTRL_OPTIMIZATIONS) interface.
|
2019-03-18 21:55:35 +03:00
|
|
|
} -files [
|
|
|
|
test_set \
|
|
|
|
[glob -nocomplain $::testdir/window*.test] \
|
|
|
|
where.test where2.test where3.test where4.test where5.test \
|
|
|
|
where6.test where7.test where8.test where9.test \
|
|
|
|
whereA.test whereB.test wherelimit.test \
|
|
|
|
select1.test select2.test select3.test select4.test select5.test \
|
2021-03-02 16:36:37 +03:00
|
|
|
select7.test select8.test selectA.test selectC.test \
|
|
|
|
-exclude windowpushd.test
|
2019-03-18 21:55:35 +03:00
|
|
|
] -dbconfig {
|
2010-12-07 17:32:28 +03:00
|
|
|
optimization_control $::dbhandle all 0
|
|
|
|
}
|
|
|
|
|
2011-06-27 20:55:50 +04:00
|
|
|
test_suite "prepare" -description {
|
|
|
|
Run tests with the db connection using sqlite3_prepare() instead of _v2().
|
|
|
|
} -dbconfig {
|
2017-10-13 19:01:36 +03:00
|
|
|
$::dbhandle version -use-legacy-prepare 1
|
2011-06-27 20:55:50 +04:00
|
|
|
#$::dbhandle cache size 0
|
|
|
|
} -files [
|
2017-07-15 09:35:15 +03:00
|
|
|
test_set $allquicktests -exclude *malloc* *ioerr* *fault* \
|
|
|
|
stmtvtab1.test index9.test
|
2011-06-27 20:55:50 +04:00
|
|
|
]
|
|
|
|
|
2018-04-17 00:12:42 +03:00
|
|
|
test_suite "sorterref" -prefix "" -description {
|
|
|
|
Run the "veryquick" test suite with SQLITE_CONFIG_SORTERREF_SIZE set
|
|
|
|
to 0 so that sorter-references are used whenever possible.
|
|
|
|
} -files [
|
|
|
|
test_set $allquicktests -exclude *malloc* *ioerr* *fault* *bigfile* *_err* \
|
|
|
|
*fts5corrupt* *fts5big* *fts5aj*
|
|
|
|
] -initialize {
|
|
|
|
catch {db close}
|
|
|
|
sqlite3_shutdown
|
|
|
|
sqlite3_config_sorterref 0
|
|
|
|
sqlite3_initialize
|
|
|
|
autoinstall_test_functions
|
|
|
|
} -shutdown {
|
|
|
|
catch {db close}
|
|
|
|
sqlite3_shutdown
|
|
|
|
sqlite3_config_sorterref -1
|
|
|
|
sqlite3_initialize
|
|
|
|
autoinstall_test_functions
|
|
|
|
}
|
|
|
|
|
2020-03-20 23:54:28 +03:00
|
|
|
test_suite "maindbname" -prefix "" -description {
|
|
|
|
Run the "veryquick" test suite with SQLITE_DBCONFIG_MAINDBNAME used to
|
|
|
|
set the name of database 0 to "icecube".
|
|
|
|
} -files [
|
|
|
|
test_set $allquicktests -exclude *malloc* *ioerr* *fault* *bigfile* *_err* \
|
|
|
|
*fts5corrupt* *fts5big* *fts5aj*
|
|
|
|
] -dbconfig {
|
|
|
|
dbconfig_maindbname_icecube $::dbhandle
|
|
|
|
}
|
|
|
|
|
2008-06-21 22:07:37 +04:00
|
|
|
# End of tests
|
|
|
|
#############################################################################
|
|
|
|
|
2010-06-15 10:56:37 +04:00
|
|
|
# run_tests NAME OPTIONS
|
|
|
|
#
|
|
|
|
# where available options are:
|
|
|
|
#
|
2010-06-15 22:00:06 +04:00
|
|
|
# -description TITLE
|
|
|
|
# -initialize SCRIPT
|
|
|
|
# -shutdown SCRIPT
|
|
|
|
# -files LIST-OF-FILES
|
|
|
|
# -prefix NAME
|
2018-09-18 19:06:42 +03:00
|
|
|
# -dbconfig SCRIPT
|
2010-06-15 10:56:37 +04:00
|
|
|
#
|
|
|
|
proc run_tests {name args} {
|
2018-09-18 19:06:42 +03:00
|
|
|
set options(-initialize) ""
|
|
|
|
set options(-shutdown) ""
|
|
|
|
set options(-prefix) ""
|
|
|
|
set options(-dbconfig) ""
|
2018-11-07 14:56:23 +03:00
|
|
|
set options(-presql) ""
|
2018-09-18 19:06:42 +03:00
|
|
|
|
2010-06-15 10:56:37 +04:00
|
|
|
array set options $args
|
|
|
|
|
2010-07-03 17:59:01 +04:00
|
|
|
set ::G(perm:name) $name
|
|
|
|
set ::G(perm:prefix) $options(-prefix)
|
2010-06-15 10:56:37 +04:00
|
|
|
set ::G(isquick) 1
|
2010-12-07 17:32:28 +03:00
|
|
|
set ::G(perm:dbconfig) $options(-dbconfig)
|
2018-11-07 14:56:23 +03:00
|
|
|
set ::G(perm:presql) $options(-presql)
|
2010-06-15 10:56:37 +04:00
|
|
|
|
2021-10-07 22:27:17 +03:00
|
|
|
set filelist [lsort $options(-files)]
|
|
|
|
if {[info exists ::env(TCLTEST_PART)]} {
|
|
|
|
regexp {^([0-9]*)/([0-9]*)$} $::env(TCLTEST_PART) -> A B
|
|
|
|
set nFile [expr {([llength $filelist]+$B-1)/$B}]
|
|
|
|
set filelist [lrange $filelist [expr ($A-1)*$nFile] [expr $A*$nFile-1]]
|
|
|
|
}
|
|
|
|
|
|
|
|
foreach file $filelist {
|
2010-08-26 18:15:37 +04:00
|
|
|
if {[file tail $file] == $file} { set file [file join $::testdir $file] }
|
2021-03-11 11:49:52 +03:00
|
|
|
|
|
|
|
if {[info exists ::env(SQLITE_TEST_PATTERN_LIST)]} {
|
|
|
|
set ok 0
|
|
|
|
foreach p $::env(SQLITE_TEST_PATTERN_LIST) {
|
|
|
|
set p [string map {% *} $p]
|
|
|
|
if {[string match $p [file tail $file]]} {set ok 1 ; break}
|
|
|
|
}
|
|
|
|
if {!$ok} continue
|
|
|
|
}
|
|
|
|
|
|
|
|
uplevel $options(-initialize)
|
2010-08-26 18:15:37 +04:00
|
|
|
slave_test_file $file
|
2016-04-27 21:54:49 +03:00
|
|
|
uplevel $options(-shutdown)
|
2018-09-18 19:06:42 +03:00
|
|
|
unset -nocomplain ::G(perm:sqlite3_args)
|
2010-06-15 10:56:37 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
unset ::G(perm:name)
|
2010-07-03 17:59:01 +04:00
|
|
|
unset ::G(perm:prefix)
|
2010-12-07 17:32:28 +03:00
|
|
|
unset ::G(perm:dbconfig)
|
2018-11-07 14:56:23 +03:00
|
|
|
unset ::G(perm:presql)
|
2010-06-15 10:56:37 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
proc run_test_suite {name} {
|
|
|
|
if {[info exists ::testspec($name)]==0} {
|
|
|
|
error "No such test suite: $name"
|
|
|
|
}
|
|
|
|
uplevel run_tests $name $::testspec($name)
|
|
|
|
}
|
|
|
|
|
|
|
|
proc help {} {
|
2010-06-15 21:44:47 +04:00
|
|
|
puts "Usage: $::argv0 TESTSUITE ?TESTFILE?"
|
|
|
|
puts ""
|
|
|
|
puts "Available test-suites are:"
|
2018-09-18 19:06:42 +03:00
|
|
|
|
|
|
|
set iPos 0
|
2010-06-15 10:56:37 +04:00
|
|
|
foreach k $::testsuitelist {
|
2018-09-18 19:06:42 +03:00
|
|
|
if {[info exists ::testspec($k)]} {
|
|
|
|
switch $iPos {
|
|
|
|
0 {
|
|
|
|
puts ""
|
|
|
|
puts -nonewline " [format %-30s $k]"
|
|
|
|
}
|
|
|
|
|
|
|
|
1 {
|
|
|
|
puts -nonewline [format %-30s $k]
|
|
|
|
}
|
|
|
|
|
|
|
|
2 {
|
|
|
|
puts -nonewline $k
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
set iPos [expr (($iPos+1) % 3)]
|
2010-06-15 21:44:47 +04:00
|
|
|
}
|
2010-06-15 10:56:37 +04:00
|
|
|
}
|
2018-09-18 19:06:42 +03:00
|
|
|
puts ""
|
2010-06-15 10:56:37 +04:00
|
|
|
exit -1
|
|
|
|
}
|
|
|
|
|
2016-03-15 00:26:25 +03:00
|
|
|
if {[file tail $argv0] == "permutations.test"} {
|
2010-06-15 10:56:37 +04:00
|
|
|
proc main {argv} {
|
|
|
|
if {[llength $argv]==0} {
|
|
|
|
help
|
|
|
|
} else {
|
2018-09-18 19:06:42 +03:00
|
|
|
|
|
|
|
# See if the first argument is a named test-suite.
|
|
|
|
#
|
2016-03-15 00:26:25 +03:00
|
|
|
set suite [file tail [lindex $argv 0]]
|
2018-09-18 19:06:42 +03:00
|
|
|
if {[info exists ::testspec($suite)]} {
|
|
|
|
set S $::testspec($suite)
|
|
|
|
set i 1
|
|
|
|
} else {
|
2021-10-19 21:53:30 +03:00
|
|
|
set suite default
|
2018-09-18 19:06:42 +03:00
|
|
|
set S [list]
|
|
|
|
set i 0
|
|
|
|
}
|
|
|
|
|
2010-06-15 10:56:37 +04:00
|
|
|
set extra ""
|
2018-09-18 19:06:42 +03:00
|
|
|
if {$i < [llength $argv] && [string range [lindex $argv $i] 0 0]!="-" } {
|
|
|
|
set files [list]
|
|
|
|
for {} {$i < [llength $argv]} {incr i} {
|
|
|
|
set pattern [string map {% *} [lindex $argv $i]]
|
|
|
|
if {[string range $pattern 0 0]=="-"} break
|
|
|
|
foreach f $::alltests {
|
|
|
|
set tail [file tail $f]
|
|
|
|
if {[lsearch $files $f]<0 && [string match $pattern $tail]} {
|
|
|
|
lappend files $f
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
set extra [list -files $files]
|
|
|
|
}
|
|
|
|
|
2021-10-19 21:53:30 +03:00
|
|
|
eval [list run_tests $suite] $S $extra
|
2010-06-15 10:56:37 +04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
main $argv
|
2021-09-22 13:57:30 +03:00
|
|
|
set argv {}
|
2010-06-15 10:56:37 +04:00
|
|
|
finish_test
|
|
|
|
}
|