mirror of https://github.com/sqlite/sqlite
Add test file permutations.test, which runs various other test files with sqlite configured in various ways. This adds a few new tests and replaces test files autovacuum_crash.test, autovacuum_ioerr.test, exclusive3.test, jrnlmode2.test, jrnlmode3.test, jrnlmode4.test, mutex2 and onefile.test. (CVS 5265)
FossilOrigin-Name: 0e9df3507bd30d320b7ccfeaf3e06e10938022e1
This commit is contained in:
parent
1c4926557a
commit
1077e3f7e0
27
manifest
27
manifest
|
@ -1,5 +1,5 @@
|
|||
C More\sdocumentation\sspellcheck\sand\scleanup.\sNo\schanges\sto\scode.\s(CVS\s5264)
|
||||
D 2008-06-21T18:02:17
|
||||
C Add\stest\sfile\spermutations.test,\swhich\sruns\svarious\sother\stest\sfiles\swith\ssqlite\sconfigured\sin\svarious\sways.\sThis\sadds\sa\sfew\snew\stests\sand\sreplaces\stest\sfiles\sautovacuum_crash.test,\sautovacuum_ioerr.test,\sexclusive3.test,\sjrnlmode2.test,\sjrnlmode3.test,\sjrnlmode4.test,\smutex2\sand\sonefile.test.\s(CVS\s5265)
|
||||
D 2008-06-21T18:07:37
|
||||
F Makefile.arm-wince-mingw32ce-gcc ac5f7b2cef0cd850d6f755ba6ee4ab961b1fadf7
|
||||
F Makefile.in ff6f90048555a0088f6a4b7406bed5e55a7c4eff
|
||||
F Makefile.linux-gcc d53183f4aa6a9192d249731c90dbdffbd2c68654
|
||||
|
@ -194,7 +194,7 @@ F src/vtab.c ce9d19ca9053812a557010fd4be7e842f8ebba2d
|
|||
F src/where.c 5c4a999f6aed992131479bfaec9b874326d9963c
|
||||
F tclinstaller.tcl 4356d9d94d2b5ed5e68f9f0c80c4df3048dd7617
|
||||
F test/aggerror.test a867e273ef9e3d7919f03ef4f0e8c0d2767944f2
|
||||
F test/all.test d56a3ca8acdf761204aff0a2e7aa5eb8e11b31e6
|
||||
F test/all.test 4e152341762cfc9b87dac0305e50ea2c8c68b81c
|
||||
F test/alter.test 6353aae6839e486c9b7d8f73b1f4a1e98e57332c
|
||||
F test/alter2.test dd55146e812622c8fc51fd2216bcd8dca8880752
|
||||
F test/alter3.test 25b95a136708f22b87184fa6a4309eea03d65153
|
||||
|
@ -211,8 +211,6 @@ F test/auth.test 100cde29a9913530994289038ec80ef5f63d38d3
|
|||
F test/auth2.test 65ac294b8d52cbdd463f61e77ad0165268373126
|
||||
F test/autoinc.test 42af2c407c4e37d0626f9cda57ed381e94522c9d
|
||||
F test/autovacuum.test 4339e66003b9cf813dd667a83aed2dee27c4c36d
|
||||
F test/autovacuum_crash.test 05a63b8805b20cfba7ace82856ce4ccdda075a31
|
||||
F test/autovacuum_ioerr.test c46a76869cb6eddbbb40b419b2b6c4c001766b1f
|
||||
F test/autovacuum_ioerr2.test dc189f323cf0546289b5a9bbda60bcb1fe52bd4b
|
||||
F test/avtrans.test 1e901d8102706b63534dbd2bdd4d8f16c4082650
|
||||
F test/badutf.test d5360fc31f643d37a973ab0d8b4fb85799c3169f
|
||||
|
@ -276,7 +274,6 @@ F test/enc2.test 6d91a5286f59add0cfcbb2d0da913b76f2242398
|
|||
F test/enc3.test 5c550d59ff31dccdba5d1a02ae11c7047d77c041
|
||||
F test/exclusive.test 5390ddf1f90a6d055111c0ebe6311045dd3035e1
|
||||
F test/exclusive2.test d13bf66753dca46e61241d35d36ab7c868b0d313
|
||||
F test/exclusive3.test 4c54ad89bc70031ee36ed06d92f47e38c7801429
|
||||
F test/exec.test e949714dc127eaa5ecc7d723efec1ec27118fdd7
|
||||
F test/expr.test 5c606f12045dd640ede7f840270340baf5ef1450
|
||||
F test/filectrl.test 524853082d5d7fb442599730ec3a0f3f84a3a936
|
||||
|
@ -371,9 +368,6 @@ F test/join4.test 1a352e4e267114444c29266ce79e941af5885916
|
|||
F test/join5.test 86675fc2919269aa923c84dd00ee4249b97990fe
|
||||
F test/journal1.test 36f2d1bb9bf03f790f43fbdb439e44c0657fab19
|
||||
F test/jrnlmode.test b60a7dae8534ccd2e811deb09258f1172fd6e24f
|
||||
F test/jrnlmode2.test e48ec49320a3f849a5036e3551bf2394112a4aae
|
||||
F test/jrnlmode3.test c77f9d4095945f234dddd60ca0f73c24802ed0c1
|
||||
F test/jrnlmode4.test 8ee031603fef8ed5deba0de8b012a82be6d5a6a0
|
||||
F test/lastinsert.test 474d519c68cb79d07ecae56a763aa7f322c72f51
|
||||
F test/laststmtchanges.test 18ead86c8a87ade949a1d5658f6dc4bb111d1b02
|
||||
F test/like.test 2a3ddbd5d91503f914eabae67a47c4196fe33a58
|
||||
|
@ -423,19 +417,19 @@ F test/mutex1.test f643fe0753daaed30fa233a83e690f0cff9b596e
|
|||
F test/nan.test 14c41572ff52dbc740b1c3303dd313a90dc6084c
|
||||
F test/notnull.test 44d600f916b770def8b095a9962dbe3be5a70d82
|
||||
F test/null.test a8b09b8ed87852742343b33441a9240022108993
|
||||
F test/onefile.test 5af2867a8097cea08f15de5382b8d57d1219d8e3
|
||||
F test/openv2.test f5dd6b23e4dce828eb211649b600763c42a668df
|
||||
F test/pager.test 60303481b22b240c18d6dd1b64edcecc2f4b5a97
|
||||
F test/pager2.test c025f91b75fe65e85febda64d9416428b8a5cab5
|
||||
F test/pager3.test 2323bf27fd5bd887b580247e5bce500ceee994b4
|
||||
F test/pageropt.test 6df72c441db0a037b7ec6990d16311c24fbea77b
|
||||
F test/pagesize.test e0a8b3fe80f8b8e808d94a00734c7a18c76c407e
|
||||
F test/permutations.test fb03fe6dc2a713ff1171373da9f72d962ed3bc92
|
||||
F test/pragma.test 6b9bee4f5dbb9bccde4d0d5caf13a33f9da86e15
|
||||
F test/pragma2.test 5364893491b9231dd170e3459bfc2e2342658b47
|
||||
F test/printf.test c3405535b418d454e8a52196a0fc592ec9eec58d
|
||||
F test/progress.test 5b075c3c790c7b2a61419bc199db87aaf48b8301 x
|
||||
F test/ptrchng.test 83150cb7b513e33cce90fdc68f4b1817551857c0
|
||||
F test/quick.test 48fb66d9c7216c3ff72c7619b264be6c427d7bac
|
||||
F test/quick.test f040f7e8834699d4fd25271780e0c61bbff7a2e5
|
||||
F test/quote.test 215897dbe8de1a6f701265836d6601cc6ed103e6
|
||||
F test/rdonly.test b34db316525440d3b42c32e83942c02c37d28ef0
|
||||
F test/reindex.test 38b138abe36bf9a08c791ed44d9f76cd6b97b78b
|
||||
|
@ -545,13 +539,12 @@ F test/types2.test 3555aacf8ed8dc883356e59efc314707e6247a84
|
|||
F test/types3.test a0f66bf12f80fad89493535474f7a6d16fa58150
|
||||
F test/unique.test 0253c4227a5dc533e312202ce21ecfad18058d18
|
||||
F test/update.test 8bc86fd7ef1a00014f76dc6a6a7c974df4aef172
|
||||
F test/utf16.test 20e2d9ba0d57e952a18b1ac8deab9ad49e082893
|
||||
F test/utf16align.test 7360e84472095518c56746f76b1f9d4dce99fb4d
|
||||
F test/vacuum.test 0bc75ee74ab9c69322d6563aa2287375697e630b
|
||||
F test/vacuum2.test d3b9691541fe6ed5c711f547a1c7d70e9760ac6f
|
||||
F test/vacuum3.test 6149b24613f487915ca9cedfbb9147d5759714ec
|
||||
F test/varint.test ab7b110089a08b9926ed7390e7e97bdefeb74102
|
||||
F test/veryquick.test 5117ca7a26f3c86abd5bd34590a82bbccbd79d34
|
||||
F test/veryquick.test a5d65426d4a598d9f4c57aaca6e539a692fad580
|
||||
F test/view.test 4864e3841ab3213a95297718b94d5d6a8d3bc78b
|
||||
F test/vtab1.test 47092e3ac59141f08e09a6c0cc0df8997242bc79
|
||||
F test/vtab2.test 1da49b015582965a8fc386aa23d051a5a622b08e
|
||||
|
@ -599,7 +592,7 @@ F tool/speedtest16.c c8a9c793df96db7e4933f0852abb7a03d48f2e81
|
|||
F tool/speedtest2.tcl ee2149167303ba8e95af97873c575c3e0fab58ff
|
||||
F tool/speedtest8.c 1dbced29de5f59ba2ebf877edcadf171540374d1
|
||||
F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e
|
||||
P 3edfc64f27ba50ba43b79435b3f5d273e3c29aff
|
||||
R d37ae6eef8a5c1b7352c6d7e5db4a96b
|
||||
U mihailim
|
||||
Z 63772ff9082afb0236c109bd8e25e2d9
|
||||
P 9ae03f5629fb47006ae2d8108dfab3956833d943
|
||||
R b8fb89ef8b6c36b0d81c4791e3cfb607
|
||||
U danielk1977
|
||||
Z 8b09be7399f86723726fb0f8fb2ed88a
|
||||
|
|
|
@ -1 +1 @@
|
|||
9ae03f5629fb47006ae2d8108dfab3956833d943
|
||||
0e9df3507bd30d320b7ccfeaf3e06e10938022e1
|
|
@ -10,7 +10,7 @@
|
|||
#***********************************************************************
|
||||
# This file runs all tests.
|
||||
#
|
||||
# $Id: all.test,v 1.54 2008/03/31 23:51:35 drh Exp $
|
||||
# $Id: all.test,v 1.55 2008/06/21 18:07:37 danielk1977 Exp $
|
||||
|
||||
set testdir [file dirname $argv0]
|
||||
source $testdir/tester.tcl
|
||||
|
@ -107,6 +107,9 @@ for {set Counter 0} {$Counter<$COUNT && $nErr==0} {incr Counter} {
|
|||
lappend LeakList $Leak
|
||||
}
|
||||
}
|
||||
set argv all
|
||||
source $testdir/permutations.test
|
||||
set argv ""
|
||||
|
||||
# Do one last test to look for a memory leak in the library. This will
|
||||
# only work if SQLite is compiled with the -DSQLITE_DEBUG=1 flag.
|
||||
|
@ -134,7 +137,9 @@ if {$::tcl_platform(platform)=="unix"} {
|
|||
source $testdir/crash.test
|
||||
source $testdir/crash2.test
|
||||
ifcapable !default_autovacuum {
|
||||
source $testdir/autovacuum_crash.test
|
||||
set argv autovacuum_crash
|
||||
source $testdir/permutations.test
|
||||
set argv ""
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,58 +0,0 @@
|
|||
# 2001 September 15
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
#***********************************************************************
|
||||
#
|
||||
# This file runs the tests in the file crash.test with auto-vacuum enabled
|
||||
# databases.
|
||||
#
|
||||
# $Id: autovacuum_crash.test,v 1.2 2005/01/16 09:06:34 danielk1977 Exp $
|
||||
|
||||
set testdir [file dirname $argv0]
|
||||
source $testdir/tester.tcl
|
||||
|
||||
# If this build of the library does not support auto-vacuum, omit this
|
||||
# whole file.
|
||||
ifcapable {!autovacuum} {
|
||||
finish_test
|
||||
return
|
||||
}
|
||||
|
||||
rename finish_test really_finish_test2
|
||||
proc finish_test {} {}
|
||||
set ISQUICK 1
|
||||
|
||||
rename sqlite3 real_sqlite3
|
||||
proc sqlite3 {args} {
|
||||
set r [eval "real_sqlite3 $args"]
|
||||
if { [llength $args] == 2 } {
|
||||
[lindex $args 0] eval {pragma auto_vacuum = 1}
|
||||
}
|
||||
set r
|
||||
}
|
||||
|
||||
rename do_test really_do_test
|
||||
proc do_test {args} {
|
||||
set sc [concat really_do_test "autovacuum-[lindex $args 0]" \
|
||||
[lrange $args 1 end]]
|
||||
eval $sc
|
||||
}
|
||||
|
||||
source $testdir/crash.test
|
||||
|
||||
rename sqlite3 ""
|
||||
rename real_sqlite3 sqlite3
|
||||
rename finish_test ""
|
||||
rename really_finish_test2 finish_test
|
||||
rename do_test ""
|
||||
rename really_do_test do_test
|
||||
finish_test
|
||||
|
||||
|
||||
|
|
@ -1,58 +0,0 @@
|
|||
# 2001 September 15
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
#***********************************************************************
|
||||
#
|
||||
# This file runs the tests in the file ioerr.test with auto-vacuum enabled
|
||||
# databases.
|
||||
#
|
||||
# $Id: autovacuum_ioerr.test,v 1.3 2006/01/16 12:46:41 danielk1977 Exp $
|
||||
|
||||
set testdir [file dirname $argv0]
|
||||
source $testdir/tester.tcl
|
||||
|
||||
# If this build of the library does not support auto-vacuum, omit this
|
||||
# whole file.
|
||||
ifcapable {!autovacuum} {
|
||||
finish_test
|
||||
return
|
||||
}
|
||||
|
||||
rename finish_test really_finish_test2
|
||||
proc finish_test {} {}
|
||||
set ISQUICK 1
|
||||
|
||||
rename sqlite3 real_sqlite3
|
||||
proc sqlite3 {args} {
|
||||
set r [eval "real_sqlite3 $args"]
|
||||
if { [llength $args] == 2 } {
|
||||
[lindex $args 0] eval {pragma auto_vacuum = 1}
|
||||
}
|
||||
set r
|
||||
}
|
||||
|
||||
rename do_test really_do_test
|
||||
proc do_test {args} {
|
||||
set sc [concat really_do_test "autovacuum-[lindex $args 0]" \
|
||||
[lrange $args 1 end]]
|
||||
eval $sc
|
||||
}
|
||||
|
||||
source $testdir/ioerr.test
|
||||
|
||||
rename sqlite3 ""
|
||||
rename real_sqlite3 sqlite3
|
||||
rename finish_test ""
|
||||
rename really_finish_test2 finish_test
|
||||
rename do_test ""
|
||||
rename really_do_test do_test
|
||||
finish_test
|
||||
|
||||
|
||||
|
|
@ -1,58 +0,0 @@
|
|||
# 2007 March 26
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
#***********************************************************************
|
||||
#
|
||||
# This file runs the tests in the file ioerr.test with
|
||||
# exclusive access mode enabled.
|
||||
#
|
||||
# $Id: exclusive3.test,v 1.4 2008/04/17 14:16:42 drh Exp $
|
||||
|
||||
set testdir [file dirname $argv0]
|
||||
source $testdir/tester.tcl
|
||||
|
||||
ifcapable {!pager_pragmas} {
|
||||
finish_test
|
||||
return
|
||||
}
|
||||
|
||||
rename finish_test really_finish_test2
|
||||
proc finish_test {} {}
|
||||
set ISQUICK 1
|
||||
|
||||
rename sqlite3 real_sqlite3
|
||||
proc sqlite3 {args} {
|
||||
set r [eval "real_sqlite3 $args"]
|
||||
if { [llength $args] == 2 } {
|
||||
[lindex $args 0] eval {pragma locking_mode = exclusive}
|
||||
}
|
||||
set r
|
||||
}
|
||||
|
||||
rename do_test really_do_test
|
||||
proc do_test {args} {
|
||||
set sc [concat really_do_test "exclusive-[lindex $args 0]" \
|
||||
[lrange $args 1 end]]
|
||||
eval $sc
|
||||
}
|
||||
|
||||
source $testdir/rollback.test
|
||||
source $testdir/select1.test
|
||||
source $testdir/select2.test
|
||||
source $testdir/malloc.test
|
||||
source $testdir/ioerr.test
|
||||
|
||||
|
||||
rename sqlite3 ""
|
||||
rename real_sqlite3 sqlite3
|
||||
rename finish_test ""
|
||||
rename really_finish_test2 finish_test
|
||||
rename do_test ""
|
||||
rename really_do_test do_test
|
||||
finish_test
|
|
@ -1,62 +0,0 @@
|
|||
# 2007 March 26
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
#***********************************************************************
|
||||
#
|
||||
# This file runs a few of the other test files (select1.test etc.) with
|
||||
# persistent journal mode enabled.
|
||||
#
|
||||
# $Id: jrnlmode2.test,v 1.3 2008/05/07 15:44:26 danielk1977 Exp $
|
||||
|
||||
set testdir [file dirname $argv0]
|
||||
source $testdir/tester.tcl
|
||||
|
||||
ifcapable {!pager_pragmas} {
|
||||
finish_test
|
||||
return
|
||||
}
|
||||
|
||||
rename finish_test really_finish_test2
|
||||
proc finish_test {} {}
|
||||
set ISQUICK 1
|
||||
|
||||
rename sqlite3 real_sqlite3
|
||||
proc sqlite3 {args} {
|
||||
set r [eval "real_sqlite3 $args"]
|
||||
if { [llength $args] == 2 } {
|
||||
[lindex $args 0] eval {PRAGMA journal_mode = persist}
|
||||
}
|
||||
set r
|
||||
}
|
||||
|
||||
rename do_test really_do_test
|
||||
proc do_test {args} {
|
||||
set sc [concat really_do_test "jrlnmode2-[lindex $args 0]" \
|
||||
[lrange $args 1 end]]
|
||||
eval $sc
|
||||
}
|
||||
|
||||
source $testdir/delete.test
|
||||
source $testdir/delete2.test
|
||||
source $testdir/insert.test
|
||||
source $testdir/rollback.test
|
||||
source $testdir/select1.test
|
||||
source $testdir/select2.test
|
||||
source $testdir/trans.test
|
||||
source $testdir/update.test
|
||||
source $testdir/vacuum.test
|
||||
|
||||
|
||||
rename sqlite3 ""
|
||||
rename real_sqlite3 sqlite3
|
||||
rename finish_test ""
|
||||
rename really_finish_test2 finish_test
|
||||
rename do_test ""
|
||||
rename really_do_test do_test
|
||||
finish_test
|
|
@ -1,55 +0,0 @@
|
|||
# 2007 March 26
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
#***********************************************************************
|
||||
#
|
||||
# This file runs the tests in the file ioerr.test with
|
||||
# persistent journal mode enabled.
|
||||
#
|
||||
# $Id: jrnlmode3.test,v 1.2 2008/04/19 20:53:26 drh Exp $
|
||||
|
||||
set testdir [file dirname $argv0]
|
||||
source $testdir/tester.tcl
|
||||
|
||||
ifcapable {!pager_pragmas} {
|
||||
finish_test
|
||||
return
|
||||
}
|
||||
|
||||
rename finish_test really_finish_test2
|
||||
proc finish_test {} {}
|
||||
set ISQUICK 1
|
||||
|
||||
rename sqlite3 real_sqlite3
|
||||
proc sqlite3 {args} {
|
||||
set r [eval "real_sqlite3 $args"]
|
||||
if { [llength $args] == 2 } {
|
||||
[lindex $args 0] eval {PRAGMA journal_mode = persist}
|
||||
}
|
||||
set r
|
||||
}
|
||||
|
||||
rename do_test really_do_test
|
||||
proc do_test {args} {
|
||||
set sc [concat really_do_test "jrlnmode3-[lindex $args 0]" \
|
||||
[lrange $args 1 end]]
|
||||
eval $sc
|
||||
}
|
||||
|
||||
source $testdir/malloc.test
|
||||
source $testdir/ioerr.test
|
||||
|
||||
|
||||
rename sqlite3 ""
|
||||
rename real_sqlite3 sqlite3
|
||||
rename finish_test ""
|
||||
rename really_finish_test2 finish_test
|
||||
rename do_test ""
|
||||
rename really_do_test do_test
|
||||
finish_test
|
|
@ -1,60 +0,0 @@
|
|||
# 2007 March 26
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
#***********************************************************************
|
||||
#
|
||||
# This file runs a few of the other test files (select1.test etc.) with
|
||||
# persistent journal mode disabled.
|
||||
#
|
||||
# $Id: jrnlmode4.test,v 1.3 2008/05/07 15:44:26 danielk1977 Exp $
|
||||
|
||||
set testdir [file dirname $argv0]
|
||||
source $testdir/tester.tcl
|
||||
|
||||
ifcapable {!pager_pragmas} {
|
||||
finish_test
|
||||
return
|
||||
}
|
||||
|
||||
rename finish_test really_finish_test2
|
||||
proc finish_test {} {}
|
||||
set ISQUICK 1
|
||||
|
||||
rename sqlite3 real_sqlite3
|
||||
proc sqlite3 {args} {
|
||||
set r [eval "real_sqlite3 $args"]
|
||||
if { [llength $args] == 2 } {
|
||||
[lindex $args 0] eval {PRAGMA journal_mode = off}
|
||||
}
|
||||
set r
|
||||
}
|
||||
|
||||
rename do_test really_do_test
|
||||
proc do_test {args} {
|
||||
set sc [concat really_do_test "jrlnmode4-[lindex $args 0]" \
|
||||
[lrange $args 1 end]]
|
||||
eval $sc
|
||||
}
|
||||
|
||||
source $testdir/delete.test
|
||||
source $testdir/delete2.test
|
||||
source $testdir/insert.test
|
||||
source $testdir/select1.test
|
||||
source $testdir/select2.test
|
||||
source $testdir/update.test
|
||||
source $testdir/vacuum.test
|
||||
|
||||
|
||||
rename sqlite3 ""
|
||||
rename real_sqlite3 sqlite3
|
||||
rename finish_test ""
|
||||
rename really_finish_test2 finish_test
|
||||
rename do_test ""
|
||||
rename really_do_test do_test
|
||||
finish_test
|
|
@ -1,61 +0,0 @@
|
|||
#
|
||||
# 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.
|
||||
#
|
||||
# $Id: onefile.test,v 1.3 2008/01/18 02:31:56 drh Exp $
|
||||
|
||||
set testdir [file dirname $argv0]
|
||||
source $testdir/tester.tcl
|
||||
rename finish_test really_finish_test2
|
||||
proc finish_test {} {
|
||||
catch {db close}
|
||||
catch {db2 close}
|
||||
catch {db3 close}
|
||||
}
|
||||
set ISQUICK 1
|
||||
|
||||
set onefile_INCLUDE {
|
||||
conflict.test
|
||||
insert.test
|
||||
insert2.test
|
||||
insert3.test
|
||||
rollback.test
|
||||
select1.test
|
||||
select2.test
|
||||
select3.test
|
||||
temptable.test
|
||||
}
|
||||
#set onefile_INCLUDE insert2.test
|
||||
|
||||
rename sqlite3 really_sqlite3
|
||||
proc sqlite3 {args} {
|
||||
if {[string range [lindex $args 0] 0 0] ne "-"} {
|
||||
lappend args -vfs fs
|
||||
}
|
||||
uplevel [concat really_sqlite3 $args]
|
||||
}
|
||||
|
||||
rename do_test really_do_test
|
||||
proc do_test {name args} {
|
||||
uplevel really_do_test onefile-$name $args
|
||||
}
|
||||
|
||||
foreach testfile [lsort -dictionary [glob $testdir/*.test]] {
|
||||
set tail [file tail $testfile]
|
||||
if {[lsearch -exact $onefile_INCLUDE $tail]<0} continue
|
||||
source $testfile
|
||||
}
|
||||
|
||||
file delete -force test.db test2.db test3.db test4.db
|
||||
|
||||
really_finish_test2
|
||||
rename do_test {}
|
||||
rename really_do_test do_test
|
||||
rename finish_test {}
|
||||
rename really_finish_test2 finish_test
|
||||
rename sqlite3 {}
|
||||
rename really_sqlite3 sqlite3
|
|
@ -0,0 +1,353 @@
|
|||
# 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.
|
||||
#
|
||||
#***********************************************************************
|
||||
#
|
||||
# $Id: permutations.test,v 1.1 2008/06/21 18:07:37 danielk1977 Exp $
|
||||
|
||||
set testdir [file dirname $argv0]
|
||||
source $testdir/tester.tcl
|
||||
|
||||
# Argument processing.
|
||||
#
|
||||
set ::testmode [lindex $argv 0]
|
||||
set ::testfile [lindex $argv 1]
|
||||
set argv [lrange $argv 2 end]
|
||||
|
||||
set ::permutations_presql ""
|
||||
set ::permutations_test_prefix ""
|
||||
|
||||
if {$::testmode eq "veryquick"} {
|
||||
set ::testmode [list persistent_journal no_journal]
|
||||
set ISQUICK 1
|
||||
}
|
||||
if {$::testmode eq "quick"} {
|
||||
set ::testmode [list persistent_journal no_journal autovacuum_ioerr]
|
||||
set ISQUICK 1
|
||||
}
|
||||
if {$::testmode eq "all"} {
|
||||
set ::testmode {
|
||||
memsubsys1 memsubsys2 singlethread multithread onefile utf16 exclusive
|
||||
persistent_journal persistent_journal_error no_journal no_journal_error
|
||||
autovacuum_ioerr
|
||||
}
|
||||
}
|
||||
if {$::testmode eq "targets"} {
|
||||
puts ""
|
||||
puts -nonewline "veryquick "
|
||||
puts "Same as persistent_journal and no_journal"
|
||||
puts -nonewline "quick "
|
||||
puts "Same as persistent_journal, no_journal and autovacuum_ioerr"
|
||||
puts -nonewline "all "
|
||||
puts "Everything except autovacuum_crash"
|
||||
}
|
||||
|
||||
set EXCLUDE {
|
||||
all.test async.test async2.test corrupt.test
|
||||
crash.test crash2.test crash3.test crash4.test
|
||||
crash6.test crash7.test exclusive3.test fts3.test
|
||||
fuzz.test fuzz_malloc.test in2.test jrnlmode3.test
|
||||
loadext.test mallocAll.test malloc.test malloc2.test
|
||||
malloc3.test malloc4.test memleak.test misc7.test
|
||||
misuse.test mutex2.test onefile.test quick.test
|
||||
soak.test speed1.test speed1p.test speed2.test
|
||||
speed3.test speed4.test speed4p.test sqllimits1.test
|
||||
thread001.test thread002.test btree8.test utf16.test
|
||||
shared_err.test vtab_err.test veryquick.test incrvacuum_ioerr.test
|
||||
autovacuum_crash.test permutations.test
|
||||
autovacuum_ioerr.test jrnlmode2.test jrnlmode4.test
|
||||
}
|
||||
set ALLTESTS [list]
|
||||
foreach filename [glob $testdir/*.test] {
|
||||
set filename [file tail $filename]
|
||||
if {[lsearch $EXCLUDE $filename] < 0} { lappend ALLTESTS $filename }
|
||||
}
|
||||
|
||||
rename finish_test really_finish_test2
|
||||
proc finish_test {} {}
|
||||
|
||||
rename do_test really_do_test
|
||||
|
||||
proc do_test {name args} {
|
||||
eval really_do_test [list "perm-$::permutations_test_prefix.$name"] $args
|
||||
}
|
||||
|
||||
# Overload the [sqlite3] command
|
||||
rename sqlite3 really_sqlite3
|
||||
proc sqlite3 {args} {
|
||||
set r [eval really_sqlite3 $args]
|
||||
if { [llength $args] == 2 && $::permutations_presql ne "" } {
|
||||
[lindex $args 0] eval $::permutations_presql
|
||||
}
|
||||
set r
|
||||
}
|
||||
|
||||
# run_tests OPTIONS
|
||||
#
|
||||
# where available options are:
|
||||
#
|
||||
# -initialize SCRIPT (default "")
|
||||
# -shutdown SCRIPT (default "")
|
||||
# -include LIST-OF-FILES (default $::ALLTESTS)
|
||||
# -exclude LIST-OF-FILES (default "")
|
||||
# -presql SQL (default "")
|
||||
# -description TITLE (default "")
|
||||
#
|
||||
proc run_tests {name args} {
|
||||
set ::permutations_test_prefix $name
|
||||
set options(-shutdown) ""
|
||||
set options(-initialize) ""
|
||||
set options(-exclude) ""
|
||||
set options(-include) $::ALLTESTS
|
||||
set options(-presql) ""
|
||||
set options(-description) "no description supplied (fixme)"
|
||||
array set options $args
|
||||
|
||||
if {$::testmode eq "targets"} {
|
||||
puts [format "% -20s %s" $name [string trim $options(-description)]]
|
||||
return
|
||||
}
|
||||
if {$::testmode ne "" && [lsearch $::testmode $name]<0} return
|
||||
|
||||
|
||||
uplevel $options(-initialize)
|
||||
set ::permutations_presql $options(-presql)
|
||||
|
||||
foreach file $options(-include) {
|
||||
if {[lsearch $options(-exclude) $file] < 0 && (
|
||||
$::testfile eq "" || $::testfile eq $file || "$::testfile.test" eq $file
|
||||
) } {
|
||||
uplevel source $::testdir/$file
|
||||
}
|
||||
}
|
||||
|
||||
uplevel $options(-shutdown)
|
||||
}
|
||||
|
||||
#############################################################################
|
||||
# Start of tests
|
||||
|
||||
# Run some tests using pre-allocated page and scratch blocks.
|
||||
#
|
||||
run_tests "memsubsys1" -description {
|
||||
Tests using pre-allocated page and scratch blocks
|
||||
} -initialize {
|
||||
sqlite3_shutdown
|
||||
sqlite3_config_pagecache 4096 24
|
||||
sqlite3_config_scratch 25000 1
|
||||
sqlite3_initialize
|
||||
} -exclude {
|
||||
memsubsys1.test
|
||||
} -shutdown {
|
||||
catch {db close}
|
||||
sqlite3_shutdown
|
||||
sqlite3_config_pagecache 0 0
|
||||
sqlite3_config_scratch 0 0
|
||||
sqlite3_initialize
|
||||
}
|
||||
|
||||
# Run some tests using pre-allocated page and scratch blocks. This time
|
||||
# the allocations are too small to use in most cases.
|
||||
#
|
||||
run_tests "memsubsys2" -description {
|
||||
Tests using small pre-allocated page and scratch blocks
|
||||
} -initialize {
|
||||
sqlite3_shutdown
|
||||
sqlite3_config_pagecache 512 5
|
||||
sqlite3_config_scratch 1000 1
|
||||
sqlite3_initialize
|
||||
} -exclude {
|
||||
memsubsys1.test
|
||||
} -shutdown {
|
||||
catch {db close}
|
||||
sqlite3_shutdown
|
||||
sqlite3_config_pagecache 0 0
|
||||
sqlite3_config_scratch 0 0
|
||||
sqlite3_initialize
|
||||
}
|
||||
|
||||
# Run some tests in SQLITE_CONFIG_SINGLETHREAD mode.
|
||||
#
|
||||
run_tests "singlethread" -description {
|
||||
Tests run in SQLITE_CONFIG_SINGLETHREAD mode
|
||||
} -initialize {
|
||||
do_test mutex2-singlethread.0 {
|
||||
catch {db close}
|
||||
sqlite3_shutdown
|
||||
sqlite3_config singlethread
|
||||
} SQLITE_OK
|
||||
} -include {
|
||||
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 {
|
||||
do_test mutex2-X {
|
||||
catch {db close}
|
||||
sqlite3_shutdown
|
||||
sqlite3_config serialized
|
||||
} SQLITE_OK
|
||||
}
|
||||
|
||||
# Run some tests in SQLITE_CONFIG_MULTITHREAD mode.
|
||||
#
|
||||
run_tests "multithread" -description {
|
||||
Tests run in SQLITE_CONFIG_MULTITHREAD mode
|
||||
} -initialize {
|
||||
do_test mutex2-multithread.0 {
|
||||
catch {db close}
|
||||
sqlite3_shutdown
|
||||
sqlite3_config multithread
|
||||
} SQLITE_OK
|
||||
} -include {
|
||||
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 {
|
||||
do_test mutex2-X {
|
||||
catch {db close}
|
||||
sqlite3_shutdown
|
||||
sqlite3_config serialized
|
||||
} SQLITE_OK
|
||||
}
|
||||
|
||||
# Run some tests using the "onefile" demo.
|
||||
#
|
||||
run_tests "onefile" -description {
|
||||
Run some tests using the "test_onefile.c" demo
|
||||
} -initialize {
|
||||
rename sqlite3 sqlite3_onefile
|
||||
proc sqlite3 {args} {
|
||||
if {[string range [lindex $args 0] 0 0] ne "-"} {
|
||||
lappend args -vfs fs
|
||||
}
|
||||
uplevel [concat sqlite3_onefile $args]
|
||||
}
|
||||
} -include {
|
||||
conflict.test insert.test insert2.test insert3.test
|
||||
rollback.test select1.test select2.test select3.test
|
||||
temptable.test
|
||||
} -shutdown {
|
||||
rename sqlite3 {}
|
||||
rename sqlite3_onefile sqlite3
|
||||
}
|
||||
|
||||
# Run some tests using UTF-16 databases.
|
||||
#
|
||||
run_tests "utf16" -description {
|
||||
Run tests using UTF-16 databases
|
||||
} -initialize {
|
||||
pragma encoding = 'UTF-16'
|
||||
} -include {
|
||||
alter.test alter3.test
|
||||
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
|
||||
}
|
||||
|
||||
# Run some tests in exclusive locking mode.
|
||||
#
|
||||
run_tests "exclusive" -description {
|
||||
Run tests in exclusive locking mode.
|
||||
} -presql {
|
||||
pragma locking_mode = 'exclusive'
|
||||
} -include {
|
||||
rollback.test select1.test select2.test
|
||||
malloc.test ioerr.test
|
||||
}
|
||||
|
||||
# Run some tests in persistent journal mode.
|
||||
#
|
||||
run_tests "persistent_journal" -description {
|
||||
Run tests in persistent-journal mode.
|
||||
} -presql {
|
||||
pragma journal_mode = persist
|
||||
} -include {
|
||||
delete.test delete2.test insert.test rollback.test select1.test
|
||||
select2.test trans.test update.test vacuum.test
|
||||
}
|
||||
|
||||
# Run some error tests in persistent journal mode.
|
||||
#
|
||||
run_tests "persistent_journal_error" -description {
|
||||
Run malloc.test and ioerr.test in persistent-journal mode.
|
||||
} -presql {
|
||||
pragma journal_mode = persist
|
||||
} -include {
|
||||
malloc.test ioerr.test
|
||||
}
|
||||
|
||||
# Run some tests in no journal mode.
|
||||
#
|
||||
run_tests "no_journal" -description {
|
||||
Run tests in no-journal mode.
|
||||
} -presql {
|
||||
pragma journal_mode = persist
|
||||
} -include {
|
||||
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.
|
||||
#
|
||||
run_tests "no_journal_error" -description {
|
||||
Run malloc.test and ioerr.test in no-journal mode.
|
||||
} -presql {
|
||||
pragma journal_mode = persist
|
||||
} -include {
|
||||
malloc.test ioerr.test
|
||||
}
|
||||
|
||||
# Run some crash-tests in autovacuum mode.
|
||||
#
|
||||
run_tests "autovacuum_crash" -description {
|
||||
Run crash.test in autovacuum mode.
|
||||
} -presql {
|
||||
pragma auto_vacuum = 1
|
||||
} -include crash.test
|
||||
|
||||
# Run some ioerr-tests in autovacuum mode.
|
||||
#
|
||||
run_tests "autovacuum_ioerr" -description {
|
||||
Run ioerr.test in autovacuum mode.
|
||||
} -presql {
|
||||
pragma auto_vacuum = 1
|
||||
} -include ioerr.test
|
||||
|
||||
# End of tests
|
||||
#############################################################################
|
||||
|
||||
if {$::testmode eq "targets"} { puts "" ; exit }
|
||||
|
||||
# Restore the [sqlite3] command.
|
||||
#
|
||||
rename sqlite3 {}
|
||||
rename really_sqlite3 sqlite3
|
||||
|
||||
# Restore the [finish_test] command.
|
||||
#
|
||||
rename finish_test ""
|
||||
rename really_finish_test2 finish_test
|
||||
|
||||
# Restore the [do_test] command.
|
||||
#
|
||||
rename do_test ""
|
||||
rename really_do_test do_test
|
||||
|
||||
finish_test
|
||||
|
|
@ -6,7 +6,7 @@
|
|||
#***********************************************************************
|
||||
# This file runs all tests.
|
||||
#
|
||||
# $Id: quick.test,v 1.80 2008/06/21 12:15:04 danielk1977 Exp $
|
||||
# $Id: quick.test,v 1.81 2008/06/21 18:07:37 danielk1977 Exp $
|
||||
|
||||
proc lshift {lvar} {
|
||||
upvar $lvar l
|
||||
|
@ -116,6 +116,9 @@ foreach testfile [lsort -dictionary [glob $testdir/*.test]] {
|
|||
set sqlite_open_file_count 0
|
||||
}
|
||||
}
|
||||
set argv quick
|
||||
source $testdir/permutations.test
|
||||
set argv ""
|
||||
source $testdir/misuse.test
|
||||
|
||||
set sqlite_open_file_count 0
|
||||
|
|
|
@ -1,75 +0,0 @@
|
|||
# 2001 September 15
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
#***********************************************************************
|
||||
# This file runs all tests.
|
||||
#
|
||||
# $Id: utf16.test,v 1.6 2007/01/04 16:37:04 drh Exp $
|
||||
|
||||
set testdir [file dirname $argv0]
|
||||
source $testdir/tester.tcl
|
||||
rename finish_test really_finish_test2
|
||||
proc finish_test {} {}
|
||||
set ISQUICK 1
|
||||
|
||||
if { [llength $argv]>0 } {
|
||||
set FILES $argv
|
||||
set argv [list]
|
||||
} else {
|
||||
set F {
|
||||
alter.test alter3.test
|
||||
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
|
||||
}
|
||||
foreach f $F {lappend FILES $testdir/$f}
|
||||
}
|
||||
|
||||
rename sqlite3 real_sqlite3
|
||||
proc sqlite3 {args} {
|
||||
set r [eval "real_sqlite3 $args"]
|
||||
if { [llength $args] == 2 } {
|
||||
[lindex $args 0] eval {pragma encoding = 'UTF-16'}
|
||||
}
|
||||
set r
|
||||
}
|
||||
|
||||
rename do_test really_do_test
|
||||
proc do_test {args} {
|
||||
set sc [concat really_do_test "utf16-[lindex $args 0]" [lrange $args 1 end]]
|
||||
eval $sc
|
||||
}
|
||||
|
||||
foreach f $FILES {
|
||||
source $f
|
||||
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
|
||||
}
|
||||
}
|
||||
|
||||
rename sqlite3 ""
|
||||
rename real_sqlite3 sqlite3
|
||||
rename finish_test ""
|
||||
rename really_finish_test2 finish_test
|
||||
rename do_test ""
|
||||
rename really_do_test do_test
|
||||
finish_test
|
|
@ -6,7 +6,7 @@
|
|||
#***********************************************************************
|
||||
# This file runs all tests.
|
||||
#
|
||||
# $Id: veryquick.test,v 1.4 2008/06/18 17:09:10 danielk1977 Exp $
|
||||
# $Id: veryquick.test,v 1.5 2008/06/21 18:07:37 danielk1977 Exp $
|
||||
|
||||
proc lshift {lvar} {
|
||||
upvar $lvar l
|
||||
|
@ -139,6 +139,9 @@ foreach testfile [lsort -dictionary [glob $testdir/*.test]] {
|
|||
set sqlite_open_file_count 0
|
||||
}
|
||||
}
|
||||
set argv veryquick
|
||||
source $testdir/permutations.test
|
||||
set argv ""
|
||||
source $testdir/misuse.test
|
||||
|
||||
set sqlite_open_file_count 0
|
||||
|
|
Loading…
Reference in New Issue