> This is a huge disparity from web development workflows where file watchers are prevalent—you save a file and instantly see the results of the change. > Pigweed’s pw_watch module solves this inefficiency directly, providing a watcher that automatically invokes a build when a file is saved, and also runs the specific tests affected by the code changes. This drastically reduces the edit-compile-flash-test cycle for c…
Pigweed: A Collection of Embedded Libraries
11–14 of 14 posts
Re: Pigweed: A Collection of Embedded Libraries
#12> This is a huge disparity from web development workflows where file watchers are prevalent—you save a file and instantly see the results of the change. > Pigweed’s pw_watch module solves this inefficiency directly, providing a watcher that automatically invokes a build when a file is saved, and also runs the specific tests affected by the code changes. This drastically reduces the edit-compile-flash-test cycle for c…
Re: Pigweed: A Collection of Embedded Libraries
#13But it looks like it's just a set of small plug-ins like statically-allocated strings and easy tests.
I guess that's cool too, but...eh. I agree with others who say that it seems counterproductive to try to run embedded integration tests every time a file is saved. This sort of looks like a solution in search of a problem.
Also, when has Google ever supported a novel project like this over the long term? I'm not too eager to buy into something that'll get discontinued a few years down the line.
Re: Pigweed: A Collection of Embedded Libraries
#14Earlier quoted context omitted.
I've found a lot of value in running unit tests on target hardware. For one thing, it means you can actually include peripheral drivers in the test. Also, as you said, embedded compilers tend to be more buggy than host compilers. I've actually found compiler bugs through embedded unit testing.
Peripheral unit tests are best run off-target in my experience. We mock out all register accesses for host builds, then can write unit tests that validate we write registers in the right order, handle states that are in-spec but hard to get the real peripheral in to, etc. Things that may work a million times in a row on real hardware, but then regularly fail in the field on a few million devices. Running them on-targ…