Skip to content

Commit

Permalink
Merge ^/user/ngie/release-pkg-fix-tests to unbreak how test files are…
Browse files Browse the repository at this point in the history
… 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
  • Loading branch information
ngie-eign committed May 4, 2016
1 parent e45163b commit 430f728
Show file tree
Hide file tree
Showing 337 changed files with 2,184 additions and 2,889 deletions.
8 changes: 2 additions & 6 deletions bin/cat/tests/Makefile
Original file line number Diff line number Diff line change
@@ -1,15 +1,11 @@
# $FreeBSD$

PACKAGE= tests
FILESGROUPS= TESTS
TESTSPACKAGE= ${PACKAGE}

NETBSD_ATF_TESTS_SH= cat_test

FILESDIR= ${TESTSDIR}

FILES= d_align.in
FILES+= d_align.out
${PACKAGE}FILES+= d_align.in
${PACKAGE}FILES+= d_align.out

.include <netbsd-tests.test.mk>

Expand Down
6 changes: 0 additions & 6 deletions bin/date/tests/Makefile
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
# $FreeBSD$

.include <bsd.own.mk>

PACKAGE= tests
FILESGROUPS= TESTS
TESTSPACKAGE= ${PACKAGE}

ATF_TESTS_SH= format_string_test

.include <bsd.test.mk>
4 changes: 0 additions & 4 deletions bin/dd/tests/Makefile
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
# $FreeBSD$

PACKAGE= tests
FILESGROUPS= TESTS
TESTSPACKAGE= ${PACKAGE}

NETBSD_ATF_TESTS_SH= dd_test

.include <netbsd-tests.test.mk>
Expand Down
4 changes: 0 additions & 4 deletions bin/expr/tests/Makefile
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
# $FreeBSD$

PACKAGE= tests
FILESGROUPS= TESTS
TESTSPACKAGE= ${PACKAGE}

NETBSD_ATF_TESTS_SH= expr_test

ATF_TESTS_SH_SED_expr_test+= -e 's/eval expr/eval expr --/g'
Expand Down
4 changes: 0 additions & 4 deletions bin/ls/tests/Makefile
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
# $FreeBSD$

PACKAGE= tests
FILESGROUPS= TESTS
TESTSPACKAGE= ${PACKAGE}

ATF_TESTS_SH+= ls_tests
# This seems like overkill, but the idea in mind is that all of the testcases
# should be runnable as !root
Expand Down
4 changes: 0 additions & 4 deletions bin/mv/tests/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@

.include <bsd.own.mk>

PACKAGE= tests
FILESGROUPS= TESTS
TESTSPACKAGE= ${PACKAGE}

TAP_TESTS_SH= legacy_test

.include <bsd.test.mk>
4 changes: 0 additions & 4 deletions bin/pax/tests/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@

.include <bsd.own.mk>

PACKAGE= tests
FILESGROUPS= TESTS
TESTSPACKAGE= ${PACKAGE}

TAP_TESTS_PERL= legacy_test

.include <bsd.test.mk>
4 changes: 0 additions & 4 deletions bin/pkill/tests/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@

.include <bsd.own.mk>

PACKAGE= tests
FILESGROUPS= TESTS
TESTSPACKAGE= ${PACKAGE}

TAP_TESTS_SH= pgrep-F_test
TAP_TESTS_SH+= pgrep-LF_test
TAP_TESTS_SH+= pgrep-P_test
Expand Down
4 changes: 0 additions & 4 deletions bin/sh/tests/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@

.include <bsd.own.mk>

PACKAGE= tests
FILESGROUPS= TESTS
TESTSPACKAGE= ${PACKAGE}

TESTS_SUBDIRS+= builtins
TESTS_SUBDIRS+= errors
TESTS_SUBDIRS+= execution
Expand Down
Loading

0 comments on commit 430f728

Please sign in to comment.