Skip to content

Commit dca61ec

Browse files
authored
Tweak the test harness to support STM32 (speeduino#1355)
1 parent ec1ff5a commit dca61ec

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

test/device_test_harness.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,19 @@ void setup(void (*runAllTests)(void))
1717
#if !defined(SIMULATOR)
1818
delay(5000);
1919
#endif
20+
while (!Serial) {
21+
; // Wait for serial connection
22+
}
2023

2124
UNITY_BEGIN(); // IMPORTANT LINE!
2225

2326
runAllTests();
2427

28+
// A small delay here helps STM32
29+
#if !defined(SIMULATOR)
30+
delay(500);
31+
#endif
32+
2533
UNITY_END(); // stop unit testing
2634

2735
#if defined(SIMULATOR) // Tell SimAVR we are done

0 commit comments

Comments
 (0)