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

Add the "joblist" command to testrunner.tcl

FossilOrigin-Name: f64469f4806d4d5d7103c171a37a542c7aab9db09a226bccd8411e9ccd55353d
This commit is contained in:
drh
2024-09-04 11:22:47 +00:00
parent fd486258a0
commit c81ab76cd9
3 changed files with 53 additions and 7 deletions

View File

@ -1,5 +1,5 @@
C Enhance\sthe\s"errors"\scommand\sin\stestrunner.tcl\sso\sthat\sit\saccepts\sthe\s\n"-s"\sor\s"--summary"\sargument\sto\ssee\sa\slist\sof\sfailed\sjobs,\sand\sso\sthat\nan\sadditional\sargument\sis\sa\sGLOB\spattern\sthat\srestricts\sthe\soutput\sto\njobs\swhose\snames\smatch\sthat\spattern.
D 2024-09-03T16:04:34.164
C Add\sthe\s"joblist"\scommand\sto\stestrunner.tcl
D 2024-09-04T11:22:47.766
F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1
F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea
F LICENSE.md df5091916dbb40e6e9686186587125e1b2ff51f022cc334e886c19a0e9982724
@ -1715,7 +1715,7 @@ F test/temptable2.test 76821347810ecc88203e6ef0dd6897b6036ac788e9dd3e6b04fd4d163
F test/temptable3.test d11a0974e52b347e45ee54ef1923c91ed91e4637
F test/temptrigger.test 38f0ca479b1822d3117069e014daabcaacefffcc
F test/tester.tcl 2c203a2dd664298f239f0ec3ce22fbc65b5f021c1e09edbae8452af8a694e052
F test/testrunner.tcl d117492b6ec7293f7906dd4ff48135dd9801bdf42db0f48f88b3328867aa94ff
F test/testrunner.tcl 34652534e0085d9578a8b6fe86e93c387bebbcd321dde4aecadc4cf0c8b220ee
F test/testrunner_data.tcl dbc0bb1c5b912dfd1e32b25d544318e412edd6085bd5fc9e6619cb93a739b786
F test/thread001.test a0985c117eab62c0c65526e9fa5d1360dd1cac5b03bde223902763274ce21899
F test/thread002.test c24c83408e35ba5a952a3638b7ac03ccdf1ce4409289c54a050ac4c5f1de7502
@ -2212,8 +2212,8 @@ F vsixtest/vsixtest.tcl 6195aba1f12a5e10efc2b8c0009532167be5e301abe5b31385638080
F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc
F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e
F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0
P efc6f3d7e92a25f440fb8d392daf325af5ca7dca104a5bb4bd59f7df93af53b0
R 1cc8a7ec499a68123307944e86d4ccaa
P dcbebe30f594a99e23b5ccd8d199b92118204a3e52e75c78d98c394601252e81
R 526b505ed9ff61539ab1544a16cc762d
U drh
Z 54536ba1c60ddf4f4f932c617d6c5425
Z ec42621d2cdae6fdf4751b132650e441
# Remove this line to create a well-formed Fossil manifest.

View File

@ -1 +1 @@
dcbebe30f594a99e23b5ccd8d199b92118204a3e52e75c78d98c394601252e81
f64469f4806d4d5d7103c171a37a542c7aab9db09a226bccd8411e9ccd55353d

View File

@ -56,6 +56,7 @@ Usage:
$a0 PERMUTATION FILE
$a0 errors ?-v|--verbose? ?-s|--summary? ?PATTERN?
$a0 help
$a0 joblist ?PATTERN?
$a0 njob ?NJOB?
$a0 script ?-msvc? CONFIG
$a0 status ?-d SECS? ?--cls?
@ -579,6 +580,51 @@ if {[llength $argv]>=1
exit
}
#--------------------------------------------------------------------------
# Check if this is the "joblist" command:
#
if {[llength $argv]>=1
&& [string compare -nocase "joblist" [lindex $argv 0]]==0
} {
set pattern {}
for {set ii 1} {$ii<[llength $argv]} {incr ii} {
set a0 [lindex $argv $ii]
if {$pattern==""} {
set pattern [string trim $a0 *]
} else {
puts "unknown option: \"$a0\""
exit 1
}
}
set SQL {SELECT displaytype, displayname, state FROM jobs}
if {$pattern!=""} {
regsub -all {[^a-zA-Z0-9*.-/]} $pattern ? pattern
append SQL " WHERE displayname GLOB '*$pattern*'"
}
append SQL " ORDER BY starttime"
if {![file readable $TRG(dbname)]} {
puts "Database missing: $TRG(dbname)"
exit
}
sqlite3 mydb $TRG(dbname)
mydb timeout 2000
mydb eval $SQL {
set label UNKNOWN
switch -- $state {
ready {set label READY}
done {set label DONE}
failed {set label FAILED}
omit {set label OMIT}
running {set label RUNNING}
}
puts [format {%-7s %-5s %s} $label $displaytype $displayname]
}
mydb close
exit
}
# Scan the output of all jobs looking for the summary lines that
# report the number of test cases and the number of errors.
# Aggregate these numbers and return them.