mirror of
https://github.com/sqlite/sqlite.git
synced 2025-07-30 19:03:16 +03:00
Add a script for "soak" testing. (CVS 4074)
FossilOrigin-Name: d4ea1287a8b013a97fcb55bb7f7feba427222bab
This commit is contained in:
13
manifest
13
manifest
@ -1,5 +1,5 @@
|
|||||||
C Fix\sa\srace\scondition\sin\stest_server.c/test7.c\s(test\schanges\sonly).\s(CVS\s4073)
|
C Add\sa\sscript\sfor\s"soak"\stesting.\s(CVS\s4074)
|
||||||
D 2007-06-15T17:50:04
|
D 2007-06-15T18:43:37
|
||||||
F Makefile.in b9971ab07868cf2b3209fe3bf8c52e7e25af4193
|
F Makefile.in b9971ab07868cf2b3209fe3bf8c52e7e25af4193
|
||||||
F Makefile.linux-gcc 2d8574d1ba75f129aba2019f0b959db380a90935
|
F Makefile.linux-gcc 2d8574d1ba75f129aba2019f0b959db380a90935
|
||||||
F README 9c4e2d6706bdcc3efdd773ce752a8cdab4f90028
|
F README 9c4e2d6706bdcc3efdd773ce752a8cdab4f90028
|
||||||
@ -444,6 +444,7 @@ F tool/opcodeDoc.awk b3a2a3d5d3075b8bd90b7afe24283efdd586659c
|
|||||||
F tool/report1.txt 9eae07f26a8fc53889b45fc833a66a33daa22816
|
F tool/report1.txt 9eae07f26a8fc53889b45fc833a66a33daa22816
|
||||||
F tool/showdb.c a086a3d788c7a23cb008317c3180ceb19f20bce0
|
F tool/showdb.c a086a3d788c7a23cb008317c3180ceb19f20bce0
|
||||||
F tool/showjournal.c ec3b171be148656827c4949fbfb8ab4370822f87
|
F tool/showjournal.c ec3b171be148656827c4949fbfb8ab4370822f87
|
||||||
|
F tool/soak1.tcl 9a738c78097e09a8ea6bbc2f35cb805f0dea211a
|
||||||
F tool/space_used.tcl f714c41a59e326b8b9042f415b628b561bafa06b
|
F tool/space_used.tcl f714c41a59e326b8b9042f415b628b561bafa06b
|
||||||
F tool/spaceanal.tcl f60a242a996a79d59cad6615cec83a9203e17911
|
F tool/spaceanal.tcl f60a242a996a79d59cad6615cec83a9203e17911
|
||||||
F tool/speedtest.tcl 06c76698485ccf597b9e7dbb1ac70706eb873355
|
F tool/speedtest.tcl 06c76698485ccf597b9e7dbb1ac70706eb873355
|
||||||
@ -505,7 +506,7 @@ F www/tclsqlite.tcl bb0d1357328a42b1993d78573e587c6dcbc964b9
|
|||||||
F www/vdbe.tcl 87a31ace769f20d3627a64fa1fade7fed47b90d0
|
F www/vdbe.tcl 87a31ace769f20d3627a64fa1fade7fed47b90d0
|
||||||
F www/version3.tcl 890248cf7b70e60c383b0e84d77d5132b3ead42b
|
F www/version3.tcl 890248cf7b70e60c383b0e84d77d5132b3ead42b
|
||||||
F www/whentouse.tcl fc46eae081251c3c181bd79c5faef8195d7991a5
|
F www/whentouse.tcl fc46eae081251c3c181bd79c5faef8195d7991a5
|
||||||
P 1f6f0330000ca564e75cd930afb9f9ce23551d89
|
P d0de32e4c630c43ecd9d5e5296ae84aeff80c083
|
||||||
R a0ee010a5bef0de1c3d00cec7cb6d958
|
R 2ce4a0a4c9a1d5de925f69953c5edccd
|
||||||
U danielk1977
|
U drh
|
||||||
Z 8b3ca4bc021641212b2bd6f7678c807f
|
Z 9c609f75c9a70cc4fe6ed5b8b117e928
|
||||||
|
@ -1 +1 @@
|
|||||||
d0de32e4c630c43ecd9d5e5296ae84aeff80c083
|
d4ea1287a8b013a97fcb55bb7f7feba427222bab
|
92
tool/soak1.tcl
Normal file
92
tool/soak1.tcl
Normal file
@ -0,0 +1,92 @@
|
|||||||
|
#!/usr/bin/tclsh
|
||||||
|
#
|
||||||
|
# Usage:
|
||||||
|
#
|
||||||
|
# tclsh soak1.tcl local-makefile.mk ?target? ?scenario?
|
||||||
|
#
|
||||||
|
# This generates many variations on local-makefile.mk (by modifing
|
||||||
|
# the OPT = lines) and runs them will fulltest, one by one. The
|
||||||
|
# constructed makefiles are named "soak1.mk".
|
||||||
|
#
|
||||||
|
# If ?target? is provided, that is the makefile target that is run.
|
||||||
|
# The default is "fulltest"
|
||||||
|
#
|
||||||
|
# If ?scenario? is provided, it is the name of a single scenario to
|
||||||
|
# be run. All other scenarios are skipped.
|
||||||
|
#
|
||||||
|
set localmake [lindex $argv 0]
|
||||||
|
set target [lindex $argv 1]
|
||||||
|
set scene [lindex $argv 2]
|
||||||
|
if {$target==""} {set target fulltest}
|
||||||
|
if {$scene==""} {set scene all}
|
||||||
|
|
||||||
|
set in [open $localmake]
|
||||||
|
set maketxt [read $in]
|
||||||
|
close $in
|
||||||
|
regsub -all {\\\n} $maketxt {} maketxt
|
||||||
|
#set makefilename "soak1-[expr {int(rand()*1000000000)}].mk"
|
||||||
|
set makefilename "soak1.mk"
|
||||||
|
|
||||||
|
# Generate a makefile
|
||||||
|
#
|
||||||
|
proc generate_makefile {pattern} {
|
||||||
|
global makefilename maketxt
|
||||||
|
set out [open $makefilename w]
|
||||||
|
set seen_opt 0
|
||||||
|
foreach line [split $maketxt \n] {
|
||||||
|
if {[regexp {^ *#? *OPTS[ =+]} $line]} {
|
||||||
|
if {!$seen_opt} {
|
||||||
|
puts $out "OPTS += -DSQLITE_NO_SYNC=1"
|
||||||
|
foreach x $pattern {
|
||||||
|
puts $out "OPTS += -D$x"
|
||||||
|
}
|
||||||
|
set seen_opt 1
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
puts $out $line
|
||||||
|
}
|
||||||
|
}
|
||||||
|
close $out
|
||||||
|
}
|
||||||
|
|
||||||
|
# Run a test
|
||||||
|
#
|
||||||
|
proc scenario {id title pattern} {
|
||||||
|
global makefilename target scene
|
||||||
|
if {$scene!="all" && $scene!=$id && $scene!=$title} return
|
||||||
|
puts "**************** $title ***************"
|
||||||
|
generate_makefile $pattern
|
||||||
|
exec make -f $makefilename clean >@stdout 2>@stdout
|
||||||
|
exec make -f $makefilename $target >@stdout 2>@stdout
|
||||||
|
}
|
||||||
|
|
||||||
|
###############################################################################
|
||||||
|
# Add new scenarios here
|
||||||
|
#
|
||||||
|
scenario 0 {Default} {}
|
||||||
|
scenario 1 {Debug} {
|
||||||
|
SQLITE_DEBUG=1
|
||||||
|
SQLITE_MEMDEBUG=1
|
||||||
|
}
|
||||||
|
scenario 2 {Everything} {
|
||||||
|
SQLITE_DEBUG=1
|
||||||
|
SQLITE_MEMDEBUG=1
|
||||||
|
SQLITE_ENABLE_MEMORY_MANAGEMENT=1
|
||||||
|
SQLITE_ENABLE_COLUMN_METADATA=1
|
||||||
|
SQLITE_ENABLE_LOAD_EXTENSION=1 HAVE_DLOPEN=1
|
||||||
|
SQLITE_ENABLE_MEMORY_MANAGEMENT=1
|
||||||
|
SQLITE_ENABLE_REDEF_IO=1
|
||||||
|
}
|
||||||
|
scenario 3 {Customer-1} {
|
||||||
|
SQLITE_DISABLE_LFS=1
|
||||||
|
SQLITE_DEFAULT_AUTOVACUUM=1
|
||||||
|
SQLITE_DEFAULT_PAGE_SIZE=1024
|
||||||
|
SQLITE_MAX_PAGE_SIZE=4096
|
||||||
|
SQLITE_DEFAULT_CACHE_SIZE=64
|
||||||
|
SQLITE_DEFAULT_TEMP_CACHE_SIZE=32
|
||||||
|
TEMP_STORE=3
|
||||||
|
SQLITE_OMIT_PROGRESS_CALLBACK=1
|
||||||
|
SQLITE_OMIT_LOAD_EXTENSION=1
|
||||||
|
SQLITE_OMIT_VIRTUALTABLE=1
|
||||||
|
SQLITE_ENABLE_IOTRACE=1
|
||||||
|
}
|
Reference in New Issue
Block a user