1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-07-29 08:01:23 +03:00

Remove a few unsuitable scripts from the "veryquick" test suite. Also have every second testrunner.tcl process favour running test scripts that contain text like "testrunner: slow" before any others.

FossilOrigin-Name: 22d280a5cd395abbedcfffbac3d3b3a614c327be25763ca380c1338a2a7bd33a
This commit is contained in:
dan
2022-07-18 19:32:30 +00:00
parent 2a7b27f1c6
commit cf2ad7ae36
18 changed files with 127 additions and 59 deletions

View File

@ -58,6 +58,7 @@ set R(schema) {
CREATE TABLE script(
config TEXT,
filename TEXT, -- full path to test script
slow BOOLEAN, -- true if script is "slow"
state TEXT CHECK( state IN ('ready', 'running', 'done') ),
testfixtureid, -- Id of process that ran script
time INTEGER, -- Time in ms
@ -271,8 +272,23 @@ proc make_new_testset {} {
db eval $R(schema)
foreach t $tests {
foreach {c s} $t {}
set slow 0
set fd [open $s]
for {set ii 0} {$ii<100 && ![eof $fd]} {incr ii} {
set line [gets $fd]
if {[string match -nocase *testrunner:* $line]} {
regexp -nocase {.*testrunner:(.*)} $line -> properties
foreach p $properties {
if {$p=="slow"} { set slow 1 }
}
}
}
close $fd
db eval {
INSERT INTO script(config, filename, state) VALUES ($c, $s, 'ready')
INSERT INTO script(config, filename, slow, state)
VALUES ($c, $s, $slow, 'ready')
}
}
}
@ -294,7 +310,12 @@ proc get_next_test {} {
set c ""
db eval {
SELECT config, filename FROM script WHERE state='ready'
ORDER BY config!='full', config, filename LIMIT 1
ORDER BY
(slow * (($myid+1) % 2)) DESC,
config!='full',
config,
filename
LIMIT 1
} {
set c $config
set f $filename