[Scons-users] Build and run unit tests automatically on target build

Matthew Ryan mjr at centauri.org
Mon Jun 17 15:26:43 EDT 2024


I've been looking for some way of building and running a unit test
after another target is run, but so far have been unable to come up
with a recipe.

The specific example is that of a C/C++ static library built by
`env.Library()` - I want a setup where, whenever the static library is
rebuilt, a unit test (built by `env.Program` and linked against the
static library) is built and run automatically, and if it fails, the
build fails, so anything later on that links against libfoo would not
build.

Is such a thing possible?

 - Matt


More information about the Scons-users mailing list