Scuttle is now working as intended for the standard use case. As described in the introductory post, for a C project with a standard layout, adding unit testing with Scuttle requires the following steps:
scuttle.heither locally to the project or in the system include path
scuttle.sheither locally to the project or somewhere on your
- Add test suite source files under
test/, each corresponding to a module of your project, named
test_<module>.c, using Scuttle’s simple macros
- Add a
testtarget to your main
test: bash scuttle.sh test $(MAKE) -C test
Scuttle will generate
test/test_<module>_gen.h for each
test/test_<module>.c suite, and the
test/test_<project>.c harness; and the generated Makefile’s
test target will build and run the test harness and pipe the output to
There’s a lot of room to make this more flexible and add some convenience features, but in terms of functionality it’s at MVP level now.
Tomorrow I’ll do a quick cleanup pass, make a few small tweaks I’ve already thought of, write some basic documentation, and actually push the code up to a public repo so if anyone’s interested in trying it out, it’ll be available.