2014-12-23 22:40:51 +03:00
|
|
|
#!/usr/bin/tclsh
|
|
|
|
#
|
2010-09-06 22:44:14 +04:00
|
|
|
# Documentation for this script. This may be output to stderr
|
|
|
|
# if the script is invoked incorrectly. See the [process_options]
|
|
|
|
# proc below.
|
|
|
|
#
|
|
|
|
set ::USAGE_MESSAGE {
|
|
|
|
This Tcl script is used to test the various configurations required
|
2014-12-23 23:22:57 +03:00
|
|
|
before releasing a new version. Supported command line options (all
|
2010-09-06 22:44:14 +04:00
|
|
|
optional) are:
|
|
|
|
|
2014-12-23 22:40:51 +03:00
|
|
|
--srcdir TOP-OF-SQLITE-TREE (see below)
|
|
|
|
--platform PLATFORM (see below)
|
|
|
|
--config CONFIGNAME (Run only CONFIGNAME)
|
|
|
|
--quick (Run "veryquick.test" only)
|
|
|
|
--buildonly (Just build testfixture - do not run)
|
2014-12-23 23:22:57 +03:00
|
|
|
--dryrun (Print what would have happened)
|
2014-12-23 22:40:51 +03:00
|
|
|
--info (Show diagnostic info)
|
2010-09-06 22:44:14 +04:00
|
|
|
|
2014-12-23 22:40:51 +03:00
|
|
|
The default value for --srcdir is the parent of the directory holding
|
|
|
|
this script.
|
2010-09-06 22:44:14 +04:00
|
|
|
|
2014-12-23 22:40:51 +03:00
|
|
|
The script determines the default value for --platform using the
|
2014-12-23 23:22:57 +03:00
|
|
|
$tcl_platform(os) and $tcl_platform(machine) variables. Supported
|
2010-09-06 22:44:14 +04:00
|
|
|
platforms are "Linux-x86", "Linux-x86_64" and "Darwin-i386".
|
|
|
|
|
2014-12-23 22:40:51 +03:00
|
|
|
Every test begins with a fresh run of the configure script at the top
|
|
|
|
of the SQLite source tree.
|
2010-09-06 22:44:14 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
array set ::Configs {
|
|
|
|
"Default" {
|
|
|
|
-O2
|
|
|
|
}
|
2011-04-06 16:37:09 +04:00
|
|
|
"Ftrapv" {
|
|
|
|
-O2 -ftrapv
|
|
|
|
-DSQLITE_MAX_ATTACHED=55
|
|
|
|
-DSQLITE_TCL_DEFAULT_FULLMUTEX=1
|
|
|
|
}
|
2010-09-06 22:44:14 +04:00
|
|
|
"Unlock-Notify" {
|
|
|
|
-O2
|
|
|
|
-DSQLITE_ENABLE_UNLOCK_NOTIFY
|
|
|
|
-DSQLITE_THREADSAFE
|
|
|
|
-DSQLITE_TCL_DEFAULT_FULLMUTEX=1
|
|
|
|
}
|
|
|
|
"Secure-Delete" {
|
|
|
|
-O2
|
|
|
|
-DSQLITE_SECURE_DELETE=1
|
|
|
|
-DSQLITE_SOUNDEX=1
|
|
|
|
}
|
|
|
|
"Update-Delete-Limit" {
|
|
|
|
-O2
|
|
|
|
-DSQLITE_DEFAULT_FILE_FORMAT=4
|
|
|
|
-DSQLITE_ENABLE_UPDATE_DELETE_LIMIT=1
|
|
|
|
}
|
2012-12-10 14:22:48 +04:00
|
|
|
"Check-Symbols" {
|
|
|
|
-DSQLITE_MEMDEBUG=1
|
|
|
|
-DSQLITE_ENABLE_FTS3_PARENTHESIS=1
|
|
|
|
-DSQLITE_ENABLE_FTS3=1
|
|
|
|
-DSQLITE_ENABLE_RTREE=1
|
|
|
|
-DSQLITE_ENABLE_MEMSYS5=1
|
|
|
|
-DSQLITE_ENABLE_MEMSYS3=1
|
|
|
|
-DSQLITE_ENABLE_COLUMN_METADATA=1
|
|
|
|
-DSQLITE_ENABLE_UPDATE_DELETE_LIMIT=1
|
|
|
|
-DSQLITE_SECURE_DELETE=1
|
|
|
|
-DSQLITE_SOUNDEX=1
|
|
|
|
-DSQLITE_ENABLE_ATOMIC_WRITE=1
|
|
|
|
-DSQLITE_ENABLE_IOTRACE=1
|
|
|
|
-DSQLITE_ENABLE_MEMORY_MANAGEMENT=1
|
|
|
|
-DSQLITE_ENABLE_OVERSIZE_CELL_CHECK=1
|
|
|
|
}
|
2010-09-06 22:44:14 +04:00
|
|
|
"Debug-One" {
|
|
|
|
-O2
|
|
|
|
-DSQLITE_DEBUG=1
|
|
|
|
-DSQLITE_MEMDEBUG=1
|
|
|
|
-DSQLITE_MUTEX_NOOP=1
|
|
|
|
-DSQLITE_TCL_DEFAULT_FULLMUTEX=1
|
|
|
|
-DSQLITE_ENABLE_FTS3=1
|
|
|
|
-DSQLITE_ENABLE_RTREE=1
|
|
|
|
-DSQLITE_ENABLE_MEMSYS5=1
|
|
|
|
-DSQLITE_ENABLE_MEMSYS3=1
|
|
|
|
-DSQLITE_ENABLE_COLUMN_METADATA=1
|
|
|
|
}
|
|
|
|
"Device-One" {
|
|
|
|
-O2
|
|
|
|
-DSQLITE_DEBUG=1
|
|
|
|
-DSQLITE_DEFAULT_AUTOVACUUM=1
|
|
|
|
-DSQLITE_DEFAULT_CACHE_SIZE=64
|
2010-09-13 15:29:02 +04:00
|
|
|
-DSQLITE_DEFAULT_PAGE_SIZE=1024
|
2010-09-06 22:44:14 +04:00
|
|
|
-DSQLITE_DEFAULT_TEMP_CACHE_SIZE=32
|
2010-09-13 15:29:02 +04:00
|
|
|
-DSQLITE_DISABLE_LFS=1
|
|
|
|
-DSQLITE_ENABLE_ATOMIC_WRITE=1
|
|
|
|
-DSQLITE_ENABLE_IOTRACE=1
|
|
|
|
-DSQLITE_ENABLE_MEMORY_MANAGEMENT=1
|
|
|
|
-DSQLITE_MAX_PAGE_SIZE=4096
|
2010-09-06 22:44:14 +04:00
|
|
|
-DSQLITE_OMIT_LOAD_EXTENSION=1
|
2010-09-13 15:29:02 +04:00
|
|
|
-DSQLITE_OMIT_PROGRESS_CALLBACK=1
|
2010-09-06 22:44:14 +04:00
|
|
|
-DSQLITE_OMIT_VIRTUALTABLE=1
|
2010-09-13 15:29:02 +04:00
|
|
|
-DSQLITE_TEMP_STORE=3
|
|
|
|
}
|
|
|
|
"Device-Two" {
|
|
|
|
-DSQLITE_4_BYTE_ALIGNED_MALLOC=1
|
|
|
|
-DSQLITE_DEFAULT_AUTOVACUUM=1
|
|
|
|
-DSQLITE_DEFAULT_CACHE_SIZE=1000
|
|
|
|
-DSQLITE_DEFAULT_LOCKING_MODE=0
|
|
|
|
-DSQLITE_DEFAULT_PAGE_SIZE=1024
|
|
|
|
-DSQLITE_DEFAULT_TEMP_CACHE_SIZE=1000
|
|
|
|
-DSQLITE_DISABLE_LFS=1
|
|
|
|
-DSQLITE_ENABLE_FTS3=1
|
|
|
|
-DSQLITE_ENABLE_MEMORY_MANAGEMENT=1
|
|
|
|
-DSQLITE_ENABLE_RTREE=1
|
|
|
|
-DSQLITE_MAX_COMPOUND_SELECT=50
|
|
|
|
-DSQLITE_MAX_PAGE_SIZE=32768
|
|
|
|
-DSQLITE_OMIT_TRACE=1
|
|
|
|
-DSQLITE_TEMP_STORE=3
|
|
|
|
-DSQLITE_THREADSAFE=2
|
2010-09-06 22:44:14 +04:00
|
|
|
}
|
|
|
|
"Locking-Style" {
|
|
|
|
-O2
|
|
|
|
-DSQLITE_ENABLE_LOCKING_STYLE=1
|
|
|
|
}
|
|
|
|
"OS-X" {
|
2010-09-13 15:29:02 +04:00
|
|
|
-DSQLITE_OMIT_LOAD_EXTENSION=1
|
|
|
|
-DSQLITE_DEFAULT_MEMSTATUS=0
|
|
|
|
-DSQLITE_THREADSAFE=2
|
|
|
|
-DSQLITE_OS_UNIX=1
|
2010-09-06 22:44:14 +04:00
|
|
|
-DSQLITE_ENABLE_LOCKING_STYLE=1
|
2010-09-13 15:29:02 +04:00
|
|
|
-DUSE_PREAD=1
|
|
|
|
-DSQLITE_ENABLE_RTREE=1
|
|
|
|
-DSQLITE_ENABLE_FTS3=1
|
|
|
|
-DSQLITE_ENABLE_FTS3_PARENTHESIS=1
|
|
|
|
-DSQLITE_DEFAULT_CACHE_SIZE=1000
|
|
|
|
-DSQLITE_MAX_LENGTH=2147483645
|
|
|
|
-DSQLITE_MAX_VARIABLE_NUMBER=500000
|
2014-12-23 23:22:57 +03:00
|
|
|
-DSQLITE_DEBUG=1
|
2010-09-13 15:29:02 +04:00
|
|
|
-DSQLITE_PREFER_PROXY_LOCKING=1
|
2010-09-06 22:44:14 +04:00
|
|
|
}
|
|
|
|
"Extra-Robustness" {
|
|
|
|
-DSQLITE_ENABLE_OVERSIZE_CELL_CHECK=1
|
2011-04-06 16:37:09 +04:00
|
|
|
-DSQLITE_MAX_ATTACHED=62
|
2010-09-06 22:44:14 +04:00
|
|
|
}
|
2012-08-20 21:24:48 +04:00
|
|
|
"Devkit" {
|
|
|
|
-DSQLITE_DEFAULT_FILE_FORMAT=4
|
|
|
|
-DSQLITE_MAX_ATTACHED=30
|
|
|
|
-DSQLITE_ENABLE_COLUMN_METADATA
|
|
|
|
-DSQLITE_ENABLE_FTS4
|
|
|
|
-DSQLITE_ENABLE_FTS4_PARENTHESIS
|
|
|
|
-DSQLITE_DISABLE_FTS4_DEFERRED
|
|
|
|
-DSQLITE_ENABLE_RTREE
|
|
|
|
}
|
2014-08-12 18:06:13 +04:00
|
|
|
|
|
|
|
"No-lookaside" {
|
|
|
|
-DSQLITE_TEST_REALLOC_STRESS=1
|
|
|
|
-DSQLITE_OMIT_LOOKASIDE=1
|
|
|
|
-DHAVE_USLEEP=1
|
|
|
|
}
|
2010-09-06 22:44:14 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
array set ::Platforms {
|
|
|
|
Linux-x86_64 {
|
2012-12-10 14:22:48 +04:00
|
|
|
"Check-Symbols" checksymbols
|
|
|
|
"Debug-One" test
|
2010-09-06 22:44:14 +04:00
|
|
|
"Secure-Delete" test
|
|
|
|
"Unlock-Notify" "QUICKTEST_INCLUDE=notify2.test test"
|
|
|
|
"Update-Delete-Limit" test
|
|
|
|
"Extra-Robustness" test
|
2010-09-13 15:29:02 +04:00
|
|
|
"Device-Two" test
|
2011-04-06 16:37:09 +04:00
|
|
|
"Ftrapv" test
|
2014-08-12 18:06:13 +04:00
|
|
|
"No-lookaside" test
|
2014-10-15 19:28:27 +04:00
|
|
|
"Devkit" test
|
|
|
|
"Default" "threadtest fulltest"
|
2010-09-13 15:29:02 +04:00
|
|
|
"Device-One" fulltest
|
2010-09-06 22:44:14 +04:00
|
|
|
}
|
|
|
|
Linux-i686 {
|
2012-08-20 21:24:48 +04:00
|
|
|
"Devkit" test
|
2010-09-06 22:44:14 +04:00
|
|
|
"Unlock-Notify" "QUICKTEST_INCLUDE=notify2.test test"
|
2010-09-13 15:29:02 +04:00
|
|
|
"Device-One" test
|
2010-09-13 16:15:36 +04:00
|
|
|
"Device-Two" test
|
|
|
|
"Default" "threadtest fulltest"
|
2010-09-06 22:44:14 +04:00
|
|
|
}
|
|
|
|
Darwin-i386 {
|
2010-09-13 15:29:02 +04:00
|
|
|
"Locking-Style" test
|
2010-09-13 16:15:36 +04:00
|
|
|
"OS-X" "threadtest fulltest"
|
2010-09-06 22:44:14 +04:00
|
|
|
}
|
2014-12-23 23:22:57 +03:00
|
|
|
"Windows NT-intel" {
|
2014-12-24 00:10:38 +03:00
|
|
|
"Default" "fulltestonly"
|
2014-12-23 23:22:57 +03:00
|
|
|
}
|
2010-09-06 22:44:14 +04:00
|
|
|
}
|
|
|
|
|
2011-07-07 12:19:16 +04:00
|
|
|
|
2010-09-06 22:44:14 +04:00
|
|
|
# End of configuration section.
|
|
|
|
#########################################################################
|
|
|
|
#########################################################################
|
|
|
|
|
|
|
|
foreach {key value} [array get ::Platforms] {
|
|
|
|
foreach {v t} $value {
|
|
|
|
if {0==[info exists ::Configs($v)]} {
|
|
|
|
puts stderr "No such configuration: \"$v\""
|
|
|
|
exit -1
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
proc run_test_suite {name testtarget config} {
|
2014-12-23 23:22:57 +03:00
|
|
|
# Tcl variable $opts is used to build up the value used to set the
|
2010-09-06 22:44:14 +04:00
|
|
|
# OPTS Makefile variable. Variable $cflags holds the value for
|
|
|
|
# CFLAGS. The makefile will pass OPTS to both gcc and lemon, but
|
|
|
|
# CFLAGS is only passed to gcc.
|
|
|
|
#
|
2014-12-23 22:40:51 +03:00
|
|
|
set cflags "-g"
|
2010-09-06 22:44:14 +04:00
|
|
|
set opts ""
|
|
|
|
foreach arg $config {
|
|
|
|
if {[string match -D* $arg]} {
|
|
|
|
lappend opts $arg
|
|
|
|
} else {
|
|
|
|
lappend cflags $arg
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
set cflags [join $cflags " "]
|
|
|
|
set opts [join $opts " "]
|
|
|
|
append opts " -DSQLITE_NO_SYNC=1 -DHAVE_USLEEP"
|
|
|
|
|
|
|
|
# Set the sub-directory to use.
|
|
|
|
#
|
|
|
|
set dir [string tolower [string map {- _ " " _} $name]]
|
|
|
|
|
|
|
|
if {$::tcl_platform(platform)=="windows"} {
|
|
|
|
append opts " -DSQLITE_OS_WIN=1"
|
|
|
|
} else {
|
|
|
|
append opts " -DSQLITE_OS_UNIX=1"
|
|
|
|
}
|
|
|
|
|
2014-12-23 22:40:51 +03:00
|
|
|
dryrun file mkdir $dir
|
|
|
|
if {!$::DRYRUN} {
|
2014-12-23 23:41:13 +03:00
|
|
|
set title ${name}($testtarget)
|
|
|
|
set n [string length $title]
|
|
|
|
puts -nonewline "${title}[string repeat . [expr {54-$n}]]"
|
2014-12-23 22:40:51 +03:00
|
|
|
flush stdout
|
|
|
|
}
|
|
|
|
|
|
|
|
set tm1 [clock seconds]
|
|
|
|
set origdir [pwd]
|
|
|
|
dryrun cd $dir
|
2014-12-23 23:22:57 +03:00
|
|
|
set rc [catch [configureCommand]]
|
2014-12-23 22:40:51 +03:00
|
|
|
if {!$rc} {
|
2014-12-23 23:22:57 +03:00
|
|
|
set rc [catch [makeCommand $testtarget $cflags $opts]]
|
2014-12-23 22:40:51 +03:00
|
|
|
}
|
2010-09-13 15:29:02 +04:00
|
|
|
set tm2 [clock seconds]
|
2014-12-23 22:40:51 +03:00
|
|
|
dryrun cd $origdir
|
|
|
|
|
|
|
|
if {!$::DRYRUN} {
|
2014-12-23 23:41:13 +03:00
|
|
|
set hours [expr {($tm2-$tm2)/3600}]
|
|
|
|
set minutes [expr {(($tm2-$tm1)/60)%60}]
|
2014-12-23 22:40:51 +03:00
|
|
|
set seconds [expr {($tm2-$tm1)%60}]
|
2014-12-23 23:41:13 +03:00
|
|
|
set tm [format (%02d:%02d:%02d) $hours $minutes $seconds]
|
2014-12-23 22:40:51 +03:00
|
|
|
if {$rc} {
|
|
|
|
puts " FAIL $tm"
|
|
|
|
incr ::NERR
|
|
|
|
} else {
|
|
|
|
puts " Ok $tm"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2010-09-06 22:44:14 +04:00
|
|
|
|
2014-12-23 23:22:57 +03:00
|
|
|
# The following procedure returns the "configure" command to be exectued for
|
|
|
|
# the current platform, which may be Windows (via MinGW, etc).
|
|
|
|
#
|
|
|
|
proc configureCommand {} {
|
|
|
|
set result [list dryrun exec]
|
|
|
|
if {$::tcl_platform(platform)=="windows"} {
|
|
|
|
lappend result sh
|
|
|
|
}
|
2014-12-23 23:31:43 +03:00
|
|
|
lappend result $::SRCDIR/configure -enable-load-extension >& test.log
|
2014-12-23 23:22:57 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
# The following procedure returns the "make" command to be executed for the
|
|
|
|
# specified targets, compiler flags, and options.
|
|
|
|
#
|
|
|
|
proc makeCommand { targets cflags opts } {
|
|
|
|
set result [list dryrun exec make clean]
|
|
|
|
foreach target $targets {
|
|
|
|
lappend result $target
|
|
|
|
}
|
|
|
|
lappend result CFLAGS=$cflags OPTS=$opts >>& test.log
|
|
|
|
}
|
|
|
|
|
2014-12-23 22:40:51 +03:00
|
|
|
# The following procedure either prints its arguments (if ::DRYRUN is true)
|
2014-12-23 23:22:57 +03:00
|
|
|
# or executes the command of its arguments in the calling context
|
2014-12-23 22:40:51 +03:00
|
|
|
# (if ::DRYRUN is false).
|
|
|
|
#
|
|
|
|
proc dryrun {args} {
|
|
|
|
if {$::DRYRUN} {
|
|
|
|
puts $args
|
2010-09-06 22:44:14 +04:00
|
|
|
} else {
|
2014-12-23 22:40:51 +03:00
|
|
|
uplevel 1 $args
|
2010-09-06 22:44:14 +04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
# This proc processes the command line options passed to this script.
|
|
|
|
# Currently the only option supported is "-makefile", default
|
|
|
|
# "releasetest.mk". Set the ::MAKEFILE variable to the value of this
|
|
|
|
# option.
|
|
|
|
#
|
|
|
|
proc process_options {argv} {
|
2014-12-23 22:40:51 +03:00
|
|
|
set ::SRCDIR [file normalize [file dirname [file dirname $::argv0]]]
|
|
|
|
set ::QUICK 0
|
|
|
|
set ::BUILDONLY 0
|
|
|
|
set ::DRYRUN 0
|
|
|
|
set ::EXEC exec
|
2014-10-10 21:44:03 +04:00
|
|
|
set config {}
|
2010-09-06 22:44:14 +04:00
|
|
|
set platform $::tcl_platform(os)-$::tcl_platform(machine)
|
|
|
|
|
|
|
|
for {set i 0} {$i < [llength $argv]} {incr i} {
|
2014-12-23 22:40:51 +03:00
|
|
|
set x [lindex $argv $i]
|
|
|
|
if {[regexp {^--[a-z]} $x]} {set x [string range $x 1 end]}
|
|
|
|
switch -- $x {
|
|
|
|
-srcdir {
|
2010-09-06 22:44:14 +04:00
|
|
|
incr i
|
2014-12-23 22:40:51 +03:00
|
|
|
set ::SRCDIR [file normalize [lindex $argv $i]]
|
2010-09-06 22:44:14 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
-platform {
|
|
|
|
incr i
|
|
|
|
set platform [lindex $argv $i]
|
|
|
|
}
|
|
|
|
|
|
|
|
-quick {
|
2014-12-23 22:40:51 +03:00
|
|
|
set ::QUICK 1
|
2010-09-06 22:44:14 +04:00
|
|
|
}
|
2014-10-10 21:44:03 +04:00
|
|
|
|
|
|
|
-config {
|
|
|
|
incr i
|
|
|
|
set config [lindex $argv $i]
|
|
|
|
}
|
2014-12-23 22:40:51 +03:00
|
|
|
|
|
|
|
-buildonly {
|
|
|
|
set ::BUILDONLY 1
|
|
|
|
}
|
|
|
|
|
|
|
|
-dryrun {
|
|
|
|
set ::DRYRUN 1
|
|
|
|
}
|
|
|
|
|
|
|
|
-info {
|
|
|
|
puts "Command-line Options:"
|
|
|
|
puts " --srcdir $::SRCDIR"
|
|
|
|
puts " --platform [list $platform]"
|
|
|
|
puts " --config [list $config]"
|
|
|
|
if {$::QUICK} {puts " --quick"}
|
|
|
|
if {$::BUILDONLY} {puts " --buildonly"}
|
|
|
|
if {$::DRYRUN} {puts " --dryrun"}
|
|
|
|
puts "\nAvailable --platform options:"
|
|
|
|
foreach y [lsort [array names ::Platforms]] {
|
|
|
|
puts " [list $y]"
|
|
|
|
}
|
|
|
|
puts "\nAvailable --config options:"
|
|
|
|
foreach y [lsort [array names ::Configs]] {
|
|
|
|
puts " [list $y]"
|
|
|
|
}
|
|
|
|
exit
|
|
|
|
}
|
2014-12-23 23:22:57 +03:00
|
|
|
|
2010-09-06 22:44:14 +04:00
|
|
|
default {
|
|
|
|
puts stderr ""
|
|
|
|
puts stderr [string trim $::USAGE_MESSAGE]
|
|
|
|
exit -1
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if {0==[info exists ::Platforms($platform)]} {
|
|
|
|
puts "Unknown platform: $platform"
|
|
|
|
puts -nonewline "Set the -platform option to "
|
|
|
|
set print [list]
|
|
|
|
foreach p [array names ::Platforms] {
|
|
|
|
lappend print "\"$p\""
|
|
|
|
}
|
|
|
|
lset print end "or [lindex $print end]"
|
|
|
|
puts "[join $print {, }]."
|
|
|
|
exit
|
|
|
|
}
|
|
|
|
|
2014-10-10 21:44:03 +04:00
|
|
|
if {$config!=""} {
|
2014-10-10 21:47:00 +04:00
|
|
|
if {[llength $config]==1} {lappend config fulltest}
|
2014-10-10 21:44:03 +04:00
|
|
|
set ::CONFIGLIST $config
|
|
|
|
} else {
|
|
|
|
set ::CONFIGLIST $::Platforms($platform)
|
|
|
|
}
|
2014-12-23 22:40:51 +03:00
|
|
|
puts "Running the following test configurations for $platform:"
|
2010-09-06 22:44:14 +04:00
|
|
|
puts " [string trim $::CONFIGLIST]"
|
2014-12-23 22:40:51 +03:00
|
|
|
puts -nonewline "Flags:"
|
|
|
|
if {$::DRYRUN} {puts -nonewline " --dryrun"}
|
|
|
|
if {$::BUILDONLY} {puts -nonewline " --buildonly"}
|
|
|
|
if {$::QUICK} {puts -nonewline " --quick"}
|
|
|
|
puts ""
|
2010-09-06 22:44:14 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
# Main routine.
|
|
|
|
#
|
|
|
|
proc main {argv} {
|
|
|
|
|
|
|
|
# Process any command line options.
|
|
|
|
process_options $argv
|
2014-12-23 22:40:51 +03:00
|
|
|
puts [string repeat * 70]
|
2010-09-06 22:44:14 +04:00
|
|
|
|
2014-12-25 02:35:36 +03:00
|
|
|
set ::NERR 0
|
|
|
|
set ::NTEST 0
|
2014-12-23 22:40:51 +03:00
|
|
|
set STARTTIME [clock seconds]
|
2010-09-06 22:44:14 +04:00
|
|
|
foreach {zConfig target} $::CONFIGLIST {
|
|
|
|
if {$::QUICK} {set target test}
|
2014-12-23 22:40:51 +03:00
|
|
|
if {$::BUILDONLY} {set target testfixture}
|
2010-09-06 22:44:14 +04:00
|
|
|
set config_options $::Configs($zConfig)
|
|
|
|
|
2014-12-23 22:40:51 +03:00
|
|
|
incr NTEST
|
2010-09-06 22:44:14 +04:00
|
|
|
run_test_suite $zConfig $target $config_options
|
|
|
|
|
|
|
|
# If the configuration included the SQLITE_DEBUG option, then remove
|
|
|
|
# it and run veryquick.test. If it did not include the SQLITE_DEBUG option
|
|
|
|
# add it and run veryquick.test.
|
2014-12-23 22:40:51 +03:00
|
|
|
if {$target!="checksymbols" && !$::BUILDONLY} {
|
2012-12-10 14:22:48 +04:00
|
|
|
set debug_idx [lsearch -glob $config_options -DSQLITE_DEBUG*]
|
|
|
|
if {$debug_idx < 0} {
|
2014-12-23 22:40:51 +03:00
|
|
|
incr NTEST
|
2012-12-10 14:22:48 +04:00
|
|
|
run_test_suite "${zConfig}_debug" test [
|
|
|
|
concat $config_options -DSQLITE_DEBUG=1
|
|
|
|
]
|
|
|
|
} else {
|
2014-12-23 22:40:51 +03:00
|
|
|
incr NTEST
|
2012-12-10 14:22:48 +04:00
|
|
|
run_test_suite "${zConfig}_ndebug" test [
|
|
|
|
lreplace $config_options $debug_idx $debug_idx
|
|
|
|
]
|
|
|
|
}
|
2010-09-06 22:44:14 +04:00
|
|
|
}
|
|
|
|
}
|
2014-12-23 22:40:51 +03:00
|
|
|
|
|
|
|
set elapsetime [expr {[clock seconds]-$STARTTIME}]
|
2014-12-25 02:35:36 +03:00
|
|
|
set hr [expr {$elapsetime/3600}]
|
|
|
|
set min [expr {($elapsetime/60)%60}]
|
|
|
|
set sec [expr {$elapsetime%60}]
|
|
|
|
set etime [format (%02d:%02d:%02d) $hr $min $sec]
|
2014-12-23 22:40:51 +03:00
|
|
|
puts [string repeat * 70]
|
2014-12-25 02:35:36 +03:00
|
|
|
puts "$::NERR failures of $::NTEST test suites run in $etime"
|
2010-09-06 22:44:14 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
main $argv
|