aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authordrh <>2025-04-28 17:56:23 +0000
committerdrh <>2025-04-28 17:56:23 +0000
commitd4cc3a42e2fe52a0e40eaa9291d91ba4d971e3c3 (patch)
tree2b8b7f75c99599a851894d3285b7d5ce7f45ea4b /test
parent1365bcffbf871273ace51461ad46826ebc88e30b (diff)
downloadsqlite-d4cc3a42e2fe52a0e40eaa9291d91ba4d971e3c3.tar.gz
sqlite-d4cc3a42e2fe52a0e40eaa9291d91ba4d971e3c3.zip
If the FUZZDB environment variable is set when running testrunner.tcl and
that env-var points to a fuzzcheck database, then suppliment the fuzzcheck tests with that extra database. FossilOrigin-Name: c08530dd6a71cb547d164e2313657c917f280e7988211bf199c8776e78a4e2a6
Diffstat (limited to 'test')
-rwxr-xr-xtest/testrunner.tcl30
1 files changed, 28 insertions, 2 deletions
diff --git a/test/testrunner.tcl b/test/testrunner.tcl
index 480d70a91..9b0e5ca4b 100755
--- a/test/testrunner.tcl
+++ b/test/testrunner.tcl
@@ -1163,24 +1163,47 @@ proc add_make_job {bld target} {
}
proc add_fuzztest_jobs {buildname patternlist} {
+ global env TRG
foreach {interpreter scripts} [trd_fuzztest_data] {
set bldDone 0
set subcmd [lrange $interpreter 1 end]
set interpreter [lindex $interpreter 0]
+ if {$interpreter=="fuzzcheck"
+ && [info exists env(FUZZDB)]
+ && [file readable $env(FUZZDB)]
+ } {
+ set TRG(FUZZDB) $env(FUZZDB)
+ set fname [file normalize $env(FUZZDB)]
+ set N [expr {([file size $fname]+4999999)/5000000}]
+ for {set i 0} {$i<$N} {incr i} {
+ lappend scripts [list --slice $i $N $fname]
+ }
+ }
+
foreach s $scripts {
# Fuzz data files fuzzdata1.db and fuzzdata2.db are larger than
# the others. So ensure that these are run as a higher priority.
- set tail [file tail $s]
+ if {[llength $s]==1} {
+ set tail [file tail $s]
+ } else {
+ set fname [lindex $s end]
+ set tail [lrange $s 0 end-1]
+ lappend tail [file tail $fname]
+ }
if {![job_matches_any_pattern $patternlist "fuzzcheck $tail"]} continue
if {!$bldDone} {
set bld [add_build_job $buildname $interpreter]
foreach {depid dirname displayname} $bld {}
set bldDone 1
}
- if {$tail=="fuzzdata1.db" || $tail=="fuzzdata2.db"} {
+ if {[string match ?-slice* $tail]} {
+ set priority 15
+ } elseif {$tail=="fuzzdata1.db"
+ || $tail=="fuzzdata2.db"
+ || $tail=="fuzzdata8.db"} {
set priority 5
} else {
set priority 1
@@ -1618,6 +1641,9 @@ proc run_testset {} {
puts "\nTest database is $TRG(dbname)"
puts "Test log is $TRG(logname)"
+ if {[info exists TRG(FUZZDB)]} {
+ puts "Extra fuzztest data taken from $TRG(FUZZDB)"
+ }
trdb eval {
SELECT sum(ntest) AS totaltest,
sum(nerr) AS totalerr