Add the --msvc command-line option to the releasetest.tcl script. This is
only a partial merge from the winTest branch as the OS_TRACE changes are omitted. FossilOrigin-Name: b8768f124ef7d79e500b60a3ede288d46a0f529d
This commit is contained in:
commit
a9de561b21
@ -1163,8 +1163,8 @@ mptester.exe: $(TOP)\mptest\mptest.c $(SHELL_CORE_DEP) $(LIBRESOBJS) sqlite3.h
|
||||
$(LTLINK) $(SHELL_COMPILE_OPTS) $(TOP)\mptest\mptest.c \
|
||||
/link $(LTLINKOPTS) $(LTLIBPATHS) $(SHELL_LINK_OPTS) $(LIBRESOBJS) $(LIBREADLINE) $(LTLIBS) $(TLIBS)
|
||||
|
||||
MPTEST1 = mptester mptest.db $(TOP)/mptest/crash01.test --repeat 20
|
||||
MPTEST2 = mptester mptest.db $(TOP)/mptest/multiwrite01.test --repeat 20
|
||||
MPTEST1 = mptester mptest.db $(TOP)\mptest\crash01.test --repeat 20
|
||||
MPTEST2 = mptester mptest.db $(TOP)\mptest\multiwrite01.test --repeat 20
|
||||
|
||||
mptest: mptester.exe
|
||||
del /Q mptest.db 2>NUL
|
||||
@ -1613,6 +1613,9 @@ queryplantest: testfixture.exe sqlite3.exe
|
||||
test: testfixture.exe sqlite3.exe
|
||||
.\testfixture.exe $(TOP)\test\veryquick.test
|
||||
|
||||
smoketest: testfixture.exe
|
||||
.\testfixture.exe $(TOP)\test\main.test
|
||||
|
||||
sqlite3_analyzer.c: $(SQLITE3C) $(TOP)\src\test_stat.c $(TOP)\src\tclsqlite.c $(TOP)\tool\spaceanal.tcl
|
||||
copy $(SQLITE3C) + $(TOP)\src\test_stat.c + $(TOP)\src\tclsqlite.c $@
|
||||
echo static const char *tclsh_main_loop(void){ >> $@
|
||||
|
18
manifest
18
manifest
@ -1,9 +1,9 @@
|
||||
C Remove\san\sincorrect\sassert()\sstatement\sfrom\ssqlite3Fts3Dequote().
|
||||
D 2015-04-15T09:16:39.633
|
||||
C Add\sthe\s--msvc\scommand-line\soption\sto\sthe\sreleasetest.tcl\sscript.\s\sThis\sis\nonly\sa\spartial\smerge\sfrom\sthe\swinTest\sbranch\sas\sthe\sOS_TRACE\schanges\sare\nomitted.
|
||||
D 2015-04-15T14:52:05.457
|
||||
F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f
|
||||
F Makefile.in 5f78b1ab81b64e7c57a75d170832443e66c0880a
|
||||
F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23
|
||||
F Makefile.msc 0078f5781538e07ea38683439f38d5f5ab79ab6e
|
||||
F Makefile.msc 11cb5361e34b80e9c5b417ed6a6deee099c5b5f3
|
||||
F Makefile.vxworks e1b65dea203f054e71653415bd8f96dcaed47858
|
||||
F README.md d58e3bebc0a4145e0f2a87994015fdb575a8e866
|
||||
F VERSION 2e244662b71e6e68a5c29b014ebc5b7564f4cc5a
|
||||
@ -160,7 +160,7 @@ F mptest/config01.test 3c6adcbc50b991866855f1977ff172eb6d901271
|
||||
F mptest/config02.test 4415dfe36c48785f751e16e32c20b077c28ae504
|
||||
F mptest/crash01.test 61e61469e257df0850df4293d7d4d6c2af301421
|
||||
F mptest/crash02.subtest f4ef05adcd15d60e5d2bd654204f2c008b519df8
|
||||
F mptest/mptest.c dae6de83eddac3ef97fc4111632f6066760f939a
|
||||
F mptest/mptest.c fca59f0a922e03f95ed17c44b1515ed37a841c81
|
||||
F mptest/multiwrite01.test dab5c5f8f9534971efce679152c5146da265222d
|
||||
F spec.template 86a4a43b99ebb3e75e6b9a735d5fd293a24e90ca
|
||||
F sqlite.pc.in 42b7bf0d02e08b9e77734a47798d1a55a9e0716b
|
||||
@ -812,7 +812,7 @@ F test/randexpr1.test eda062a97e60f9c38ae8d806b03b0ddf23d796df
|
||||
F test/rdonly.test 64e2696c322e3538df0b1ed624e21f9a23ed9ff8
|
||||
F test/regexp1.test 497ea812f264d12b6198d6e50a76be4a1973a9d8
|
||||
F test/reindex.test 44edd3966b474468b823d481eafef0c305022254
|
||||
F test/releasetest.tcl 13f401c10dd4fe1a2fb811ae6ed27fd7d1300d3c
|
||||
F test/releasetest.tcl a37cd82092c8be438255d65804b5951d6e3ecdae
|
||||
F test/resolver01.test 33abf37ff8335e6bf98f2b45a0af3e06996ccd9a
|
||||
F test/rollback.test 458fe73eb3ffdfdf9f6ba3e9b7350a6220414dea
|
||||
F test/rollback2.test fc14cf6d1a2b250d2735ef16124b971bce152f14
|
||||
@ -1250,7 +1250,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 fa0956edf866f48f448967836709a3ad822ff917
|
||||
R ae90fdb352a7af37163dde65a0adec8a
|
||||
U dan
|
||||
Z a5cd9462fba20ef05f7047cbd877b3d9
|
||||
P bd06eeb8d06237dc2d54d8a03e8bf525cb811c9e f664bfdc82597a4530d4f4938bb96557b43b171b
|
||||
R b50245239bcc99605991067d21ad645b
|
||||
U drh
|
||||
Z 4acea00deaa3e67c61c8980097c82958
|
||||
|
@ -1 +1 @@
|
||||
bd06eeb8d06237dc2d54d8a03e8bf525cb811c9e
|
||||
b8768f124ef7d79e500b60a3ede288d46a0f529d
|
@ -53,6 +53,13 @@
|
||||
# define GETPID getpid
|
||||
#endif
|
||||
|
||||
/* The directory separator character(s) */
|
||||
#if defined(_WIN32)
|
||||
# define isDirSep(c) (((c) == '/') || ((c) == '\\'))
|
||||
#else
|
||||
# define isDirSep(c) ((c) == '/')
|
||||
#endif
|
||||
|
||||
/* Mark a parameter as unused to suppress compiler warnings */
|
||||
#define UNUSED_PARAMETER(x) (void)x
|
||||
|
||||
@ -824,7 +831,7 @@ static void waitForClient(int iClient, int iTimeout, char *zErrPrefix){
|
||||
*/
|
||||
static char *filenameTail(char *z){
|
||||
int i, j;
|
||||
for(i=j=0; z[i]; i++) if( z[i]=='/' ) j = i+1;
|
||||
for(i=j=0; z[i]; i++) if( isDirSep(z[i]) ) j = i+1;
|
||||
return z+j;
|
||||
}
|
||||
|
||||
@ -1021,9 +1028,9 @@ static void runScript(
|
||||
char *zNewFile, *zNewScript;
|
||||
char *zToDel = 0;
|
||||
zNewFile = azArg[0];
|
||||
if( zNewFile[0]!='/' ){
|
||||
if( !isDirSep(zNewFile[0]) ){
|
||||
int k;
|
||||
for(k=(int)strlen(zFilename)-1; k>=0 && zFilename[k]!='/'; k--){}
|
||||
for(k=(int)strlen(zFilename)-1; k>=0 && !isDirSep(zFilename[k]); k--){}
|
||||
if( k>0 ){
|
||||
zNewFile = zToDel = sqlite3_mprintf("%.*s/%s", k,zFilename,zNewFile);
|
||||
}
|
||||
@ -1231,7 +1238,7 @@ static void usage(const char *argv0){
|
||||
int i;
|
||||
const char *zTail = argv0;
|
||||
for(i=0; argv0[i]; i++){
|
||||
if( argv0[i]=='/' ) zTail = argv0+i+1;
|
||||
if( isDirSep(argv0[i]) ) zTail = argv0+i+1;
|
||||
}
|
||||
fprintf(stderr,"Usage: %s DATABASE ?OPTIONS? ?SCRIPT?\n", zTail);
|
||||
exit(1);
|
||||
@ -1338,6 +1345,7 @@ int SQLITE_CDECL main(int argc, char **argv){
|
||||
#endif
|
||||
runSql("PRAGMA journal_mode=%Q;", zJMode);
|
||||
}
|
||||
if( !g.bSync ) trySql("PRAGMA synchronous=OFF");
|
||||
sqlite3_enable_load_extension(g.db, 1);
|
||||
sqlite3_busy_handler(g.db, busyHandler, 0);
|
||||
sqlite3_create_function(g.db, "vfsname", 0, SQLITE_UTF8, 0,
|
||||
@ -1346,7 +1354,6 @@ int SQLITE_CDECL main(int argc, char **argv){
|
||||
evalFunc, 0, 0);
|
||||
g.iTimeout = DEFAULT_TIMEOUT;
|
||||
if( g.bSqlTrace ) sqlite3_trace(g.db, sqlTraceCallback, 0);
|
||||
if( !g.bSync ) trySql("PRAGMA synchronous=OFF");
|
||||
if( iClient>0 ){
|
||||
if( n>0 ) unrecognizedArguments(argv[0], n, argv+2);
|
||||
if( g.iTrace ) logMessage("start-client");
|
||||
|
@ -14,6 +14,7 @@ optional) are:
|
||||
--config CONFIGNAME (Run only CONFIGNAME)
|
||||
--quick (Run "veryquick.test" only)
|
||||
--veryquick (Run "make smoketest" only)
|
||||
--msvc (Use MSVC as the compiler)
|
||||
--buildonly (Just build testfixture - do not run)
|
||||
--dryrun (Print what would have happened)
|
||||
--info (Show diagnostic info)
|
||||
@ -22,8 +23,9 @@ The default value for --srcdir is the parent of the directory holding
|
||||
this script.
|
||||
|
||||
The script determines the default value for --platform using the
|
||||
$tcl_platform(os) and $tcl_platform(machine) variables. Supported
|
||||
platforms are "Linux-x86", "Linux-x86_64" and "Darwin-i386".
|
||||
$tcl_platform(os) and $tcl_platform(machine) variables. Supported
|
||||
platforms are "Linux-x86", "Linux-x86_64", "Darwin-i386",
|
||||
"Darwin-x86_64", "Windows NT-intel", and "Windows NT-amd64".
|
||||
|
||||
Every test begins with a fresh run of the configure script at the top
|
||||
of the SQLite source tree.
|
||||
@ -238,6 +240,10 @@ array set ::Platforms [strip_comments {
|
||||
"Default" "mptest fulltestonly"
|
||||
"Have-Not" test
|
||||
}
|
||||
"Windows NT-amd64" {
|
||||
"Default" "mptest fulltestonly"
|
||||
"Have-Not" test
|
||||
}
|
||||
|
||||
# The Failure-Detection platform runs various tests that deliberately
|
||||
# fail. This is used as a test of this script to verify that this script
|
||||
@ -296,6 +302,13 @@ proc count_tests_and_errors {logfile rcVar errmsgVar} {
|
||||
set errmsg $msg
|
||||
}
|
||||
}
|
||||
if {[regexp {fatal error +(.*)} $line all msg]} {
|
||||
incr ::NERRCASE
|
||||
if {$rc==0} {
|
||||
set rc 1
|
||||
set errmsg $msg
|
||||
}
|
||||
}
|
||||
if {[regexp {ERROR SUMMARY: (\d+) errors.*} $line all cnt] && $cnt>0} {
|
||||
incr ::NERRCASE
|
||||
if {$rc==0} {
|
||||
@ -314,7 +327,13 @@ proc count_tests_and_errors {logfile rcVar errmsgVar} {
|
||||
}
|
||||
}
|
||||
close $fd
|
||||
if {!$seen} {
|
||||
if {$::BUILDONLY} {
|
||||
if {$rc==0} {
|
||||
set errmsg "Build complete"
|
||||
} else {
|
||||
set errmsg "Build failed"
|
||||
}
|
||||
} elseif {!$seen} {
|
||||
set rc 1
|
||||
set errmsg "Test did not complete"
|
||||
if {[file readable core]} {
|
||||
@ -329,7 +348,7 @@ proc run_test_suite {name testtarget config} {
|
||||
# CFLAGS. The makefile will pass OPTS to both gcc and lemon, but
|
||||
# CFLAGS is only passed to gcc.
|
||||
#
|
||||
set cflags "-g"
|
||||
set cflags [expr {$::MSVC ? "-Zi" : "-g"}]
|
||||
set opts ""
|
||||
set title ${name}($testtarget)
|
||||
set configOpts ""
|
||||
@ -349,7 +368,14 @@ proc run_test_suite {name testtarget config} {
|
||||
|
||||
set cflags [join $cflags " "]
|
||||
set opts [join $opts " "]
|
||||
append opts " -DSQLITE_NO_SYNC=1 -DHAVE_USLEEP"
|
||||
append opts " -DSQLITE_NO_SYNC=1"
|
||||
|
||||
# Some configurations already set HAVE_USLEEP; in that case, skip it.
|
||||
#
|
||||
if {![regexp { -DHAVE_USLEEP$} $opts]
|
||||
&& ![regexp { -DHAVE_USLEEP[ =]+} $opts]} {
|
||||
append opts " -DHAVE_USLEEP=1"
|
||||
}
|
||||
|
||||
# Set the sub-directory to use.
|
||||
#
|
||||
@ -390,10 +416,10 @@ proc run_test_suite {name testtarget config} {
|
||||
if {$rc} {
|
||||
puts " FAIL $tm"
|
||||
incr ::NERR
|
||||
if {$errmsg!=""} {puts " $errmsg"}
|
||||
} else {
|
||||
puts " Ok $tm"
|
||||
}
|
||||
if {$errmsg!=""} {puts " $errmsg"}
|
||||
}
|
||||
}
|
||||
|
||||
@ -401,6 +427,7 @@ proc run_test_suite {name testtarget config} {
|
||||
# the current platform, which may be Windows (via MinGW, etc).
|
||||
#
|
||||
proc configureCommand {opts} {
|
||||
if {$::MSVC} return [list]; # This is not needed for MSVC.
|
||||
set result [list trace_cmd exec]
|
||||
if {$::tcl_platform(platform)=="windows"} {
|
||||
lappend result sh
|
||||
@ -414,7 +441,14 @@ proc configureCommand {opts} {
|
||||
# specified targets, compiler flags, and options.
|
||||
#
|
||||
proc makeCommand { targets cflags opts } {
|
||||
set result [list trace_cmd exec make clean]
|
||||
set result [list trace_cmd exec]
|
||||
if {$::MSVC} {
|
||||
set nmakeDir [file nativename $::SRCDIR]
|
||||
set nmakeFile [file join $nmakeDir Makefile.msc]
|
||||
lappend result nmake /f $nmakeFile TOP=$nmakeDir clean
|
||||
} else {
|
||||
lappend result make clean
|
||||
}
|
||||
foreach target $targets {
|
||||
lappend result $target
|
||||
}
|
||||
@ -443,6 +477,7 @@ proc trace_cmd {args} {
|
||||
proc process_options {argv} {
|
||||
set ::SRCDIR [file normalize [file dirname [file dirname $::argv0]]]
|
||||
set ::QUICK 0
|
||||
set ::MSVC 0
|
||||
set ::BUILDONLY 0
|
||||
set ::DRYRUN 0
|
||||
set ::EXEC exec
|
||||
@ -476,6 +511,10 @@ proc process_options {argv} {
|
||||
set config [lindex $argv $i]
|
||||
}
|
||||
|
||||
-msvc {
|
||||
set ::MSVC 1
|
||||
}
|
||||
|
||||
-buildonly {
|
||||
set ::BUILDONLY 1
|
||||
}
|
||||
@ -494,6 +533,7 @@ proc process_options {argv} {
|
||||
puts " --platform [list $platform]"
|
||||
puts " --config [list $config]"
|
||||
if {$::QUICK} {puts " --quick"}
|
||||
if {$::MSVC} {puts " --msvc"}
|
||||
if {$::BUILDONLY} {puts " --buildonly"}
|
||||
if {$::DRYRUN} {puts " --dryrun"}
|
||||
if {$::TRACE} {puts " --trace"}
|
||||
@ -507,7 +547,15 @@ proc process_options {argv} {
|
||||
}
|
||||
exit
|
||||
}
|
||||
-g -
|
||||
|
||||
-g {
|
||||
if {$::MSVC} {
|
||||
lappend ::EXTRACONFIG -Zi
|
||||
} else {
|
||||
lappend ::EXTRACONFIG [lindex $argv $i]
|
||||
}
|
||||
}
|
||||
|
||||
-D* -
|
||||
-O* -
|
||||
-enable-* -
|
||||
@ -547,6 +595,7 @@ proc process_options {argv} {
|
||||
puts -nonewline "Flags:"
|
||||
if {$::DRYRUN} {puts -nonewline " --dryrun"}
|
||||
if {$::BUILDONLY} {puts -nonewline " --buildonly"}
|
||||
if {$::MSVC} {puts -nonewline " --msvc"}
|
||||
switch -- $::QUICK {
|
||||
1 {puts -nonewline " --quick"}
|
||||
2 {puts -nonewline " --veryquick"}
|
||||
@ -570,12 +619,20 @@ proc main {argv} {
|
||||
set ::SQLITE_VERSION {}
|
||||
set STARTTIME [clock seconds]
|
||||
foreach {zConfig target} $::CONFIGLIST {
|
||||
if {$::MSVC && ($zConfig eq "Sanitize" || "checksymbols" in $target
|
||||
|| "valgrindtest" in $target)} {
|
||||
puts "Skipping $zConfig / $target for MSVC..."
|
||||
continue
|
||||
}
|
||||
if {$target ne "checksymbols"} {
|
||||
switch -- $::QUICK {
|
||||
1 {set target test}
|
||||
2 {set target smoketest}
|
||||
}
|
||||
if {$::BUILDONLY} {set target testfixture}
|
||||
if {$::BUILDONLY} {
|
||||
set target testfixture
|
||||
if {$::MSVC} {append target .exe}
|
||||
}
|
||||
}
|
||||
set config_options [concat $::Configs($zConfig) $::EXTRACONFIG]
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user