Makefiles for skip-level directories?

Peel, Casey casey.peel at isilon.com
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 <bsd.own.mk>
.if ${MK_TESTS} != "no"
SUBDIR+= tests
.endif
.include <bsd.subdir.mk>

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

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

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.

Thanks,
-- Casey

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



More information about the freebsd-testing mailing list