On testrunner.tcl: (1) Add the "help" command. (2) Add the "script" command

to the help message.  (3) Improve the error message generated by "script" when
an incorrect CONFIG option is provided.

FossilOrigin-Name: 1b7f0be44036fb90d763eabae84b95734e766f8010b39122f8787189308a7fc1
This commit is contained in:
drh 2024-03-13 00:37:37 +00:00
parent f99ab38bdb
commit eea6bdce84
4 changed files with 29 additions and 12 deletions

View File

@ -1,5 +1,5 @@
C Have\stestrunner.tcl\shave\seach\stest\sstore\sits\stemp\sfiles\sin\sits\sworking\sdirectory.\sTo\savoid\sunlikely,\sbut\spossible,\scollisions.
D 2024-03-12T18:33:57.893
C On\stestrunner.tcl:\s(1)\sAdd\sthe\s"help"\scommand.\s\s(2)\sAdd\sthe\s"script"\scommand\nto\sthe\shelp\smessage.\s\s(3)\sImprove\sthe\serror\smessage\sgenerated\sby\s"script"\swhen\nan\sincorrect\sCONFIG\soption\sis\sprovided.
D 2024-03-13T00:37:37.096
F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1
F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea
F LICENSE.md df5091916dbb40e6e9686186587125e1b2ff51f022cc334e886c19a0e9982724
@ -1687,8 +1687,8 @@ F test/temptable2.test 76821347810ecc88203e6ef0dd6897b6036ac788e9dd3e6b04fd4d163
F test/temptable3.test d11a0974e52b347e45ee54ef1923c91ed91e4637
F test/temptrigger.test 38f0ca479b1822d3117069e014daabcaacefffcc
F test/tester.tcl fe617b88c7eb08bdf983d2aaa31c20fbf439eee7b8e0d61ca636fcd0c305bbbf
F test/testrunner.tcl 9fb1341f4a3fcc169b0cffa2f319abde197a738d98131d178a81509a0638f2df
F test/testrunner_data.tcl 7ffd951527bbc614e723fd8d123b6834321878530696adecfdf6035100bac64e
F test/testrunner.tcl 7cd31694a52affd636284b3e74ec10213c60e247ec71f56e9061cf669f897105
F test/testrunner_data.tcl 2f94974e5e3a56af880be72f7a7fd239aa9d4ecf978625435fcc698319c927fa
F test/thread001.test a0985c117eab62c0c65526e9fa5d1360dd1cac5b03bde223902763274ce21899
F test/thread002.test c24c83408e35ba5a952a3638b7ac03ccdf1ce4409289c54a050ac4c5f1de7502
F test/thread003.test ee4c9efc3b86a6a2767516a37bd64251272560a7
@ -2177,9 +2177,8 @@ F vsixtest/vsixtest.tcl 6a9a6ab600c25a91a7acc6293828957a386a8a93
F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc
F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e
F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0
P 7805844bc4433ae088dae6d54eb972e082c5a3df06e844cfc8b69e7d97aeb432 775a10d10b9bf2227071e778718ba4054d4b2b4238751eb147338d687b4e0d58
R 9fe0d14be342ac1becb45016c9700f68
T +closed 775a10d10b9bf2227071e778718ba4054d4b2b4238751eb147338d687b4e0d58
U dan
Z d2698b4f4cd69108bc3174c8dffaf5d3
P 18842d0d72048561312c2c83035c01253150e1fe1ff37160f266d24d41a01df3
R a8f09c1fdaad1d594fe806932cdf9a66
U drh
Z 2fb114f4336505cce7dafa69e9c32517
# Remove this line to create a well-formed Fossil manifest.

View File

@ -1 +1 @@
18842d0d72048561312c2c83035c01253150e1fe1ff37160f266d24d41a01df3
1b7f0be44036fb90d763eabae84b95734e766f8010b39122f8787189308a7fc1

View File

@ -54,7 +54,9 @@ proc usage {} {
Usage:
$a0 ?SWITCHES? ?PERMUTATION? ?PATTERNS?
$a0 PERMUTATION FILE
$a0 help
$a0 njob ?NJOB?
$a0 script ?-msvc? CONFIG
$a0 status
where SWITCHES are:
@ -89,6 +91,10 @@ directory as a running testrunner.tcl script that is running tests. The
"status" command prints a report describing the current state and progress
of the tests. The "njob" command may be used to query or modify the number
of sub-processes the test script uses to run tests.
The "script" command outputs the script used to build a configuration.
Add the "-msvc" option for a Windows-compatible script. For a list of
available configurations enter "$a0 script help".
}]]
exit 1
@ -329,6 +335,14 @@ if {([llength $argv]==2 || [llength $argv]==1)
}
#--------------------------------------------------------------------------
#--------------------------------------------------------------------------
# Check if this is the "help" command:
#
if {[string compare -nocase help [lindex $argv 0]]==0} {
usage
}
#--------------------------------------------------------------------------
#--------------------------------------------------------------------------
# Check if this is the "script" command:
#

View File

@ -598,7 +598,12 @@ proc trd_buildscript {config srcdir bMsvc} {
# Ensure that the named configuration exists.
if {![info exists build($config)]} {
error "No such build config: $config"
if {$config!="help"} {
puts "No such build config: $config"
}
puts "Available configurations: [lsort [array names build]]"
flush stdout
exit 1
}
# Generate and return the script.
@ -637,4 +642,3 @@ proc trd_test_script_properties {path} {
set trd_test_script_properties_cache($path)
}