]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Changes so that wapptest.tcl still works.
authordan <Dan Kennedy>
Sat, 4 Feb 2023 18:58:51 +0000 (18:58 +0000)
committerdan <Dan Kennedy>
Sat, 4 Feb 2023 18:58:51 +0000 (18:58 +0000)
FossilOrigin-Name: 7624de3a93e03e9e825b1a283ccde8ad3aa41f93dd5c7f63692620a5177cbda9

manifest
manifest.uuid
test/releasetest_data.tcl
test/testrunner.tcl

index 469886b0788987e84db4afdd87167f9b2cd24364..804d0328a516a1efda6ab1968624ca40c1e4f17c 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C Update\stestrunner.tcl\susage\smessage.
-D 2023-02-04T18:50:16.382
+C Changes\sso\sthat\swapptest.tcl\sstill\sworks.
+D 2023-02-04T18:58:51.968
 F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1
 F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea
 F LICENSE.md df5091916dbb40e6e9686186587125e1b2ff51f022cc334e886c19a0e9982724
@@ -1402,7 +1402,7 @@ F test/recover.test fd5199f928757cb308661b5fdca1abc19398a798ff7f24b57c3071e9f8e0
 F test/regexp1.test 8f2a8bc1569666e29a4cee6c1a666cd224eb6d50e2470d1dc1df995170f3e0f1
 F test/regexp2.test 55ed41da802b0e284ac7e2fe944be3948f93ff25abbca0361a609acfed1368b5
 F test/reindex.test cd9d6021729910ece82267b4f5e1b5ac2911a7566c43b43c176a6a4732e2118d
-F test/releasetest_data.tcl de367fbf4882cf251052b82f40ebf99aa9bc97262c8fec874b00a4f873635740
+F test/releasetest_data.tcl b550dd1b122a9c969df794d05ea272df535f10ff1a245062e7ba080822378016
 F test/resetdb.test 54c06f18bc832ac6d6319e5ab23d5c8dd49fdbeec7c696d791682a8006bd5fc3
 F test/resolver01.test f4022acafda7f4d40eca94dbf16bc5fc4ac30ceb
 F test/returning1.test 3ef7b264598b3292be0cdb028e4acb7524c5fd409b33b78449f894dfd68db334
@@ -1565,7 +1565,7 @@ F test/temptable2.test 76821347810ecc88203e6ef0dd6897b6036ac788e9dd3e6b04fd4d163
 F test/temptable3.test d11a0974e52b347e45ee54ef1923c91ed91e4637
 F test/temptrigger.test 38f0ca479b1822d3117069e014daabcaacefffcc
 F test/tester.tcl 8d54d40a55e12554b4509bc12078b201b233c8e842a7543629094a21b1ba956d
-F test/testrunner.tcl f34859747ce2b5df6d90582f01a718322313e558b00df2b4f22ad7c318b16f94
+F test/testrunner.tcl d897f93dd316f3f01449632b5342534b8cf0e63e4131fa3f540086819a9055c1
 F test/testrunner_data.tcl 8169c68654ac8906833b8a6aadca973358a441ebf88270dd05c153e5f96f76b8
 F test/thread001.test a0985c117eab62c0c65526e9fa5d1360dd1cac5b03bde223902763274ce21899
 F test/thread002.test c24c83408e35ba5a952a3638b7ac03ccdf1ce4409289c54a050ac4c5f1de7502
@@ -2047,8 +2047,8 @@ F vsixtest/vsixtest.tcl 6a9a6ab600c25a91a7acc6293828957a386a8a93
 F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc
 F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e
 F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0
-P 3869cd3d306ed68ec6e118aa10b4e835f2bab1294039888d88a30b3cfcf1d7be
-R cc64ef75c467e4a19cf3e3c7b8fcf2d0
+P b7c246bc3f462098f6281ee2cd2e4e870b6d6481263d277f04956596a4764558
+R f933a6cec27cc33482a496132f4e69ae
 U dan
