From 39234d9a1e89c93af748003ab34b66134f60bb52 Mon Sep 17 00:00:00 2001 From: Thomas Farstrike Date: Sun, 16 Nov 2025 02:05:21 +0100 Subject: [PATCH] unitttest.sh: restart between each ondevice unit test --- tests/unittest.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/unittest.sh b/tests/unittest.sh index 8028ac7f..76264a3f 100755 --- a/tests/unittest.sh +++ b/tests/unittest.sh @@ -23,12 +23,6 @@ while [ $# -gt 0 ]; do shift done -if [ ! -z "$ondevice" ]; then - echo "Hack: reset the device to make sure no previous UnitTest classes have been registered..." - "$mpremote" reset - sleep 15 -fi - # print os and set binary os_name=$(uname -s) if [ "$os_name" = "Darwin" ]; then @@ -78,6 +72,12 @@ result = unittest.main() ; sys.exit(0 if result.wasSuccessful() else 1) " fi result=$? else + if [ ! -z "$ondevice" ]; then + echo "Hack: reset the device to make sure no previous UnitTest classes have been registered..." + "$mpremote" reset + sleep 15 + fi + echo "Device execution" # NOTE: On device, the OS is already running with boot.py and main.py executed, # so we don't need to (and shouldn't) re-run them. The system is already initialized.