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

Add the "halt" command to testrunner.tcl

FossilOrigin-Name: 2cc25d5dbbc729f3b6deb8c6a45b975c535b4d20ad240e4ec0c85b3733a170ed
This commit is contained in:
drh
2024-10-22 20:09:18 +00:00
parent 653eb471c3
commit f896e2bd5b
3 changed files with 23 additions and 10 deletions

View File

@ -91,6 +91,7 @@ Usage:
$a0 njob ?NJOB?
$a0 script ?-msvc? CONFIG
$a0 status ?-d SECS? ?--cls?
$a0 halt
where SWITCHES are:
--buildonly Build test exes but do not run tests
@ -326,7 +327,7 @@ set TRG(schema) {
endtime INTEGER, -- End time
span INTEGER, -- Total run-time in milliseconds
estwork INTEGER, -- Estimated amount of work
state TEXT CHECK( state IN ('','ready','running','done','failed','omit') ),
state TEXT CHECK( state IN ('','ready','running','done','failed','omit','halt') ),
ntest INT, -- Number of test cases run
nerr INT, -- Number of errors reported
svers TEXT, -- Reported SQLite version
@ -424,6 +425,19 @@ if {([llength $argv]==2 || [llength $argv]==1)
}
#--------------------------------------------------------------------------
#--------------------------------------------------------------------------
# Check if this is the "halt" command:
#
if {[llength $argv]==1
&& [string compare -nocase halt [lindex $argv 0]]==0
} {
sqlite3 mydb $TRG(dbname)
mydb eval {UPDATE jobs SET state='halt' WHERE state IN ('ready','')}
mydb close
exit
}
#--------------------------------------------------------------------------
#--------------------------------------------------------------------------
# Check if this is the "help" command:
#
@ -1325,7 +1339,7 @@ proc mark_job_as_finished {jobid output state endtm} {
SET output=$output, state=$state, endtime=$endtm, span=$endtm-starttime,
ntest=$ntest, nerr=$nerr, svers=$svers, pltfm=$pltfm
WHERE jobid=$jobid;
UPDATE jobs SET state=$childstate WHERE depid=$jobid;
UPDATE jobs SET state=$childstate WHERE depid=$jobid AND state!='halt';
UPDATE config SET value=value+$nerr WHERE name='nfail';
UPDATE config SET value=value+$ntest WHERE name='ntest';
}