-Z 421e2cf7c8b9663b047d2092e795fbea
+Z 2c907adb6f420a19cc675dd66226864c
 # Remove this line to create a well-formed Fossil manifest.
index 992ec494309d4be2d0341fe75d527fa187a8976e..97f40d2aebd5249c678c3e708421bde5703ae539 100644 (file)
@@ -1 +1 @@
-b7c246bc3f462098f6281ee2cd2e4e870b6d6481263d277f04956596a4764558
\ No newline at end of file
+7624de3a93e03e9e825b1a283ccde8ad3aa41f93dd5c7f63692620a5177cbda9
\ No newline at end of file
index 5529dca12dafadf406c73d132e6e97d10cba5532..2f4e71e8cef622d70de6f8e691490f9546c9164f 100644 (file)
@@ -408,6 +408,169 @@ proc main_platforms {} {
 }
 
 proc main_script {args} {
+  set bMsvc 0
+  set nArg [llength $args]
+  if {$nArg==3} {
+    if {![is_prefix [lindex $args 0] -msvc 2]} usage
+    set bMsvc 1
+  } elseif {$nArg<2 || $nArg>3} {
+    usage
+  }
+  set config [lindex $args end-1]
+  set target [lindex $args end]
+
+  set opts       [list]                         ;# OPTS value
+  set cflags     [expr {$bMsvc ? "-Zi" : "-g"}] ;# CFLAGS value
+  set makeOpts   [list]                         ;# Extra args for [make]
+  set configOpts [list]                         ;# Extra args for [configure]
+
+  if {$::tcl_platform(platform)=="windows" || $bMsvc} {
+    lappend opts -DSQLITE_OS_WIN=1
+  } else {
+    lappend opts -DSQLITE_OS_UNIX=1
+  }
+
+  # Figure out if this is a synthetic ndebug or debug configuration.
+  #
+  set bRemoveDebug 0
+  if {[string match *-ndebug $config]} {
+    set bRemoveDebug 1
+    set config [string range $config 0 end-7]
+  }
+  if {[string match *-debug $config]} {
+    lappend opts -DSQLITE_DEBUG
+    lappend opts -DSQLITE_EXTRA_IFNULLROW
+    set config [string range $config 0 end-6]
+  }
+  regexp {^(.*)-[0-9]+} $config -> config
+
+  # Ensure that the named configuration exists.
+  #
+  if {![info exists ::Configs($config)]} {
+    puts stderr "No such config: $config"
+    exit 1
+  }
+
+  # Loop through the parameters of the nominated configuration, updating
+  # $opts, $cflags, $makeOpts and $configOpts along the way. Rules are as
+  # follows:
+  #
+  #   1. If the parameter begins with a "*", discard it.
+  #
+  #   2. If $bRemoveDebug is set and the parameter is -DSQLITE_DEBUG or
+  #      -DSQLITE_DEBUG=1, discard it
+  #
+  #   3. If the parameter begins with "-D", add it to $opts.
+  #
+  #   4. If the parameter begins with "--" add it to $configOpts. Unless
+  #      this command is preparing a script for MSVC - then add an 
+  #      equivalent to $makeOpts or $opts.
+  #
+  #   5. If the parameter begins with "-" add it to $cflags. If in MSVC
+  #      mode and the parameter is an -O<integer> option, instead add
+  #      an OPTIMIZATIONS=<integer> switch to $makeOpts.
+  #
+  #   6. If none of the above apply, add the parameter to $makeOpts
+  #
+  foreach param $::Configs($config) {
+    if {[string range $param 0 0]=="*"} continue
+
+    if {$bRemoveDebug} {
+      if {$param=="-DSQLITE_DEBUG" || $param=="-DSQLITE_DEBUG=1"
+       || $param=="-DSQLITE_MEMDEBUG" || $param=="-DSQLITE_MEMDEBUG=1"
+       || $param=="--enable-debug"
+      } {
+        continue
+      }
+    }
+
+    if {[string range $param 0 1]=="-D"} {
+      lappend opts $param
+      continue
+    }
+
+    if {[string range $param 0 1]=="--"} {
+      if {$bMsvc} {
+        switch -- $param {
+          --disable-amalgamation {
+            lappend makeOpts USE_AMALGAMATION=0
+          }
+          --disable-shared {
+            lappend makeOpts USE_CRT_DLL=0 DYNAMIC_SHELL=0
+          }
+          --enable-fts5 {
+            lappend opts -DSQLITE_ENABLE_FTS5
+          } 
+          --enable-shared {
+            lappend makeOpts USE_CRT_DLL=1 DYNAMIC_SHELL=1
+          }
+          --enable-session {
+            lappend opts -DSQLITE_ENABLE_PREUPDATE_HOOK
+            lappend opts -DSQLITE_ENABLE_SESSION
+          }
+          default {
+            error "Cannot translate $param for MSVC"
+          }
+        }
+      } else {
+        lappend configOpts $param
+      }
+
+      continue
+    }
+
+    if {[string range $param 0 0]=="-"} {
+      if {$bMsvc && [regexp -- {^-O(\d+)$} $param -> level]} {
+        lappend makeOpts OPTIMIZATIONS=$level
+      } else {
+        lappend cflags $param
+      }
+      continue
+    }
+
+    lappend makeOpts $param
+  }
+
+  # Some configurations specify -DHAVE_USLEEP=0. For all others, add
+  # -DHAVE_USLEEP=1.
+  #
+  if {[lsearch $opts "-DHAVE_USLEEP=0"]<0} {
+    lappend opts -DHAVE_USLEEP=1
+  }
+
+  if {$bMsvc==0} {
+    puts {set -e}
+    puts {}
+    puts {if [ "$#" -ne 1 ] ; then}
+    puts {  echo "Usage: $0 <sqlite-src-dir>" }
+    puts {  exit -1 }
+    puts {fi }
+    puts {SRCDIR=$1}
+    puts {}
+    puts "TCL=\"[::tcl::pkgconfig get libdir,install]\""
+
+    puts "\$SRCDIR/configure --with-tcl=\$TCL $configOpts"
+    puts {}
+    puts {OPTS="      -DSQLITE_NO_SYNC=1"}
+    foreach o $opts { 
+      puts "OPTS=\"\$OPTS $o\"" 
+    }
+    puts {}
+    puts "CFLAGS=\"$cflags\""
+    puts {}
+    puts "make $target \"CFLAGS=\$CFLAGS\" \"OPTS=\$OPTS\" $makeOpts"
+  } else {
+
+    puts {set SRCDIR=%1}
+    set makecmd    "nmake /f %SRCDIR%\\Makefile.msc TOP=%SRCDIR% $target "
+    append makecmd "\"CFLAGS=$cflags\" \"OPTS=$opts\" $makeOpts"
+
+    puts "set TMP=%CD%"
+    puts $makecmd
+  }
+}
+
+proc main_trscript {args} {
   set bMsvc 0
   set nArg [llength $args]
   if {$nArg==3} {
@@ -653,6 +816,8 @@ if {[string match ${cmd}* configurations] && $n==0} {
   main_configurations 
 } elseif {[string match ${cmd}* script]} {
   main_script {*}[lrange $argv 1 end]
+} elseif {[string match ${cmd}* trscript]} {
+  main_trscript {*}[lrange $argv 1 end]
 } elseif {[string match ${cmd}* platforms] && $n==0} {
   main_platforms
 } elseif {[string match ${cmd}* tests]} {
index 3b3db85b27eb6137a841a621a24665d51c918288..0522391b3dfb9a6eb62cc200824bf458398f41f2 100644 (file)
@@ -682,7 +682,7 @@ proc launch_another_job {iJob} {
 
     set     cmd [info nameofexec]
     lappend cmd [file join $testdir releasetest_data.tcl]
-    lappend cmd script
+    lappend cmd trscript
     if {$TRG(platform)=="win"} { lappend cmd -msvc }
     lappend cmd $b $srcdir