File tree 1 file changed +31
-3
lines changed
1 file changed +31
-3
lines changed Original file line number Diff line number Diff line change @@ -200,14 +200,42 @@ function run_testbench() {
200
200
indir " ${TESTBENCH_ROOT} " $CARGO run $@
201
201
}
202
202
203
+ # The kind of test we'll be running.
204
+ TEST_KIND=" default"
205
+ KINDS=(" default" " all" " core" " contrib" " examples" " benchmarks" " testbench" " ui" )
206
+
207
+ function print_help() {
208
+ echo " USAGE:"
209
+ echo " $0 [+<TOOLCHAIN>] [--help|-h] [--<TEST>]"
210
+ echo " "
211
+ echo " OPTIONS:"
212
+ echo " +<TOOLCHAIN> Forwarded to Cargo to select toolchain."
213
+ echo " --help, -h Print this help message and exit."
214
+ echo " --<TEST> Run the specified test suite."
215
+ echo " (Run without --<TEST> to run default tests.)"
216
+
217
+ echo " "
218
+ echo " AVAILABLE <TEST> OPTIONS:"
219
+ for kind in " ${KINDS[@]} " ; do
220
+ echo " ${kind} "
221
+ done
222
+
223
+ echo " "
224
+ echo " EXAMPLES:"
225
+ echo " $0 # Run default tests on current toolchain."
226
+ echo " $0 +stable --all # Run all tests on stable toolchain."
227
+ echo " $0 --ui # Run UI tests on current toolchain."
228
+ }
229
+
203
230
if [[ $1 == +* ]]; then
204
231
CARGO=" $CARGO $1 "
205
232
shift
206
233
fi
207
234
208
- # The kind of test we'll be running.
209
- TEST_KIND=" default"
210
- KINDS=(" contrib" " benchmarks" " testbench" " core" " examples" " default" " ui" " all" )
235
+ if [[ $1 == " --help" ]] || [[ $1 == " -h" ]]; then
236
+ print_help
237
+ exit 0
238
+ fi
211
239
212
240
if [[ " ${KINDS[@]} " =~ " ${1# " --" } " ]]; then
213
241
TEST_KIND=${1# " --" }
You can’t perform that action at this time.
0 commit comments