]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Another fix for valgrind permutation. Remove the "copydir" table column - just add...
authordan <Dan Kennedy>
Mon, 28 Aug 2023 16:28:00 +0000 (16:28 +0000)
committerdan <Dan Kennedy>
Mon, 28 Aug 2023 16:28:00 +0000 (16:28 +0000)
FossilOrigin-Name: 448b9a575e66960a0885864f88b99b6ea15655c77a42eef956c09c8dc70e539a

manifest
manifest.uuid
test/testrunner.tcl

index d2716b35cf9c1983e3e824754e0286d9891827f2..e558f78445ceacb32510de6c6c406733347fe79b 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C Fix\sthe\svalgrind\spermutation\son\sthis\sbranch.
-D 2023-08-28T11:22:33.500
+C Another\sfix\sfor\svalgrind\spermutation.\sRemove\sthe\s"copydir"\stable\scolumn\s-\sjust\sadd\sa\s[cp]\sor\s[copy]\scommand\sto\sthe\stest\sscript\swhere\sthis\sfunctionality\sis\srequired.
+D 2023-08-28T16:28:00.788
 F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1
 F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea
 F LICENSE.md df5091916dbb40e6e9686186587125e1b2ff51f022cc334e886c19a0e9982724
@@ -1615,7 +1615,7 @@ F test/temptable2.test 76821347810ecc88203e6ef0dd6897b6036ac788e9dd3e6b04fd4d163
 F test/temptable3.test d11a0974e52b347e45ee54ef1923c91ed91e4637
 F test/temptrigger.test 38f0ca479b1822d3117069e014daabcaacefffcc
 F test/tester.tcl 68454ef88508c196d19e8694daa27bff7107a91857799eaa12f417188ae53ede
-F test/testrunner.tcl 80b2145f2b12b87dada28b7bbbd6d7fa4d977fd9edae9c8a467beaa9c39ffee3
+F test/testrunner.tcl 139d4bfb5acd8b3bf45dbc3706c5fa4d226664d2540d5ccd3b4cf1034891fa01
 F test/testrunner_data.tcl fdcc95d995fd1ef8bbaac1bc105988016213037038161bb555100439793ada18
 F test/thread001.test a0985c117eab62c0c65526e9fa5d1360dd1cac5b03bde223902763274ce21899
 F test/thread002.test c24c83408e35ba5a952a3638b7ac03ccdf1ce4409289c54a050ac4c5f1de7502
@@ -2104,8 +2104,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 7596ea7074e0ac73312586ed3d28cdacf97f54b8af73f804cbc8066c94d4b4ef
-R 79b21140462787dad9fdf55bfe6215a6
+P ccbf06760e8377f9209ba3fd4895a25fe1a5ea688c384bf357e765b6a2b4c2f7
+R ccaea0ec1aaf4f06cc5606ae7b37bb7e
 U dan
-Z 5201645988ec9c127b26b5c606008acf
+Z 7dad289e4c25c548365d88153d7b3fb1
 # Remove this line to create a well-formed Fossil manifest.
