mmurdoch / arduinounit

ArduinoUnit is a unit testing framework for Arduino libraries
MIT License
394 stars 51 forks source link

Add support for ESP8266 and ESP32 #58

Closed pauloacmartinez closed 6 years ago

pauloacmartinez commented 7 years ago

Hi! This simple ifdef solved the problem for me with pgmspace.h

wmacevoy commented 7 years ago

There is a competing pull request #57 with a very similar goal. #57 points out there are watchdog timeout issues which cause the firmware tests to fail because the tests take too long. Since yield is os-specific and somewhat orthogonal to testing framework, there is some philosophy to get right about how to fix this.

Can you look at that pull, and decide if you can incorporate the yield in a way that supports both boards. In particular, can you add a yield() after line 254 in the run() method of Test?

This will not fix all the timeout issues. The firmware tests which run long need to have a conditional yield in them as well. Having these demonstrated in the tests as explicit code I think will help devs write more correct code on these boards.

wmacevoy commented 7 years ago

By the way, if we do merge this pull, can we count on you to help support issues on these boards?

ssilverman commented 6 years ago

I think it just needs to include pgmspace.h and not cores/esp8266/pgmspace.h. Also, this does not compile with PlatformIO with the board set to huzzah.

wmacevoy commented 6 years ago

v2.3.X-alpha compiles on ESP32 and ESP8266