circuitpython/docs/develop
Damien George 8978102f35 tests/run-tests.py: Change --target/--device options to --test-instance.
Previously to this commit, running the test suite on a bare-metal board
required specifying the target (really platform) and device, eg:

    $ ./run-tests.py --target pyboard --device /dev/ttyACM1

That's quite a lot to type, and you also need to know what the target
platform is, when a lot of the time you either don't care or it doesn't
matter.

This commit makes it easier to run the tests by replacing both of these
options with a single `--test-instance` (`-t` for short) option.  That
option specifies the executable/port/device to test.  Then the target
platform is automatically detected.

The `--test-instance` can be passed:
- "unix" (the default) to use the unix version of MicroPython
- "webassembly" to test the webassembly port
- anything else is considered a port/device to pass to Pyboard

There are also some shortcuts to specify a port/device, following
`mpremote`:
- a<n> is short for /dev/ttyACM<n>
- u<n> is short for /dev/ttyUSB<n>
- c<n> is short for COM<n>

For example:

    $ ./run-tests.py -t a1

Note that the default test instance is "unix" and so this commit does not
change the standard way to run tests on the unix port, by just doing
`./run-tests.py`.

As part of this change, the platform (and it's native architecture if it
supports importing native .mpy files) is show at the start of the test run.

Signed-off-by: Damien George <damien@micropython.org>
2024-11-04 12:47:47 +11:00
..
img docs/develop: Add MicroPython Internals chapter. 2021-01-27 16:59:58 +11:00
cmodules.rst py/py.mk: Add SRC_USERMOD_LIB_ASM to include assembly files. 2024-08-01 12:01:18 +10:00
compiler.rst all: Remove the "STATIC" macro and just use "static" instead. 2024-03-07 14:20:42 +11:00
extendingmicropython.rst docs: Remove trailing spaces and convert tabs to spaces. 2021-12-15 11:49:22 +11:00
gettingstarted.rst tests/run-tests.py: Change --target/--device options to --test-instance. 2024-11-04 12:47:47 +11:00
index.rst docs: Remove trailing spaces and convert tabs to spaces. 2021-12-15 11:49:22 +11:00
library.rst all: Remove the "STATIC" macro and just use "static" instead. 2024-03-07 14:20:42 +11:00
maps.rst docs/develop: Add MicroPython Internals chapter. 2021-01-27 16:59:58 +11:00
memorymgt.rst docs/develop: Add MicroPython Internals chapter. 2021-01-27 16:59:58 +11:00
natmod.rst all: Remove the "STATIC" macro and just use "static" instead. 2024-03-07 14:20:42 +11:00
optimizations.rst docs/develop/optimizations: Fix typo identified in issue 14391. 2024-04-29 09:20:28 +10:00
porting.rst all: Remove the "STATIC" macro and just use "static" instead. 2024-03-07 14:20:42 +11:00
publiccapi.rst docs/develop: Add MicroPython Internals chapter. 2021-01-27 16:59:58 +11:00
qstr.rst docs: Remove trailing spaces and convert tabs to spaces. 2021-12-15 11:49:22 +11:00
writingtests.rst tests/run-tests.py: Change --target/--device options to --test-instance. 2024-11-04 12:47:47 +11:00