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
584 stars 180 forks source link

tests: use one less core than all available for 'breathing' room. #659

Closed deadprogram closed 4 months ago

deadprogram commented 4 months ago

This PR improves the test runner to use one less core than all available for 'breathing' room. It also modifies the behavior to not return usage info for normal operational errors to avoid confusion when debugging failed test runs.

loraxipam commented 4 months ago

Is there always >1 CPU?

deadprogram commented 4 months ago

@loraxipam on the machine doing the compiling, yes.

aykevl commented 4 months ago

This PR improves the test runner to use one less core than all available for 'breathing' room.

How does this help? Unless it runs out of RAM, using all cores shouldn't be a problem. (In fact, ninja uses 2 more threads than available cores to allow slightly better scheduling on some operating systems, for example when a thread is blocked on I/O).

I'd also be more comfortable with making sure there's at least 1 goroutine. While single-core CPUs are rare nowadays, it's trivial to make sure they'll continue to work well.

(I also run make smoke-test myself sometimes so it would be unfortunate to slow that one down).