From b8ce141a401c502407ab3e076ccfc3b428c8ac61 Mon Sep 17 00:00:00 2001 From: jmmv Date: Sat, 28 Dec 2013 20:05:31 +0000 Subject: Set up the /usr/tests hierarchy. This is a MFC of the following into stable/10: - r257097 Set up the /usr/tests hierarchy. - r257098 Add missing WITHOUTTESTS file. - r257100 Add a tests(7) manual page. - r257105 Disable WITHTESTS= for now. - r257848 Fix buildworld when WITHTESTS is enabled. - r257850 Subsume the functionality of MKATF into MKTESTS. - r257851 Handle the removal of the test suite when WITHOUTTESTS=yes. - r257852 Install category Kyuafiles from their category directories. - r258232 Install BSD.tests.mtree when MKTESTS is yes. Note that building with WITH_TESTS is still broken at this point (and hence why WITHOUT_TESTS is the set as the default). Subsequent pullups will fix the remaining issues. --- lib/Makefile | 12 +++++++----- lib/libcrypt/Makefile | 5 +++++ lib/libcrypt/tests/Makefile | 2 ++ lib/tests/Makefile | 10 ++++++++++ 4 files changed, 24 insertions(+), 5 deletions(-) create mode 100644 lib/tests/Makefile (limited to 'lib') diff --git a/lib/Makefile b/lib/Makefile index 1ededec..e78ff8f 100644 --- a/lib/Makefile +++ b/lib/Makefile @@ -127,7 +127,8 @@ SUBDIR= ${SUBDIR_ORDERED} \ libyaml \ libz \ ${_atf} \ - ${_clang} + ${_clang} \ + ${_tests} .if exists(${.CURDIR}/csu/${MACHINE_ARCH}-elf) _csu=csu/${MACHINE_ARCH}-elf @@ -141,10 +142,6 @@ _csu=csu # NB: keep these sorted by MK_* knobs -.if ${MK_ATF} != "no" -_atf= atf -.endif - .if ${MK_ATM} != "no" _libngatm= libngatm .endif @@ -254,6 +251,11 @@ _libsmutil= libsmutil _libtelnet= libtelnet .endif +.if ${MK_TESTS} != "no" +_atf= atf +_tests= tests +.endif + .if ${MK_UNBOUND} != "no" _libunbound= libunbound .endif diff --git a/lib/libcrypt/Makefile b/lib/libcrypt/Makefile index 7274e28..798b4b6 100644 --- a/lib/libcrypt/Makefile +++ b/lib/libcrypt/Makefile @@ -37,4 +37,9 @@ WARNS?= 2 PRECIOUSLIB= +.if ${MK_TESTS} != "no" +SUBDIR+= tests +.endif + .include +.include diff --git a/lib/libcrypt/tests/Makefile b/lib/libcrypt/tests/Makefile index 8c818bd..51adc2d 100644 --- a/lib/libcrypt/tests/Makefile +++ b/lib/libcrypt/tests/Makefile @@ -2,6 +2,8 @@ # exercise libcrypt +TESTSDIR= ${TESTSBASE}/lib/libcrypt + ATF_TESTS_C= crypt_tests CFLAGS+= -I${.CURDIR:H} diff --git a/lib/tests/Makefile b/lib/tests/Makefile new file mode 100644 index 0000000..935fd70 --- /dev/null +++ b/lib/tests/Makefile @@ -0,0 +1,10 @@ +# $FreeBSD$ + +.include + +TESTSDIR= ${TESTSBASE}/lib + +.PATH: ${.CURDIR:H:H}/tests +KYUAFILE= yes + +.include -- cgit v1.1