index 7b9c91a1e8b99a2974220d1767bec80961c33c9c..c89f16686a4a97855daa70418ed8c363555c265c 100644 (file)
@@ -1 +1 @@
-ccbf06760e8377f9209ba3fd4895a25fe1a5ea688c384bf357e765b6a2b4c2f7
\ No newline at end of file
+448b9a575e66960a0885864f88b99b6ea15655c77a42eef956c09c8dc70e539a
\ No newline at end of file
index 92e7ff1bcc8246a9bac412e72fc26478cec163a9..8d1a739c23e21e40f258d162a30c7e8a3e52645a 100644 (file)
@@ -155,18 +155,24 @@ switch -nocase -glob -- $tcl_platform(os) {
     set TRG(make)        make.sh
     set TRG(makecmd)     "bash make.sh"
     set TRG(testfixture) testfixture
+    set TRG(run)         run.sh
+    set TRG(runcmd)      "bash run.sh"
   }
   *linux* {
     set TRG(platform)    linux
     set TRG(make)        make.sh
     set TRG(makecmd)     "bash make.sh"
     set TRG(testfixture) testfixture
+    set TRG(run)         run.sh
+    set TRG(runcmd)      "bash run.sh"
   }
   *win* {
     set TRG(platform)    win
     set TRG(make)        make.bat
     set TRG(makecmd)     make.bat
     set TRG(testfixture) testfixture.exe
+    set TRG(run)         run.bat
+    set TRG(runcmd)      "run.bat"
   }
   default {
     error "cannot determine platform!"
@@ -187,14 +193,13 @@ set TRG(schema) {
   */
   CREATE TABLE jobs(
     /* Fields populated when db is initialized */
-    jobid INTEGER PRIMARY KEY,      -- id to identify job
-    displaytype TEXT NOT NULL,      -- Type of test (for one line report)
+    jobid INTEGER PRIMARY KEY,          -- id to identify job
+    displaytype TEXT NOT NULL,          -- Type of test (for one line report)
     displayname TEXT NOT NULL,          -- Human readable job name
     build TEXT NOT NULL DEFAULT '',     -- make.sh/make.bat file request, if any
     dirname TEXT NOT NULL DEFAULT '',   -- directory name, if required
     cmd TEXT NOT NULL,                  -- shell command to run
     depid INTEGER,                      -- identifier of dependency (or '')
-    copydir TEXT,                       -- copy files from here
     priority INTEGER NOT NULL,          -- higher priority jobs may run earlier
   
     /* Fields updated as jobs run */
@@ -458,12 +463,6 @@ proc create_or_clear_dir {dir} {
   }
 }
 
-proc copy_dir {from to} {
-  foreach f [glob -nocomplain [file join $from *]] {
-    catch { file copy -force $f $to }
-  }
-}
-
 proc build_to_dirname {bname} {
   set fold [string tolower [string map {- _} $bname]]
   return "testrunner_build_$fold"
@@ -531,7 +530,6 @@ proc r_get_next_job {iJob} {
 #   -dirname     
 #   -cmd 
 #   -depid 
-#   -copydir 
 #   -priority 
 #
 # Returns the jobid value for the new job.
@@ -540,13 +538,12 @@ proc add_job {args} {
 
   set options {
       -displaytype -displayname -build -dirname 
-      -cmd -depid -copydir -priority
+      -cmd -depid -priority
   }
 
   # Set default values of options.
   set A(-dirname) ""
   set A(-depid)   ""
-  set A(-copydir)  ""
   set A(-priority) 0
   set A(-build)   ""
 
@@ -565,7 +562,7 @@ proc add_job {args} {
 
   trdb eval {
     INSERT INTO jobs(
-      displaytype, displayname, build, dirname, cmd, depid, copydir, priority,
+      displaytype, displayname, build, dirname, cmd, depid, priority,
       state
     ) VALUES (
       $A(-displaytype),
@@ -574,7 +571,6 @@ proc add_job {args} {
       $A(-dirname),
       $A(-cmd),
       $A(-depid),
-      $A(-copydir),
       $A(-priority),
       $state
     )
@@ -595,7 +591,8 @@ proc add_tcl_jobs {build config patternlist} {
     set testfixture [file join [lindex $build 1] $TRG(testfixture)]
   }
   if {[lindex $build 2]=="Valgrind"} {
-    set testfixture "valgrind -v --error-exitcode=1 $testfixture"
+    set setvar "export OMIT_MISUSE=1\n"
+    set testfixture "${setvar}valgrind -v --error-exitcode=1 $testfixture"
   }
 
   # The ::testspec array is populated by permutations.test
@@ -662,11 +659,17 @@ proc add_build_job {buildname target} {
 proc add_make_job {bld target} {
   global TRG
 
+  if {$TRG(platform)=="win"} {
+    set cmd "copy [lindex $bld 1]\\* ."
+  } else {
+    set cmd "cp -r [lindex $bld 1]/* ."
+  }
+  append cmd "\n$TRG(makecmd) $target"
+
   add_job                                       \
     -displaytype make                           \
     -displayname "[lindex $bld 2] make $target" \
-    -cmd "$TRG(makecmd) $target"                \
-    -copydir [lindex $bld 1]                    \
+    -cmd $cmd                                   \
     -depid [lindex $bld 0]                      \
     -priority 1
 }
@@ -808,6 +811,14 @@ proc script_input_ready {fd iJob jobid} {
   if {[eof $fd]} {
     trdb eval { SELECT * FROM jobs WHERE jobid=$jobid } job {}
 
+    # If this job specified a directory name, then delete the run.sh/run.bat
+    # file from it before continuing. This is because the contents of this
+    # directory might be copied by some other job, and we don't want to copy
+    # the run.sh file in this case.
+    if {$job(dirname)!=""} {
+      file delete -force [file join $job(dirname) $TRG(run)]
+    }
+
     set ::done 1
     fconfigure $fd -blocking 1
     set state "done"
@@ -816,7 +827,7 @@ proc script_input_ready {fd iJob jobid} {
       if {[info exists TRG(reportlength)]} {
         puts -nonewline "[string repeat " " $TRG(reportlength)]\r"
       }
-      puts "FAILED: $job(displayname)"
+      puts "FAILED: $job(displayname) ($iJob)"
       set state "failed" 
     }
 
@@ -886,17 +897,13 @@ proc launch_another_job {iJob} {
     close $fd
   }
 
-  if {$job(copydir)!=""} {
-    foreach f [glob -nocomplain [file join $job(copydir) *]] {
-      catch { file copy -force $f $dir }
-    }
-  }
-
   set pwd [pwd]
   cd $dir
-  set fd [open "|$job(cmd) 2>@1" r]
+  set fd [open $TRG(run) w]
+  puts $fd $job(cmd) 
+  close $fd
+  set fd [open "|$TRG(runcmd) 2>@1" r]
   cd $pwd
-  set pid [pid $fd]
 
   fconfigure $fd -blocking false
   fileevent $fd readable [list script_input_ready $fd $iJob $job(jobid)]