[Scons-users] HOWTO model a test suite using SCons

Stefan Seefeld stefan at seefeld.name
Sun Jan 3 02:00:26 EST 2016


Hi,

thanks all for the helpful replies.

On 01.01.2016 15:12, William Blevins wrote:
> Stefan,
>
> I have always used something simple
> like https://bitbucket.org/scons/scons/wiki/UnitTests
>
> I just compile my test suite and create a target for running the
> suite. Obviously passing parameters to the suite via commandline is
> hard, but depending on the scale of the tests, that is usually
> irrelevant. You can of course make a whole pipeline using SCons
> targets which may include piping the test outputs to a file and using
> that file as a target to a document generator, etc.

Yes, I think this is precisely what I'm looking for: while I already can
run tests "normally" (even generate some simple output like "PASS" and
"FAIL"), the output is typically very noisy due to various reasons
(compiler warnings, say), so I'd like to add a "reporter" that
post-processes the test results (such as to print a nice summary to stdout).
While I'm able to set things up manually, I would like to find a way to
do this automatically:

My SConscript file contains a bunch of "Test(...)" declarations (each
defining a test that produces a specific <name>.result test-result
file). Is there a way to pre-define a "Report" generator such that all
the above *.result files are automatically added as sources for it, such
that when I run `scons test`, it runs all tests, followed by the report
generator ?

Is this a sensible approach at all ?

Thanks,
        Stefan

-- 

      ...ich hab' noch einen Koffer in Berlin...



More information about the Scons-users mailing list