mirror of
https://github.com/sqlite/sqlite.git
synced 2025-07-30 19:03:16 +03:00
Enhance the "errors" command in testrunner.tcl so that it accepts the
"-s" or "--summary" argument to see a list of failed jobs, and so that an additional argument is a GLOB pattern that restricts the output to jobs whose names match that pattern. FossilOrigin-Name: dcbebe30f594a99e23b5ccd8d199b92118204a3e52e75c78d98c394601252e81
This commit is contained in:
13
manifest
13
manifest
@ -1,5 +1,5 @@
|
|||||||
C Fix\sext/consio\sso\sthat\sit\sworks\scorrectly\swith\sSQLITE_USE_ONLY_WIN32.
|
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-03T14:15:57.425
|
D 2024-09-03T16:04:34.164
|
||||||
F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1
|
F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1
|
||||||
F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea
|
F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea
|
||||||
F LICENSE.md df5091916dbb40e6e9686186587125e1b2ff51f022cc334e886c19a0e9982724
|
F LICENSE.md df5091916dbb40e6e9686186587125e1b2ff51f022cc334e886c19a0e9982724
|
||||||
@ -1715,7 +1715,7 @@ F test/temptable2.test 76821347810ecc88203e6ef0dd6897b6036ac788e9dd3e6b04fd4d163
|
|||||||
F test/temptable3.test d11a0974e52b347e45ee54ef1923c91ed91e4637
|
F test/temptable3.test d11a0974e52b347e45ee54ef1923c91ed91e4637
|
||||||
F test/temptrigger.test 38f0ca479b1822d3117069e014daabcaacefffcc
|
F test/temptrigger.test 38f0ca479b1822d3117069e014daabcaacefffcc
|
||||||
F test/tester.tcl 2c203a2dd664298f239f0ec3ce22fbc65b5f021c1e09edbae8452af8a694e052
|
F test/tester.tcl 2c203a2dd664298f239f0ec3ce22fbc65b5f021c1e09edbae8452af8a694e052
|
||||||
F test/testrunner.tcl 92e3c63072362cd56d7dec2548284425104b5b3a5c0af3371ee2911712d89bf6
|
F test/testrunner.tcl d117492b6ec7293f7906dd4ff48135dd9801bdf42db0f48f88b3328867aa94ff
|
||||||
F test/testrunner_data.tcl dbc0bb1c5b912dfd1e32b25d544318e412edd6085bd5fc9e6619cb93a739b786
|
F test/testrunner_data.tcl dbc0bb1c5b912dfd1e32b25d544318e412edd6085bd5fc9e6619cb93a739b786
|
||||||
F test/thread001.test a0985c117eab62c0c65526e9fa5d1360dd1cac5b03bde223902763274ce21899
|
F test/thread001.test a0985c117eab62c0c65526e9fa5d1360dd1cac5b03bde223902763274ce21899
|
||||||
F test/thread002.test c24c83408e35ba5a952a3638b7ac03ccdf1ce4409289c54a050ac4c5f1de7502
|
F test/thread002.test c24c83408e35ba5a952a3638b7ac03ccdf1ce4409289c54a050ac4c5f1de7502
|
||||||
@ -2212,9 +2212,8 @@ F vsixtest/vsixtest.tcl 6195aba1f12a5e10efc2b8c0009532167be5e301abe5b31385638080
|
|||||||
F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc
|
F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc
|
||||||
F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e
|
F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e
|
||||||
F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0
|
F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0
|
||||||
P 49e8b1635f29d9fd0dc2ef6e312fd4129f2283f68e9423d95ff9b55077688ad7 2d783524d1671d988ebb1b21c83de99c9f335963b6c20cf4df612f58c13da913
|
P efc6f3d7e92a25f440fb8d392daf325af5ca7dca104a5bb4bd59f7df93af53b0
|
||||||
R 1f005fca5fe5df8e4ebc8001e171645f
|
R 1cc8a7ec499a68123307944e86d4ccaa
|
||||||
T +closed 2d783524d1671d988ebb1b21c83de99c9f335963b6c20cf4df612f58c13da913
|
|
||||||
U drh
|
U drh
|
||||||
Z 207a73144d24fc75006dde9e7a085311
|
Z 54536ba1c60ddf4f4f932c617d6c5425
|
||||||
# Remove this line to create a well-formed Fossil manifest.
|
# Remove this line to create a well-formed Fossil manifest.
|
||||||
|
@ -1 +1 @@
|
|||||||
efc6f3d7e92a25f440fb8d392daf325af5ca7dca104a5bb4bd59f7df93af53b0
|
dcbebe30f594a99e23b5ccd8d199b92118204a3e52e75c78d98c394601252e81
|
||||||
|
@ -54,7 +54,7 @@ proc usage {} {
|
|||||||
Usage:
|
Usage:
|
||||||
$a0 ?SWITCHES? ?PERMUTATION? ?PATTERNS?
|
$a0 ?SWITCHES? ?PERMUTATION? ?PATTERNS?
|
||||||
$a0 PERMUTATION FILE
|
$a0 PERMUTATION FILE
|
||||||
$a0 errors ?-v|--verbose?
|
$a0 errors ?-v|--verbose? ?-s|--summary? ?PATTERN?
|
||||||
$a0 help
|
$a0 help
|
||||||
$a0 njob ?NJOB?
|
$a0 njob ?NJOB?
|
||||||
$a0 script ?-msvc? CONFIG
|
$a0 script ?-msvc? CONFIG
|
||||||
@ -112,10 +112,12 @@ The "script" command outputs the script used to build a configuration.
|
|||||||
Add the "-msvc" option for a Windows-compatible script. For a list of
|
Add the "-msvc" option for a Windows-compatible script. For a list of
|
||||||
available configurations enter "$a0 script help".
|
available configurations enter "$a0 script help".
|
||||||
|
|
||||||
The "errors" commands shows the output of all tests that failed in the
|
The "errors" commands shows the output of tests that failed in the
|
||||||
most recent run. Complete output is shown if the -v or --verbose options
|
most recent run. Complete output is shown if the -v or --verbose options
|
||||||
are used. Otherwise, an attempt is made to minimize the output to show
|
are used. Otherwise, an attempt is made to minimize the output to show
|
||||||
only the parts that contain the error messages.
|
only the parts that contain the error messages. The --summary option just
|
||||||
|
shows the jobs that failed. If PATTERN are provided, the error information
|
||||||
|
is only provided for jobs that match PATTERN.
|
||||||
|
|
||||||
Full documentation here: https://sqlite.org/src/doc/trunk/doc/testrunner.md
|
Full documentation here: https://sqlite.org/src/doc/trunk/doc/testrunner.md
|
||||||
}]]
|
}]]
|
||||||
@ -606,15 +608,21 @@ proc aggregate_test_counts {db} {
|
|||||||
#--------------------------------------------------------------------------
|
#--------------------------------------------------------------------------
|
||||||
# Check if this is the "errors" command:
|
# Check if this is the "errors" command:
|
||||||
#
|
#
|
||||||
if {[llength $argv]>=1 && [llength $argv]<=2
|
if {[llength $argv]>=1
|
||||||
&& ([string compare -nocase errors [lindex $argv 0]]==0 ||
|
&& ([string compare -nocase errors [lindex $argv 0]]==0 ||
|
||||||
[string match err* [lindex $argv 0]]==1)
|
[string match err* [lindex $argv 0]]==1)
|
||||||
} {
|
} {
|
||||||
set verbose 0
|
set verbose 0
|
||||||
|
set pattern {}
|
||||||
|
set summary 0
|
||||||
for {set ii 1} {$ii<[llength $argv]} {incr ii} {
|
for {set ii 1} {$ii<[llength $argv]} {incr ii} {
|
||||||
set a0 [lindex $argv $ii]
|
set a0 [lindex $argv $ii]
|
||||||
if {$a0=="-v" || $a0=="--verbose" || $a0=="-verbose"} {
|
if {$a0=="-v" || $a0=="--verbose" || $a0=="-verbose"} {
|
||||||
set verbose 1
|
set verbose 1
|
||||||
|
} elseif {$a0=="-s" || $a0=="--summary" || $a0=="-summary"} {
|
||||||
|
set summary 1
|
||||||
|
} elseif {$pattern==""} {
|
||||||
|
set pattern *[string trim $a0 *]*
|
||||||
} else {
|
} else {
|
||||||
puts "unknown option: \"$a0\"". Use --help for more info."
|
puts "unknown option: \"$a0\"". Use --help for more info."
|
||||||
exit 1
|
exit 1
|
||||||
@ -622,9 +630,22 @@ if {[llength $argv]>=1 && [llength $argv]<=2
|
|||||||
}
|
}
|
||||||
set cnt 0
|
set cnt 0
|
||||||
sqlite3 mydb $TRG(dbname)
|
sqlite3 mydb $TRG(dbname)
|
||||||
mydb timeout 2000
|
mydb timeout 5000
|
||||||
mydb eval {SELECT displaytype, displayname, output
|
if {$summary} {
|
||||||
FROM jobs WHERE state='failed'} {
|
set sql "SELECT displayname FROM jobs WHERE state='failed'"
|
||||||
|
} else {
|
||||||
|
set sql "SELECT displaytype, displayname, output FROM jobs \
|
||||||
|
WHERE state='failed'"
|
||||||
|
}
|
||||||
|
if {$pattern!=""} {
|
||||||
|
regsub -all {[^a-zA-Z0-9*/ ?]} $pattern . pattern
|
||||||
|
append sql " AND displayname GLOB '$pattern'"
|
||||||
|
}
|
||||||
|
mydb eval $sql {
|
||||||
|
if {$summary} {
|
||||||
|
puts "FAILED: $displayname"
|
||||||
|
continue
|
||||||
|
}
|
||||||
puts "**** $displayname ****"
|
puts "**** $displayname ****"
|
||||||
if {$verbose || $displaytype!="tcl"} {
|
if {$verbose || $displaytype!="tcl"} {
|
||||||
puts $output
|
puts $output
|
||||||
@ -637,9 +658,13 @@ if {[llength $argv]>=1 && [llength $argv]<=2
|
|||||||
}
|
}
|
||||||
incr cnt
|
incr cnt
|
||||||
}
|
}
|
||||||
set summary [aggregate_test_counts mydb]
|
if {$pattern==""} {
|
||||||
mydb close
|
set summary [aggregate_test_counts mydb]
|
||||||
puts "Total [lindex $summary 0] errors out of [lindex $summary 1] tests"
|
mydb close
|
||||||
|
puts "Total [lindex $summary 0] errors out of [lindex $summary 1] tests"
|
||||||
|
} else {
|
||||||
|
mydb close
|
||||||
|
}
|
||||||
exit
|
exit
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user