Skip to content

Commit

Permalink
pkgbase: fix inclusion of tests in ssh, bsnmp, clibs-dev
Browse files Browse the repository at this point in the history
Currently, files that belong in the tests package are included in the
ssh, bsnmp, and clibs-dev packages:

ssh.plist
24:@dir(root,wheel,0755,) /usr/tests/secure/libexec
25:@(root,wheel,0444,) /usr/tests/secure/libexec/Kyuafile

bsnmp.plist
82:@dir(root,wheel,0755,) /usr/tests/lib/libbsnmp
83:@(root,wheel,0444,) /usr/tests/lib/libbsnmp/Kyuafile
84:@(root,wheel,0555,) /usr/tests/lib/libbsnmp/bsnmpd_test

clibs-dev.plist
2518:@dir(root,wheel,0755,) /usr/tests/lib/csu
2519:@(root,wheel,0444,) /usr/tests/lib/csu/Kyuafile

This is caused by the PACKAGE=foo assignment in foo/Makefile.inc which
overrides the default PACKAGE?=tests in bsd.test.mk.

To fix this, instead use PACKAGE?=foo in foo/Makefile.inc and set
PACKAGE=tests in foo/tests/Makefile.

PR:		249144
Reviewed by:	bapt, emaste
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D47025
  • Loading branch information
ifreund authored and emaste committed Dec 23, 2024
1 parent 969d1aa commit 3a56015
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/csu/Makefile.inc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
PACKAGE= clibs-dev
PACKAGE?= clibs-dev

NO_WMISSING_VARIABLE_DECLARATIONS=
# Can't instrument these files since that breaks non-sanitized programs.
Expand Down
2 changes: 2 additions & 0 deletions lib/csu/tests/Makefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
PACKAGE= tests

SUBDIR= dso
TESTS_SUBDIRS= dynamic
TESTS_SUBDIRS+= dynamiclib
Expand Down
2 changes: 1 addition & 1 deletion lib/libbsnmp/Makefile.inc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
INCSDIR= ${INCLUDEDIR}/bsnmp
PACKAGE= bsnmp
PACKAGE?= bsnmp

.include "../Makefile.inc"
2 changes: 2 additions & 0 deletions lib/libbsnmp/tests/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
.include <bsd.own.mk>

PACKAGE= tests

ATF_TESTS_C+= bsnmpd_test

SRCS.bsmpd_test= bsnmpd_test.c
Expand Down
2 changes: 1 addition & 1 deletion secure/libexec/Makefile.inc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
BINDIR?= /usr/libexec
PACKAGE= ssh
PACKAGE?= ssh

.include "../Makefile.inc"
1 change: 1 addition & 0 deletions secure/libexec/tests/Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
.PATH: ${SRCTOP}/tests
KYUAFILE= yes
PACKAGE= tests

.include <bsd.test.mk>

0 comments on commit 3a56015

Please sign in to comment.