| Index: third_party/sqlite/src/tool/omittest.tcl
|
| diff --git a/third_party/sqlite/src/tool/omittest.tcl b/third_party/sqlite/src/tool/omittest.tcl
|
| index f1963ff13dd005c80f6cfc6a88adc1deb0479701..5437f2eb01e5ad493fbb8b66d7b417337236fcc6 100644
|
| --- a/third_party/sqlite/src/tool/omittest.tcl
|
| +++ b/third_party/sqlite/src/tool/omittest.tcl
|
| @@ -31,8 +31,8 @@ should work. The following properties are required:
|
|
|
| More precisely, the following two invocations must be supported:
|
|
|
| - make -f $::MAKEFILE testfixture OPTS="-DSQLITE_OMIT_ALTERTABLE=1"
|
| - make -f $::MAKEFILE test
|
| + $::MAKEBIN -f $::MAKEFILE testfixture OPTS="-DSQLITE_OMIT_ALTERTABLE=1"
|
| + $::MAKEBIN -f $::MAKEFILE test
|
|
|
| Makefiles generated by the sqlite configure program cannot be used as
|
| they do not respect the OPTS variable.
|
| @@ -48,19 +48,16 @@ they do not respect the OPTS variable.
|
| #
|
| #
|
| proc run_quick_test {dir omit_symbol_list} {
|
| - set target "testfixture"
|
| # Compile the value of the OPTS Makefile variable.
|
| - set opts "-DSQLITE_MEMDEBUG -DSQLITE_DEBUG -DSQLITE_NO_SYNC"
|
| + set opts ""
|
| if {$::tcl_platform(platform)=="windows"} {
|
| - append opts " -DSQLITE_OS_WIN=1"
|
| + append opts "OPTS += -DSQLITE_OS_WIN=1\n"
|
| set target "testfixture.exe"
|
| - } elseif {$::tcl_platform(platform)=="os2"} {
|
| - append opts " -DSQLITE_OS_OS2=1"
|
| } else {
|
| - append opts " -DSQLITE_OS_UNIX=1"
|
| + append opts "OPTS += -DSQLITE_OS_UNIX=1\n"
|
| }
|
| foreach sym $omit_symbol_list {
|
| - append opts " -D${sym}=1"
|
| + append opts "OPTS += -D${sym}=1\n"
|
| }
|
|
|
| # Create the directory and do the build. If an error occurs return
|
| @@ -68,12 +65,20 @@ proc run_quick_test {dir omit_symbol_list} {
|
| file mkdir $dir
|
| puts -nonewline "Building $dir..."
|
| flush stdout
|
| -catch {
|
| - file copy -force ./config.h $dir
|
| - file copy -force ./libtool $dir
|
| -}
|
| + catch {
|
| + file copy -force ./config.h $dir
|
| + file copy -force ./libtool $dir
|
| + }
|
| + set fd [open $::MAKEFILE]
|
| + set mkfile [read $fd]
|
| + close $fd
|
| + regsub {\ninclude} $mkfile "\n$opts\ninclude" mkfile
|
| + set fd [open $dir/makefile w]
|
| + puts $fd $mkfile
|
| + close $fd
|
| +
|
| set rc [catch {
|
| - exec make -C $dir -f $::MAKEFILE $target OPTS=$opts >& $dir/build.log
|
| + exec $::MAKEBIN -C $dir -f makefile clean $::TARGET >& $dir/build.log
|
| }]
|
| if {$rc} {
|
| puts "No good. See $dir/build.log."
|
| @@ -86,7 +91,7 @@ catch {
|
| # of trying to build the sqlite shell. The sqlite shell won't build
|
| # with some of the OMIT options (i.e OMIT_COMPLETE).
|
| set sqlite3_dummy $dir/sqlite3
|
| - if {$::tcl_platform(platform)=="windows" || $::tcl_platform(platform)=="os2"} {
|
| + if {$::tcl_platform(platform)=="windows"} {
|
| append sqlite3_dummy ".exe"
|
| }
|
| if {![file exists $sqlite3_dummy]} {
|
| @@ -102,7 +107,7 @@ catch {
|
| puts -nonewline "Testing $dir..."
|
| flush stdout
|
| set rc [catch {
|
| - exec make -C $dir -f $::MAKEFILE test OPTS=$opts >& $dir/test.log
|
| + exec $::MAKEBIN -C $dir -f makefile test >& $dir/test.log
|
| }]
|
| if {$rc} {
|
| puts "No good. See $dir/test.log."
|
| @@ -119,12 +124,14 @@ catch {
|
| # option.
|
| #
|
| proc process_options {argv} {
|
| - if {$::tcl_platform(platform)=="windows" || $::tcl_platform(platform)=="os2"} {
|
| - set ::MAKEFILE ./Makefile ;# Default value
|
| + set ::MAKEBIN make ;# Default value
|
| + if {$::tcl_platform(platform)=="windows"} {
|
| + set ::MAKEFILE ./Makefile ;# Default value on Windows
|
| } else {
|
| set ::MAKEFILE ./Makefile.linux-gcc ;# Default value
|
| }
|
| set ::SKIP_RUN 0 ;# Default to attempt test
|
| + set ::TARGET testfixture ;# Default thing to build
|
|
|
| for {set i 0} {$i < [llength $argv]} {incr i} {
|
| switch -- [lindex $argv $i] {
|
| @@ -133,6 +140,16 @@ proc process_options {argv} {
|
| set ::MAKEFILE [lindex $argv $i]
|
| }
|
|
|
| + -nmake {
|
| + set ::MAKEBIN nmake
|
| + set ::MAKEFILE ./Makefile.msc
|
| + }
|
| +
|
| + -target {
|
| + incr i
|
| + set ::TARGET [lindex $argv $i]
|
| + }
|
| +
|
| -skip_run {
|
| set ::SKIP_RUN 1
|
| }
|
| @@ -173,10 +190,10 @@ proc main {argv} {
|
| SQLITE_OMIT_COMPILEOPTION_DIAGS \
|
| SQLITE_OMIT_COMPLETE \
|
| SQLITE_OMIT_COMPOUND_SELECT \
|
| + SQLITE_OMIT_CTE \
|
| SQLITE_OMIT_DATETIME_FUNCS \
|
| SQLITE_OMIT_DECLTYPE \
|
| SQLITE_OMIT_DEPRECATED \
|
| - xxxSQLITE_OMIT_DISKIO \
|
| SQLITE_OMIT_EXPLAIN \
|
| SQLITE_OMIT_FLAG_PRAGMAS \
|
| SQLITE_OMIT_FLOATING_POINT \
|
| @@ -218,15 +235,11 @@ proc main {argv} {
|
| SQLITE_DISABLE_DIRSYNC \
|
| SQLITE_DISABLE_LFS \
|
| SQLITE_ENABLE_ATOMIC_WRITE \
|
| - xxxSQLITE_ENABLE_CEROD \
|
| SQLITE_ENABLE_COLUMN_METADATA \
|
| SQLITE_ENABLE_EXPENSIVE_ASSERT \
|
| - xxxSQLITE_ENABLE_FTS1 \
|
| - xxxSQLITE_ENABLE_FTS2 \
|
| SQLITE_ENABLE_FTS3 \
|
| SQLITE_ENABLE_FTS3_PARENTHESIS \
|
| SQLITE_ENABLE_FTS4 \
|
| - xxxSQLITE_ENABLE_ICU \
|
| SQLITE_ENABLE_IOTRACE \
|
| SQLITE_ENABLE_LOAD_EXTENSION \
|
| SQLITE_ENABLE_LOCKING_STYLE \
|
| @@ -235,7 +248,7 @@ proc main {argv} {
|
| SQLITE_ENABLE_MEMSYS5 \
|
| SQLITE_ENABLE_OVERSIZE_CELL_CHECK \
|
| SQLITE_ENABLE_RTREE \
|
| - SQLITE_ENABLE_STAT2 \
|
| + SQLITE_ENABLE_STAT3 \
|
| SQLITE_ENABLE_UNLOCK_NOTIFY \
|
| SQLITE_ENABLE_UPDATE_DELETE_LIMIT \
|
| ]
|
| @@ -251,7 +264,7 @@ proc main {argv} {
|
| exit -1
|
| }
|
|
|
| - set dirname "test_[string range $sym 7 end]"
|
| + set dirname "test_[regsub -nocase {^x*SQLITE_} $sym {}]"
|
| run_quick_test $dirname $sym
|
| } else {
|
| # First try a test with all OMIT symbols except SQLITE_OMIT_FLOATING_POINT
|
| @@ -270,14 +283,14 @@ proc main {argv} {
|
| # are the OMIT_FLOATING_POINT and OMIT_PRAGMA symbols, even though we
|
| # know they will fail. It's good to be reminded of this from time to time.
|
| foreach sym $::OMIT_SYMBOLS {
|
| - set dirname "test_[string range $sym 7 end]"
|
| + set dirname "test_[regsub -nocase {^x*SQLITE_} $sym {}]"
|
| run_quick_test $dirname $sym
|
| }
|
|
|
| # Try the ENABLE/DISABLE symbols one at a time.
|
| # We don't do them all at once since some are conflicting.
|
| foreach sym $::ENABLE_SYMBOLS {
|
| - set dirname "test_[string range $sym 7 end]"
|
| + set dirname "test_[regsub -nocase {^x*SQLITE_} $sym {}]"
|
| run_quick_test $dirname $sym
|
| }
|
| }
|
|
|