diff options
author | ngie <ngie@FreeBSD.org> | 2016-05-04 23:20:53 +0000 |
---|---|---|
committer | ngie <ngie@FreeBSD.org> | 2016-05-04 23:20:53 +0000 |
commit | 92100036c841e961994633b0de4fdbc3c8217fb7 (patch) | |
tree | a3a2f2051c05cb9a95c4a94f6c5bbcd7a12cdfea /usr.sbin | |
parent | 76fb86ddfe6fe8cd628ebfb49b50dea38466dcef (diff) | |
download | FreeBSD-src-92100036c841e961994633b0de4fdbc3c8217fb7.zip FreeBSD-src-92100036c841e961994633b0de4fdbc3c8217fb7.tar.gz |
Merge ^/user/ngie/release-pkg-fix-tests to unbreak how test files are installed
after r298107
Summary of changes:
- Replace all instances of FILES/TESTS with ${PACKAGE}FILES. This ensures that
namespacing is kept with FILES appropriately, and that this shouldn't need
to be repeated if the namespace changes -- only the definition of PACKAGE
needs to be changed
- Allow PACKAGE to be overridden by callers instead of forcing it to always be
`tests`. In the event we get to the point where things can be split up
enough in the base system, it would make more sense to group the tests
with the blocks they're a part of, e.g. byacc with byacc-tests, etc
- Remove PACKAGE definitions where possible, i.e. where FILES wasn't used
previously.
- Remove unnecessary TESTSPACKAGE definitions; this has been elided into
bsd.tests.mk
- Remove unnecessary BINDIRs used previously with ${PACKAGE}FILES;
${PACKAGE}FILESDIR is now automatically defined in bsd.test.mk.
- Fix installation of files under data/ subdirectories in lib/libc/tests/hash
and lib/libc/tests/net/getaddrinfo
- Remove unnecessary .include <bsd.own.mk>s (some opportunistic cleanup)
Document the proposed changes in share/examples/tests/tests/... via examples
so it's clear that ${PACKAGES}FILES is the suggested way forward in terms of
replacing FILES. share/mk/bsd.README didn't seem like the appropriate method
of communicating that info.
MFC after: never probably
X-MFC with: r298107
PR: 209114
Relnotes: yes
Tested with: buildworld, installworld, checkworld; buildworld, packageworld
Sponsored by: EMC / Isilon Storage Division
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/chown/tests/Makefile | 4 | ||||
-rw-r--r-- | usr.sbin/etcupdate/tests/Makefile | 4 | ||||
-rw-r--r-- | usr.sbin/extattr/tests/Makefile | 4 | ||||
-rw-r--r-- | usr.sbin/fstyp/tests/Makefile | 15 | ||||
-rw-r--r-- | usr.sbin/makefs/tests/Makefile | 5 | ||||
-rw-r--r-- | usr.sbin/newsyslog/tests/Makefile | 4 | ||||
-rw-r--r-- | usr.sbin/nmtree/tests/Makefile | 23 | ||||
-rw-r--r-- | usr.sbin/pw/tests/Makefile | 10 | ||||
-rw-r--r-- | usr.sbin/rpcbind/tests/Makefile | 4 | ||||
-rw-r--r-- | usr.sbin/sa/tests/Makefile | 51 | ||||
-rw-r--r-- | usr.sbin/tests/Makefile | 8 |
11 files changed, 46 insertions, 86 deletions
diff --git a/usr.sbin/chown/tests/Makefile b/usr.sbin/chown/tests/Makefile index cdf872a..fb13f3f 100644 --- a/usr.sbin/chown/tests/Makefile +++ b/usr.sbin/chown/tests/Makefile @@ -2,10 +2,6 @@ .include <bsd.own.mk> -PACKAGE= tests -FILESGROUPS= TESTS -TESTSPACKAGE= ${PACKAGE} - TESTSDIR= ${TESTSBASE}/bin/chown TAP_TESTS_SH= chown-f_test diff --git a/usr.sbin/etcupdate/tests/Makefile b/usr.sbin/etcupdate/tests/Makefile index 1f09f1f..45b12b7 100644 --- a/usr.sbin/etcupdate/tests/Makefile +++ b/usr.sbin/etcupdate/tests/Makefile @@ -1,9 +1,5 @@ # $FreeBSD$ -PACKAGE= tests -FILESGROUPS= TESTS -TESTSPACKAGE= ${PACKAGE} - PLAIN_TESTS_SH= .for test in always_test \ conflicts_test \ diff --git a/usr.sbin/extattr/tests/Makefile b/usr.sbin/extattr/tests/Makefile index 935e6cf..7dec010 100644 --- a/usr.sbin/extattr/tests/Makefile +++ b/usr.sbin/extattr/tests/Makefile @@ -1,9 +1,5 @@ # $FreeBSD$ -PACKAGE= tests -FILESGROUPS= TESTS -TESTSPACKAGE= ${PACKAGE} - ATF_TESTS_SH= extattr_test .include <bsd.test.mk> diff --git a/usr.sbin/fstyp/tests/Makefile b/usr.sbin/fstyp/tests/Makefile index 9be7d45..71fc811 100644 --- a/usr.sbin/fstyp/tests/Makefile +++ b/usr.sbin/fstyp/tests/Makefile @@ -1,17 +1,14 @@ # $FreeBSD$ PACKAGE= tests -FILESGROUPS= TESTS -TESTSPACKAGE= ${PACKAGE} ATF_TESTS_SH= fstyp_test -FILES= ext2.img.bz2 -FILES+= ext3.img.bz2 -FILES+= ext4.img.bz2 -FILES+= ext4_with_label.img.bz2 -FILES+= ntfs.img.bz2 -FILES+= ntfs_with_label.img.bz2 -FILESDIR= ${TESTSDIR} +${PACKAGE}FILES+= ext2.img.bz2 +${PACKAGE}FILES+= ext3.img.bz2 +${PACKAGE}FILES+= ext4.img.bz2 +${PACKAGE}FILES+= ext4_with_label.img.bz2 +${PACKAGE}FILES+= ntfs.img.bz2 +${PACKAGE}FILES+= ntfs_with_label.img.bz2 .include <bsd.test.mk> diff --git a/usr.sbin/makefs/tests/Makefile b/usr.sbin/makefs/tests/Makefile index 87a4858..85e4b23 100644 --- a/usr.sbin/makefs/tests/Makefile +++ b/usr.sbin/makefs/tests/Makefile @@ -1,14 +1,11 @@ # $FreeBSD$ -PACKAGE= tests -FILESGROUPS= TESTS -TESTSPACKAGE= ${PACKAGE} - ATF_TESTS_SH+= makefs_cd9660_tests ATF_TESTS_SH+= makefs_ffs_tests BINDIR= ${TESTSDIR} +# XXX: PACKAGE support for SCRIPTS SCRIPTS+= makefs_tests_common.sh SCRIPTSNAME_makefs_tests_common.sh= makefs_tests_common.sh diff --git a/usr.sbin/newsyslog/tests/Makefile b/usr.sbin/newsyslog/tests/Makefile index 0b87442..802a44c 100644 --- a/usr.sbin/newsyslog/tests/Makefile +++ b/usr.sbin/newsyslog/tests/Makefile @@ -1,9 +1,5 @@ # $FreeBSD$ -PACKAGE= tests -FILESGROUPS= TESTS -TESTSPACKAGE= ${PACKAGE} - TAP_TESTS_SH= legacy_test .include <bsd.test.mk> diff --git a/usr.sbin/nmtree/tests/Makefile b/usr.sbin/nmtree/tests/Makefile index b4cc2f5..f88b4db 100644 --- a/usr.sbin/nmtree/tests/Makefile +++ b/usr.sbin/nmtree/tests/Makefile @@ -1,8 +1,7 @@ # $FreeBSD$ PACKAGE= tests -FILESGROUPS= TESTS -TESTSPACKAGE= ${PACKAGE} + TESTSRC= ${SRCTOP}/contrib/netbsd-tests/usr.sbin/mtree .PATH: ${TESTSRC} @@ -10,25 +9,23 @@ TESTSRC= ${SRCTOP}/contrib/netbsd-tests/usr.sbin/mtree ATF_TESTS_SH= nmtree_test ATF_TESTS_SH_SRC_nmtree_test= t_mtree.sh -FILESDIR= ${TESTSDIR} - # NOTE: the output from FreeBSD's nmtree displays sha256digest instead of # sha256; we need to mangle the specfiles to reflect this. .for f in mtree_d_create.out netbsd6_d_create.out CLEANFILES+= $f $f.tmp -FILES+= $f +${PACKAGE}FILES+= $f $f: ${TESTSRC}/$f sed -e 's/sha256/sha256digest/g' < ${.ALLSRC} > ${.TARGET}.tmp mv ${.TARGET}.tmp ${.TARGET} .endfor -FILES+= d_convert.in -FILES+= d_convert_C.out -FILES+= d_convert_C_S.out -FILES+= d_convert_D.out -FILES+= d_convert_D_S.out -FILES+= d_merge.in -FILES+= d_merge_C_M.out -FILES+= d_merge_C_M_S.out +${PACKAGE}FILES+= d_convert.in +${PACKAGE}FILES+= d_convert_C.out +${PACKAGE}FILES+= d_convert_C_S.out +${PACKAGE}FILES+= d_convert_D.out +${PACKAGE}FILES+= d_convert_D_S.out +${PACKAGE}FILES+= d_merge.in +${PACKAGE}FILES+= d_merge_C_M.out +${PACKAGE}FILES+= d_merge_C_M_S.out .include <bsd.test.mk> diff --git a/usr.sbin/pw/tests/Makefile b/usr.sbin/pw/tests/Makefile index 66ab454..1c69d50 100644 --- a/usr.sbin/pw/tests/Makefile +++ b/usr.sbin/pw/tests/Makefile @@ -1,8 +1,6 @@ # $FreeBSD$ PACKAGE= tests -FILESGROUPS= TESTS -TESTSPACKAGE= ${PACKAGE} ATF_TESTS_SH= pw_etcdir \ pw_lock \ @@ -19,8 +17,10 @@ ATF_TESTS_SH= pw_etcdir \ TEST_METADATA.${tp}+= required_user="root" .endfor -FILES= group helper_functions.shin master.passwd pw.conf \ - pw-modified.conf -FILESDIR= ${TESTSDIR} +${PACKAGE}FILES+= group +${PACKAGE}FILES+= helper_functions.shin +${PACKAGE}FILES+= master.passwd +${PACKAGE}FILES+= pw.conf +${PACKAGE}FILES+= pw-modified.conf .include <bsd.test.mk> diff --git a/usr.sbin/rpcbind/tests/Makefile b/usr.sbin/rpcbind/tests/Makefile index 83b4522..4b0cf15 100644 --- a/usr.sbin/rpcbind/tests/Makefile +++ b/usr.sbin/rpcbind/tests/Makefile @@ -2,10 +2,6 @@ .include <src.opts.mk> -PACKAGE= tests -FILESGROUPS= TESTS -TESTSPACKAGE= ${PACKAGE} - .PATH: ${.CURDIR}/.. ATF_TESTS_C= addrmerge_test diff --git a/usr.sbin/sa/tests/Makefile b/usr.sbin/sa/tests/Makefile index 36bfcc0..6d03999 100644 --- a/usr.sbin/sa/tests/Makefile +++ b/usr.sbin/sa/tests/Makefile @@ -1,35 +1,32 @@ # $FreeBSD$ PACKAGE= tests -FILESGROUPS= TESTS -TESTSPACKAGE= ${PACKAGE} TAP_TESTS_SH= legacy_test -FILESDIR= ${TESTSDIR} -FILES= v1-amd64-sav.in -FILES+= v1-amd64-sav.out -FILES+= v1-amd64-u.out -FILES+= v1-amd64-usr.in -FILES+= v1-amd64-usr.out -FILES+= v1-i386-sav.in -FILES+= v1-i386-sav.out -FILES+= v1-i386-u.out -FILES+= v1-i386-usr.in -FILES+= v1-i386-usr.out -FILES+= v1-sparc64-sav.in -FILES+= v1-sparc64-sav.out -FILES+= v1-sparc64-u.out -FILES+= v1-sparc64-usr.in -FILES+= v1-sparc64-usr.out -FILES+= v2-amd64-sav.in -FILES+= v2-amd64-u.out -FILES+= v2-amd64-usr.in -FILES+= v2-i386-sav.in -FILES+= v2-i386-u.out -FILES+= v2-i386-usr.in -FILES+= v2-sparc64-sav.in -FILES+= v2-sparc64-u.out -FILES+= v2-sparc64-usr.in +${PACKAGE}FILES+= v1-amd64-sav.in +${PACKAGE}FILES+= v1-amd64-sav.out +${PACKAGE}FILES+= v1-amd64-u.out +${PACKAGE}FILES+= v1-amd64-usr.in +${PACKAGE}FILES+= v1-amd64-usr.out +${PACKAGE}FILES+= v1-i386-sav.in +${PACKAGE}FILES+= v1-i386-sav.out +${PACKAGE}FILES+= v1-i386-u.out +${PACKAGE}FILES+= v1-i386-usr.in +${PACKAGE}FILES+= v1-i386-usr.out +${PACKAGE}FILES+= v1-sparc64-sav.in +${PACKAGE}FILES+= v1-sparc64-sav.out +${PACKAGE}FILES+= v1-sparc64-u.out +${PACKAGE}FILES+= v1-sparc64-usr.in +${PACKAGE}FILES+= v1-sparc64-usr.out +${PACKAGE}FILES+= v2-amd64-sav.in +${PACKAGE}FILES+= v2-amd64-u.out +${PACKAGE}FILES+= v2-amd64-usr.in +${PACKAGE}FILES+= v2-i386-sav.in +${PACKAGE}FILES+= v2-i386-u.out +${PACKAGE}FILES+= v2-i386-usr.in +${PACKAGE}FILES+= v2-sparc64-sav.in +${PACKAGE}FILES+= v2-sparc64-u.out +${PACKAGE}FILES+= v2-sparc64-usr.in .include <bsd.test.mk> diff --git a/usr.sbin/tests/Makefile b/usr.sbin/tests/Makefile index 06058a0..3b3078f 100644 --- a/usr.sbin/tests/Makefile +++ b/usr.sbin/tests/Makefile @@ -1,13 +1,5 @@ # $FreeBSD$ -.include <bsd.own.mk> - -FILESGROUPS= FILES -PACKAGE= tests -FILESGROUPS+= TESTS -TESTSPACKAGE= ${PACKAGE} -TESTS+= Kyuafile - .PATH: ${SRCTOP}/tests KYUAFILE= yes |