Libraries and lib_deps and unit tests, oh my!

I’m not exactly sure where this goes. I’ve painted myself into quite the corner, and I’m not sure where to from here.

I have an existing platform IO library I wrote codewitch-honey-crisis/htcw_gfx

It relies on libraries it uses, namely htcw_io, htcw_bits (relied on by htcw_io), and htcw_data

I’m trying to unit test htcw_gfx (but not the others currently) using pio test

It’s not finding those secondary dependencies like htcw_io. I’ve added them to the platformio.ini lib_deps entry in the root, but the pio test engine doesn’t seem to pick them up from there.

Here is my working tree for the project. Note that this is strictly a library.

I had to add your dependent libraries via lib_deps, delete symbolic links in lib/ that I did not have, turn off compatibility mode checking because one library is not declared to be compatible with * / native, had to fix a double definition of the steel_blue color, and add the GFX_LITTLE_ENDIAN macro, then unit tests build (pio test -v): GitHub - maxgerhardt/gfx: GFX is a device independent graphics library primarily intended for IoT MCUs but not limited to that.

You can also build a native program.exe if you add a source file that defines the main() function, usefull for debugging. (But you can also debug unit tests).

1 Like

Wow, thanks. You fixed two bugs for me in addition to solving my problem. I owe you a beer.