diff options
| author | Thorsten von Eicken | 2020-01-16 09:07:50 -0800 |
|---|---|---|
| committer | Damien George | 2020-01-22 16:35:24 +1100 |
| commit | 5c5f93c1b896a8e73eff2edb3a3f3a2615b3f4de (patch) | |
| tree | abf5248c0c8aa3f47df034fe44012acdca01f682 /tests/run-tests | |
| parent | 3032ae1155db4bd89786f715f5227967d2cb71cf (diff) | |
tests: Make run-tests help and README be more descriptive of behaviour.
Diffstat (limited to 'tests/run-tests')
| -rwxr-xr-x | tests/run-tests | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/tests/run-tests b/tests/run-tests index b8f5b6b7a..f0fa83407 100755 --- a/tests/run-tests +++ b/tests/run-tests @@ -553,7 +553,14 @@ class append_filter(argparse.Action): def main(): cmd_parser = argparse.ArgumentParser( formatter_class=argparse.RawDescriptionHelpFormatter, - description='Run and manage tests for MicroPython.', + description='''Run and manage tests for MicroPython. + +When running tests, run-tests compares the MicroPython output of the test with the output +produced by running the test through CPython unless a <test>.exp file is found, in which +case it is used as comparison. +If a test fails, run-tests produces a pair of <test>.out and <test>.exp files in the current +directory with the MicroPython output and the expectations, respectively. +''', epilog='''\ Options -i and -e can be multiple and processed in the order given. Regex "search" (vs "match") operation is used. An action (include/exclude) of @@ -570,7 +577,7 @@ the last matching regex is used: cmd_parser.add_argument('-d', '--test-dirs', nargs='*', help='input test directories (if no files given)') cmd_parser.add_argument('-e', '--exclude', action=append_filter, metavar='REGEX', dest='filters', help='exclude test by regex on path/name.py') cmd_parser.add_argument('-i', '--include', action=append_filter, metavar='REGEX', dest='filters', help='include test by regex on path/name.py') - cmd_parser.add_argument('--write-exp', action='store_true', help='save .exp files to run tests w/o CPython') + cmd_parser.add_argument('--write-exp', action='store_true', help='use CPython to generate .exp files to run tests w/o CPython') cmd_parser.add_argument('--list-tests', action='store_true', help='list tests instead of running them') cmd_parser.add_argument('--emit', default='bytecode', help='MicroPython emitter to use (bytecode or native)') cmd_parser.add_argument('--heapsize', help='heapsize to use (use default if not specified)') |
