Skip to content

Commit 39234d9

Browse files
unitttest.sh: restart between each ondevice unit test
1 parent 28d41e3 commit 39234d9

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

tests/unittest.sh

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,6 @@ while [ $# -gt 0 ]; do
2323
shift
2424
done
2525

26-
if [ ! -z "$ondevice" ]; then
27-
echo "Hack: reset the device to make sure no previous UnitTest classes have been registered..."
28-
"$mpremote" reset
29-
sleep 15
30-
fi
31-
3226
# print os and set binary
3327
os_name=$(uname -s)
3428
if [ "$os_name" = "Darwin" ]; then
@@ -78,6 +72,12 @@ result = unittest.main() ; sys.exit(0 if result.wasSuccessful() else 1) "
7872
fi
7973
result=$?
8074
else
75+
if [ ! -z "$ondevice" ]; then
76+
echo "Hack: reset the device to make sure no previous UnitTest classes have been registered..."
77+
"$mpremote" reset
78+
sleep 15
79+
fi
80+
8181
echo "Device execution"
8282
# NOTE: On device, the OS is already running with boot.py and main.py executed,
8383
# so we don't need to (and shouldn't) re-run them. The system is already initialized.

0 commit comments

Comments
 (0)