In releasetest.tcl, change the --dryrun option to work as it does in

multitest.tcl of TH3.  Add the new --trace option that work like the --dryrun
option used to work.  Add the ability to specify additional configure-script
options in the Config array, and create configurations that use
--disable-shared and --disable-amalgamation for testing.

FossilOrigin-Name: be17ef03f1d74187f7d3b5d72a12fc00db513c8e
This commit is contained in:
drh 2015-01-07 14:41:18 +00:00
parent 8a2a0f560e
commit 8f45555ddc
4 changed files with 40 additions and 25 deletions

View File

@ -30,7 +30,7 @@ BCC = @BUILD_CC@ @BUILD_CFLAGS@
#
CC = @CC@
CFLAGS = @CPPFLAGS@ @CFLAGS@
TCC = $(CC) $(CFLAGS) -I. -I${TOP}/src -I${TOP}/ext/rtree
TCC = $(CC) $(CFLAGS) -I. -I${TOP}/src -I${TOP}/ext/rtree -I${TOP}/ext/fts3
# Define this for the autoconf-based build, so that the code knows it can
# include the generated config.h

View File

@ -1,7 +1,7 @@
C Add\sa\svalgrind\stest\sto\sthe\sLinux-x86_64\splatform\sin\sreleasetest.tcl.
D 2015-01-07T14:09:41.228
C In\sreleasetest.tcl,\schange\sthe\s--dryrun\soption\sto\swork\sas\sit\sdoes\sin\nmultitest.tcl\sof\sTH3.\s\sAdd\sthe\snew\s--trace\soption\sthat\swork\slike\sthe\s--dryrun\noption\sused\sto\swork.\s\sAdd\sthe\sability\sto\sspecify\sadditional\sconfigure-script\noptions\sin\sthe\sConfig\sarray,\sand\screate\sconfigurations\sthat\suse\n--disable-shared\sand\s--disable-amalgamation\sfor\stesting.
D 2015-01-07T14:41:18.624
F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f
F Makefile.in f33d4a67b9471dd46283e0a3d61b0fdd763881ef
F Makefile.in 93b5a564234f87ded60df9bc196f163bb9d7ff44
F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23
F Makefile.msc b363b90fe1bfc3b87d190f2f728a126c00d9ce09
F Makefile.vxworks 034289efa9d591b04b1a73598623119c306cbba0
@ -801,7 +801,7 @@ F test/randexpr1.test eda062a97e60f9c38ae8d806b03b0ddf23d796df
F test/rdonly.test dd30a4858d8e0fbad2304c2bd74a33d4df36412a
F test/regexp1.test 497ea812f264d12b6198d6e50a76be4a1973a9d8
F test/reindex.test 44edd3966b474468b823d481eafef0c305022254
F test/releasetest.tcl 0c48488235152e5e1fff0a9799e0c0783575c3d7
F test/releasetest.tcl 64eaa07598cac0967311d5cacecba576ef4bc804
F test/resolver01.test 33abf37ff8335e6bf98f2b45a0af3e06996ccd9a
F test/rollback.test 458fe73eb3ffdfdf9f6ba3e9b7350a6220414dea
F test/rollback2.test fc14cf6d1a2b250d2735ef16124b971bce152f14
@ -1235,7 +1235,7 @@ F tool/vdbe_profile.tcl 67746953071a9f8f2f668b73fe899074e2c6d8c1
F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4
F tool/warnings.sh 0abfd78ceb09b7f7c27c688c8e3fe93268a13b32
F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f
P af20eae1e6f608e4e61a07c3d14cf88c12751353
R e86fb760bae561a09a9e3d3b43363ec9
P 4b6df035561add4e304fb56dd70ae4d413d6bd5d
R 7d9365389be9392e1fae2ffe15873ec9
U drh
Z 86d9cb70a3b84146b850d94589825104
Z d0f9eda3b9de9b98c9c5ee62f0202409

View File

@ -1 +1 @@
4b6df035561add4e304fb56dd70ae4d413d6bd5d
be17ef03f1d74187f7d3b5d72a12fc00db513c8e

View File

