micropython/tools/mpremote/tests
Jos Verlinde d945316432 tools/mpremote/tests: Add tests for 'fs tree' command.
Signed-off-by: Jos Verlinde <jos_verlinde@hotmail.com>
2025-05-18 00:20:43 +10:00
..
README.md docs/reference/mpremote: Update docs for mpremote rm -r. 2025-04-09 10:51:48 +10:00
run-mpremote-tests.sh tools/mpremote: Make sure stdout and stderr output appear in order. 2024-11-13 11:51:35 +11:00
test_errno.sh tools/mpremote/tests: Add tests for errno behavior. 2025-04-26 15:49:48 +10:00
test_errno.sh.exp tools/mpremote/tests: Add tests for errno behavior. 2025-04-26 15:49:48 +10:00
test_eval_exec_run.sh
test_eval_exec_run.sh.exp
test_filesystem.sh tools/mpremote/tests: Add tests for 'fs tree' command. 2025-05-18 00:20:43 +10:00
test_filesystem.sh.exp tools/mpremote/tests: Add tests for 'fs tree' command. 2025-05-18 00:20:43 +10:00
test_fs_tree.sh tools/mpremote/tests: Add tests for 'fs tree' command. 2025-05-18 00:20:43 +10:00
test_fs_tree.sh.exp tools/mpremote/tests: Add tests for 'fs tree' command. 2025-05-18 00:20:43 +10:00
test_mip_local_install.sh tools/mpremote: Add support for relative urls in package.json files. 2025-02-24 13:29:40 +11:00
test_mip_local_install.sh.exp tools/mpremote: Add support for relative urls in package.json files. 2025-02-24 13:29:40 +11:00
test_mount.sh tools/mpremote/tests: Add test for RemoteFile.readline. 2025-02-28 14:14:58 +11:00
test_mount.sh.exp tools/mpremote/tests: Add test for RemoteFile.readline. 2025-02-28 14:14:58 +11:00
test_recursive_cp.sh
test_recursive_cp.sh.exp
test_resume.sh
test_resume.sh.exp

Tests for mpremote

This directory contains a set of tests for mpremote.

Requirements:

  • A device running MicroPython connected to a serial port on the host.
  • The device you are testing against must be flashed with a firmware of the same build as mpremote.
  • If the device has an SDcard or other vfs mounted, the vfs's filesystem must be empty to pass the filesystem test.
  • Python 3.x, bash and various Unix tools such as find, mktemp, sed, sort, tr.
  • To test on Windows, you can either:
    • Run the (Linux) tests in WSL2 against a USB device that is passed though to WSL2.
    • Use the Git Bash terminal to run the tests against a device connected to a COM port. Note: While the tests will run in Git Bash, several will throw false positive errors due to differences in the way that TMP files are logged and and several other details.

To run the tests do:

$ cd tools/mpremote/tests
$ ./run-mpremote-tests.sh

To run a single test do:

$ ./run-mpremote-tests.sh test_filesystem.sh

Each test should print "OK" if it passed. Otherwise it will print "CRASH", or "FAIL" and a diff of the expected and actual test output.