tinygo-org / drivers

TinyGo drivers for sensors, displays, wireless adaptors, and other devices that use I2C, SPI, GPIO, ADC, and UART interfaces.
https://tinygo.org
BSD 3-Clause "New" or "Revised" License
585 stars 180 forks source link

Fix `make smoke-test` tests & runner #614

Closed trichner closed 8 months ago

trichner commented 8 months ago

Came across this trying to fix my environment in #612 :)

Now though the CI action fails:

...
tinygo build -size short -o ./build/test.uf2 -target=pico ./examples/xpt2046/main.go
   code    data     bss |   flash     ram
   8808     108    3152 |    8916    3260
22814d5dc2ec7af38c49bbb0686e1e1b  ./build/test.uf2
exit status 1
tinygo build -size short -o ./build/test.elf -target=m5stack-core2 ./examples/ft6336/basic/
usage: go run ./smoketest.go smoketest.txt
# tinygo.org/x/drivers/delay
  -xtensa
        Enable Xtensa tests (default true)
delay/sleep.go:10:10: fatal: 'stdbool.h' file not found
exit status 1
make: *** [Makefile:13: smoke-test] Error 1

So far I couldn't reproduce that locally and the tinygo docker images also seams to have the necessary dependencies at a quick glance.

trichner commented 8 months ago

aaand there are more smoketest that wen't broken unnoticed :/

@deadprogram those run all fine on my local machine, I assume something is different in either the CI dev tinygo version or the docker container it comes with.

Can you have a look?

deadprogram commented 8 months ago

@trichner looks like your fixes here helped surface a different problem

https://github.com/tinygo-org/tinygo/issues/3974

Good work!

deadprogram commented 8 months ago

@trichner I have confirmed that your fixes correct the issues you intended.

You can do the same by skipping the Xtensa tests like this:

make test XTENSA=0
deadprogram commented 8 months ago

The issue with the latest dev compiler should be corrected with https://github.com/tinygo-org/tinygo/pull/3975

trichner commented 8 months ago

@trichner looks like your fixes here helped surface a different problem

tinygo-org/tinygo#3974

Good work!

Happy to help! Looks like that triggered a chain of fixes :)

deadprogram commented 8 months ago

Fixes in compiler worked as expected, hence this PR is now green. Merging, thanks very much @trichner :100: