Fossil SCM
Make tester.tcl reject unknown options with a message
Commit
80e92738a38a38d304b9c71efbd66d569b917a5e6b537dccbbfaa4119561f78c
Parent
b2b6abcb38016a8…
1 file changed
+11
+11
| --- test/tester.tcl | ||
| +++ test/tester.tcl | ||
| @@ -115,10 +115,21 @@ | ||
| 115 | 115 | puts stderr "-assurance requires smoke, ci, or stress" |
| 116 | 116 | exit 1 |
| 117 | 117 | } |
| 118 | 118 | set argv [lreplace $argv $i [expr {$i + 1}]] |
| 119 | 119 | } |
| 120 | + | |
| 121 | +# The options above have been removed from argv, and each remaining | |
| 122 | +# element of argv is the name of a test file. | |
| 123 | +foreach arg $argv { | |
| 124 | + if {[string match -* $arg]} { | |
| 125 | + puts stderr "unknown or repeated option: $arg" | |
| 126 | + puts stderr "options are: -keep -halt -prot -verbose -quiet -strict\ | |
| 127 | + -trials N -assurance smoke|ci|stress" | |
| 128 | + exit 1 | |
| 129 | + } | |
| 130 | +} | |
| 120 | 131 | |
| 121 | 132 | if {[llength $argv]==0} { |
| 122 | 133 | foreach f [lsort [glob $testfiledir/*.test]] { |
| 123 | 134 | set base [file root [file tail $f]] |
| 124 | 135 | lappend argv $base |
| 125 | 136 |
| --- test/tester.tcl | |
| +++ test/tester.tcl | |
| @@ -115,10 +115,21 @@ | |
| 115 | puts stderr "-assurance requires smoke, ci, or stress" |
| 116 | exit 1 |
| 117 | } |
| 118 | set argv [lreplace $argv $i [expr {$i + 1}]] |
| 119 | } |
| 120 | |
| 121 | if {[llength $argv]==0} { |
| 122 | foreach f [lsort [glob $testfiledir/*.test]] { |
| 123 | set base [file root [file tail $f]] |
| 124 | lappend argv $base |
| 125 |
| --- test/tester.tcl | |
| +++ test/tester.tcl | |
| @@ -115,10 +115,21 @@ | |
| 115 | puts stderr "-assurance requires smoke, ci, or stress" |
| 116 | exit 1 |
| 117 | } |
| 118 | set argv [lreplace $argv $i [expr {$i + 1}]] |
| 119 | } |
| 120 | |
| 121 | # The options above have been removed from argv, and each remaining |
| 122 | # element of argv is the name of a test file. |
| 123 | foreach arg $argv { |
| 124 | if {[string match -* $arg]} { |
| 125 | puts stderr "unknown or repeated option: $arg" |
| 126 | puts stderr "options are: -keep -halt -prot -verbose -quiet -strict\ |
| 127 | -trials N -assurance smoke|ci|stress" |
| 128 | exit 1 |
| 129 | } |
| 130 | } |
| 131 | |
| 132 | if {[llength $argv]==0} { |
| 133 | foreach f [lsort [glob $testfiledir/*.test]] { |
| 134 | set base [file root [file tail $f]] |
| 135 | lappend argv $base |
| 136 |