1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-07-30 19:03:16 +03:00

Add the --fuzztest option to testrunner.tcl. Also, have it print whitespace over the top of the old report line before writing the new.

FossilOrigin-Name: d83ce01fe1f21edcc93ad4c6308026156f235bab75e16e15389e27ad388fb274
This commit is contained in:
dan
2023-02-06 11:43:22 +00:00
parent 2288ecbb9c
commit 0bd0843eb1
3 changed files with 50 additions and 12 deletions

View File

@ -1,5 +1,5 @@
C Fix\sproblems\swith\stest\sscripts\spreventing\sthem\sfrom\srunning\swith\sSQLITE_DEFAULT_MEMSTATUS=0\sbuilds.\sOr\sbuilds\swithout\sSQLITE_ENABLE_STAT4.
D 2023-02-06T11:02:31.024
C Add\sthe\s--fuzztest\soption\sto\stestrunner.tcl.\sAlso,\shave\sit\sprint\swhitespace\sover\sthe\stop\sof\sthe\sold\sreport\sline\sbefore\swriting\sthe\snew.
D 2023-02-06T11:43:22.002
F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1
F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea
F LICENSE.md df5091916dbb40e6e9686186587125e1b2ff51f022cc334e886c19a0e9982724
@ -1566,7 +1566,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 3723cfa0e01b69bc3c6a4c2f4a35f8fcec23e3cd048c5f827fcf15b189d2a92a
F test/testrunner.tcl fb6249e9538470959b4957a39e80376a2fb9f157c67dde2c020273a2b96af947
F test/testrunner_data.tcl 8169c68654ac8906833b8a6aadca973358a441ebf88270dd05c153e5f96f76b8
F test/thread001.test a0985c117eab62c0c65526e9fa5d1360dd1cac5b03bde223902763274ce21899
F test/thread002.test c24c83408e35ba5a952a3638b7ac03ccdf1ce4409289c54a050ac4c5f1de7502
@ -2048,8 +2048,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 81c118d90b281b30f40b3eeefaeb2c8350aa40080b4fe7de8f21d263986c6acb
R 68c36f7c3bbb0cdfa62cb3d6ed79f926
P c0fbc89ed26b6eb361c1a05e2fb0d78d101fe2daf2947bbe5e0e58e0c2a779a2
R ca675ab264210e4a6c7241a547c972b1
U dan
Z c7cd20985880e33926ac0c89209760a5
Z a02e7b99f420dffa9a6626f8f58a89b3
# Remove this line to create a well-formed Fossil manifest.

View File

@ -1 +1 @@
c0fbc89ed26b6eb361c1a05e2fb0d78d101fe2daf2947bbe5e0e58e0c2a779a2
d83ce01fe1f21edcc93ad4c6308026156f235bab75e16e15389e27ad388fb274

View File

@ -23,6 +23,7 @@ Usage:
where SWITCHES are:
--jobs NUMBER-OF-JOBS
--fuzztest
Interesting values for PERMUTATION are:
@ -45,6 +46,11 @@ If a PERMUTATION is specified and is followed by the path to a Tcl script
instead of a list of patterns, then that single Tcl test script is run
with the specified permutation.
The --fuzztest option is ignored if the PERMUTATION is "release". Otherwise,
if it is present, then "make -C <dir> fuzztest" is run as part of the tests,
where <dir> is the directory containing the testfixture binary used to
run the script.
The "status" and "njob" commands are designed to be run from the same
directory as a running testrunner.tcl script that is running tests. The
"status" command prints a report describing the current state and progress
@ -99,6 +105,7 @@ set TRG(nJob) [default_njob] ;# Default number of helper processes
set TRG(patternlist) [list]
set TRG(cmdline) $argv
set TRG(reporttime) 2000
set TRG(fuzztest) 0 ;# is the fuzztest option present.
switch -nocase -glob -- $tcl_platform(os) {
*darwin* {
@ -335,6 +342,8 @@ for {set ii 0} {$ii < [llength $argv]} {incr ii} {
incr ii
set TRG(nJob) [lindex $argv $ii]
if {$isLast} { usage }
} elseif {($n>2 && [string match "$a*" --fuzztest]) || $a=="-f"} {
set TRG(fuzztest) 1
} else {
usage
}
@ -422,6 +431,7 @@ proc build_to_dirname {bname} {
# {BUILD CONFIG FILENAME} {BUILD CONFIG FILENAME} ...
#
proc testset_patternlist {patternlist} {
global TRG
set testset [list] ;# return value
@ -452,6 +462,8 @@ proc testset_patternlist {patternlist} {
}
}
set TRG(fuzztest) 0 ;# ignore --fuzztest option in this case
} elseif {$first=="all"} {
set clist [trd_all_configs]
@ -468,6 +480,10 @@ proc testset_patternlist {patternlist} {
} else {
testset_append testset "" full $patternlist
}
if {$TRG(fuzztest)} {
if {$TRG(platform)=="win"} { error "todo" }
lappend testset [list "" make fuzztest]
}
set testset
}
@ -586,6 +602,11 @@ proc make_new_testset {} {
close $fd
}
if {$c=="make" && $b==""} {
# --fuzztest option
set slow 1
}
if {$c=="veryquick"} {
set c ""
}
@ -698,9 +719,20 @@ proc launch_another_job {iJob} {
set dir $builddir
} elseif {$c=="make"} {
if {$b==""} {
if {$f!="fuzztest"} { error "corruption in testrunner.db!" }
# Special case - run [make fuzztest]
set makedir [file dirname $testfixture]
if {$TRG(platform)=="win"} {
error "how?"
} else {
set cmd [list make -C $makedir fuzztest]
}
} else {
set builddir [build_to_dirname $b]
copy_dir $builddir $dir
set cmd "$TRG(makecmd) $f"
}
} else {
if {$b==""} {
set testfixture [info nameofexec]
@ -763,8 +795,14 @@ proc one_line_report {} {
lappend text "$j: ($fin/$t($j)) f=$v(failed,$j) r=$v(running,$j)"
}
puts -nonewline "${tm}s: [join $text { || }]\r"
if {[info exists TRG(reportlength)]} {
puts -nonewline "[string repeat " " $TRG(reportlength)]\r"
}
set report "${tm}s: [join $text { || }]"
set TRG(reportlength) [string length $report]
puts -nonewline "$report\r"
flush stdout
after $TRG(reporttime) one_line_report
}