Plugging ATF tests into the build and other cleanups

Simon J. Gerraty sjg at
Tue Oct 29 20:59:49 UTC 2013

On Sun, 27 Oct 2013 21:31:12 -0400, Julio Merino writes:
>revisit this, although I'm not sure how you can easily determine the
>list of "current tests". AFAIK there is no list in src detailing all
>files that are expected to be installed?

So I know this probably doesn't help but....

As I think I've mentioned in our build, we build tests and stage them
automatically to a stage tree ($SB/obj/stage/$MACHINE/usr/tests/...)
unless building for the pseudo machine 'host' in which case the tests
are run in-place as part of the build - tests fail, build fails.

Anyway, before the makefile that does "packaging" for the tests, another
does a scan of $SB/obj/stage/$MACHINE/usr/tests/ to find all the tests
and build the manifest that will be used for them.

This avoids having to maintain a list, and makes adding tests trivial.

>My concern is only about the latter at the moment. When MK_TESTS=no,
>/usr/tests should not exist at all and, therefore, a "make
>delete-old-files" should wipe it. We can do this as usual, with the

Obviously this really only matters if/when one does 
'make delete-old-files -DWITHOUT_TESTS'

>functionality in tools/build/mk/ to record
>all files to be deleted, or we can do something different to avoid
>maintaining the list by hand. A simple "rm -rf ${DESTDIR}/usr/tests"
>would suffice, but I'm just wondering if that'd be an acceptable thing
>to do.

Not quite within the context of delete-old-files given the way it works,
but doesn't mean one couldn't add delete-old-dirs-rmrf
with its own list for input eg. OLD_DIRS_RMRF

>> We would need some way to have "local" tests but that should not be difficul
>You mean tests from ports and/or for manually installed software?
>Those should all be somewhere in /usr/local/ and we can easily hook
>them into the test suite.  (Hadn't thought about these, but it's

The model I mentioned above "just works" in this case.
Not much help though until using all the goodies on projects/bmake
(the above isn't there either yet - hope to fix that soon).

More information about the freebsd-testing mailing list