crankyoldgit / IRremoteESP8266

Infrared remote library for ESP8266/ESP32: send and receive infrared signals with multiple protocols. Based on: https://github.com/shirriff/Arduino-IRremote/
GNU Lesser General Public License v2.1
2.94k stars 830 forks source link

Unit tests not compiling using PlatformIO #1312

Closed johannesgrothe closed 3 years ago

johannesgrothe commented 3 years ago

Version/revision of the library used

v2.7.1.1 (newest on Platformio https://platformio.org/lib/show/1089/IRremoteESP8266/examples)

Expected behavior

Unit tests should compile

Actual behavior

Unit tests do not compile.

Steps to reproduce the behavior

Create a platformio project, add 'IRremoteESP8266' to the dependencies and run tests. It will fail.

I have followed the steps in the [Troubleshooting Guide]

There's nothing there concerning unit tests.

Has this library/code previously worked as expected for you?

Yes, everything BUT unit tests work fine.

Other useful information

This is the relevant console output:

Processing * in esp32cam environment
--------------------------------------------------------------------------------
Building...
In file included from .pio/libdeps/esp32cam/IRremoteESP8266_ID1089/src/IRac.h:10:0,
                 from .pio/libdeps/esp32cam/IRremoteESP8266_ID1089/src/IRac.cpp:7:
.pio/libdeps/esp32cam/IRremoteESP8266_ID1089/src/ir_Amcor.h:23:25: fatal error: IRsend_test.h: No such file or directory

This is the problematic part of ir_Amcor.h:

#ifdef UNIT_TEST
#include "IRsend_test.h"
#endif

The problem seems to be that there simply is no IRsend_test.h, and I found no way to add one via platformio. Just adding it manually is no option since the library is just a dependency of my project and it should obviously compile right out of github. Maybe I'm just missing something, but i really don't get what could be the issue here except the file just missing somehow.

If you wanna take a look at the project in question: https://github.com/A20GameCo/Smarthome_ESP32

crankyoldgit commented 3 years ago

Hey ya.

Info on the unit tests can be found here: https://github.com/crankyoldgit/IRremoteESP8266/wiki/Library-Maintainers-Guide#unit-tests

In short, the library's Unit Tests are not compatible (at present) with PlatformIO. There are currently no plans to make it otherwise. That said, if you can get it working with PlatformIO, I won't say no to the PR. :-)