Makefiles for skip-level directories?

Peel, Casey casey.peel at
Thu Mar 27 22:25:55 UTC 2014

We've created some ATF network tests in sys/net/, which involved creating the sys/net/tests directory and sys/net/tests/Makefile. There are currently no tests under sys/ at all. In order for that Makefile to get picked up by the build, I added sys/net/Makefile that looks like this:
# $FreeBSD$
.include <>
.if ${MK_TESTS} != "no"
SUBDIR+= tests
.include <>

For that to get picked up, I added this to sys/Makefile before .include <>:
.if ${MK_TESTS} != "no"
SUBDIR+= net

My tests build and get installed correctly in /usr/tests:
[root at system /usr/tests]# find sys

You'll note that there is no Kyuafile in sys/ which prevents kyua from traversing into sys/net/ to pick up the Kyuafile there and actually execute the test from /usr/tests

All that to say: what magic am I missing in the sys/Makefile to have the sys/Kyuafile generated? I've looked and can't find another example in the current tests that have this type of skip-level test layout.

-- Casey

Performance Test Ninja
casey.peel at<mailto:casey.peel at> / 206.777.7945

More information about the freebsd-testing mailing list