Add smoke tests for machine package

The machine package wasn't tested for every board. Therefore, add a new
serial-like test that also tries to import the machine package. This
should highlight potential issues in the future.
This commit is contained in:
Ayke van Laethem
2024-06-14 12:22:51 +02:00
committed by Ron Evans
parent 385a7920e6
commit e612f7cf3f
2 changed files with 30 additions and 13 deletions
+17
View File
@@ -0,0 +1,17 @@
package main
// This is the same as examples/serial, but it also imports the machine package.
// It is used as a smoke test for the machine package (for boards that don't
// have an on-board LED and therefore can't use examples/blinky1).
import (
_ "machine" // smoke test for the machine package
"time"
)
func main() {
for {
println("hello world!")
time.Sleep(time.Second)
}
}