tests/run-multitests: Extend usage information.

This commit is contained in:
Andrew Leech 2022-09-20 08:54:53 +10:00 committed by Damien George
parent 920da9c5e3
commit 7589d86b6b
1 changed files with 17 additions and 1 deletions

View File

@ -3,6 +3,11 @@
# This file is part of the MicroPython project, http://micropython.org/ # This file is part of the MicroPython project, http://micropython.org/
# The MIT License (MIT) # The MIT License (MIT)
# Copyright (c) 2020 Damien P. George # Copyright (c) 2020 Damien P. George
#
# run-multitests.py
# Runs a test suite that relies on two micropython instances/devices
# interacting in some way. Typically used to test networking / bluetooth etc.
import sys, os, time, re, select import sys, os, time, re, select
import argparse import argparse
@ -471,7 +476,10 @@ def run_tests(test_files, instances_truth, instances_test):
def main(): def main():
global cmd_args global cmd_args
cmd_parser = argparse.ArgumentParser(description="Run network tests for MicroPython") cmd_parser = argparse.ArgumentParser(
description="Run network tests for MicroPython",
formatter_class=argparse.RawTextHelpFormatter,
)
cmd_parser.add_argument( cmd_parser.add_argument(
"-s", "--show-output", action="store_true", help="show test output after running" "-s", "--show-output", action="store_true", help="show test output after running"
) )
@ -488,6 +496,14 @@ def main():
default=1, default=1,
help="repeat the test with this many permutations of the instance order", help="repeat the test with this many permutations of the instance order",
) )
cmd_parser.epilog = (
"Supported instance types:\r\n"
" -i pyb:<port> physical device (eg. pyboard) on provided repl port.\n"
" -i micropython unix micropython instance, path customised with MICROPY_MICROPYTHON env.\n"
" -i cpython desktop python3 instance, path customised with MICROPY_CPYTHON3 env.\n"
" -i exec:<path> custom program run on provided path.\n"
"Each instance arg can optionally have custom env provided, eg. <cmd>,ENV=VAR,ENV=VAR...\n"
)
cmd_parser.add_argument("files", nargs="+", help="input test files") cmd_parser.add_argument("files", nargs="+", help="input test files")
cmd_args = cmd_parser.parse_args() cmd_args = cmd_parser.parse_args()