@ -31,6 +31,7 @@ of the SQLite source tree.
array set ::Configs {
"Default" {
-O2
--disable-amalgamation
}
"Ftrapv" {
-O2 -ftrapv
@ -74,6 +75,7 @@ array set ::Configs {
-DSQLITE_ENABLE_STAT4
}
"Debug-One" {
--disable-shared
-O2
-DSQLITE_DEBUG=1
-DSQLITE_MEMDEBUG=1
@ -272,6 +274,7 @@ proc run_test_suite {name testtarget config} {
set cflags "-g"
set opts ""
set title ${name}($testtarget)
set configOpts ""
regsub -all {#[^\n]*\n} $config \n config
foreach arg $config {
@ -279,6 +282,8 @@ proc run_test_suite {name testtarget config} {
lappend opts $arg
} elseif {[string match CC=* $arg]} {
lappend testtarget $arg
} elseif {[regexp {^--(enable|disable)-} $arg]} {
lappend configOpts $arg
} else {
lappend cflags $arg
}
@ -298,26 +303,27 @@ proc run_test_suite {name testtarget config} {
append opts " -DSQLITE_OS_UNIX=1"
}
dryrun file mkdir $dir
if {!$::DRYRUN} {
if {!$::TRACE} {
set n [string length $title]
puts -nonewline "${title}[string repeat . [expr {63-$n}]]"
flush stdout
}
set rc 0
set tm1 [clock seconds]
set origdir [pwd]
dryrun cd $dir
trace_cmd file mkdir $dir
trace_cmd cd $dir
set errmsg {}
set rc [catch [configureCommand]]
set rc [catch [configureCommand $configOpts]]
if {!$rc} {
set rc [catch [makeCommand $testtarget $cflags $opts]]
count_tests_and_errors test.log rc errmsg
}
trace_cmd cd $origdir
set tm2 [clock seconds]
dryrun cd $origdir
if {!$::DRYRUN} {
if {!$::TRACE} {
set hours [expr {($tm2-$tm1)/3600}]
set minutes [expr {(($tm2-$tm1)/60)%60}]
set seconds [expr {($tm2-$tm1)%60}]
@ -335,33 +341,36 @@ proc run_test_suite {name testtarget config} {
# 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]
proc configureCommand {opts} {
set result [list trace_cmd exec]
if {$::tcl_platform(platform)=="windows"} {
lappend result sh
}
lappend result $::SRCDIR/configure --enable-load-extension >& test.log
lappend result $::SRCDIR/configure --enable-load-extension
foreach x $opts {lappend result $x}
lappend result >& test.log
}
# 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]
set result [list trace_cmd exec make clean]
foreach target $targets {
lappend result $target
}
lappend result CFLAGS=$cflags OPTS=$opts >>& test.log
}
# The following procedure either prints its arguments (if ::DRYRUN is true)
# or executes the command of its arguments in the calling context
# (if ::DRYRUN is false).
# The following procedure prints its arguments if ::TRACE is true.
# And it executes the command of its arguments in the calling context
# if ::DRYRUN is false.
#
proc dryrun {args} {
if {$::DRYRUN} {
proc trace_cmd {args} {
if {$::TRACE} {
puts $args
} else {
}
if {!$::DRYRUN} {
uplevel 1 $args
}
}
@ -378,6 +387,7 @@ proc process_options {argv} {
set ::BUILDONLY 0
set ::DRYRUN 0
set ::EXEC exec
set ::TRACE 0
set config {}
set platform $::tcl_platform(os)-$::tcl_platform(machine)
@ -412,6 +422,10 @@ proc process_options {argv} {
set ::DRYRUN 1
}
-trace {
set ::TRACE 1
}
-info {
puts "Command-line Options:"
puts " --srcdir $::SRCDIR"
@ -420,6 +434,7 @@ proc process_options {argv} {
if {$::QUICK} {puts " --quick"}
if {$::BUILDONLY} {puts " --buildonly"}
if {$::DRYRUN} {puts " --dryrun"}
if {$::TRACE} {puts " --trace"}
puts "\nAvailable --platform options:"
foreach y [lsort [array names ::Platforms]] {
puts " [list $y]"