packages: Remove the tests-dev package
We don't want a tests-dev package, because this means set-devel depends on tests-dev, which transitively depends on tests, which means you can't install set-devel without also getting tests. The only real "dev" files in tests-dev are from ATF (libprivateatf), so move that to its own package and add a dependency from tests. Also move Kyua to its own package, since this might be useful for running tests even when the user doesn't want the whole set of base tests installed. Add a dependency from -tests to both -atf and -kyua, and a dependency on -set-base, since the tests won't work without the full base system installed. The remaining "dev" files in tests are actually test artifacts, not real development libraries. Add a new NO_DEV_PACKAGE option to bsd.lib.mk, which causes dev files to be installed in the base package instead of creating a -dev package, and set this option for everything that installs test libraries. While here, add a slightly more informative description for the tests package. MFC after: 3 seconds Reviewed by: bapt, emaste Differential Revision: https://reviews.freebsd.org/D52597
This commit is contained in:
@@ -27,6 +27,14 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 16.x IS SLOW:
|
|||||||
world, or to merely disable the most expensive debugging functionality
|
world, or to merely disable the most expensive debugging functionality
|
||||||
at runtime, run "ln -s 'abort:false,junk:false' /etc/malloc.conf".)
|
at runtime, run "ln -s 'abort:false,junk:false' /etc/malloc.conf".)
|
||||||
|
|
||||||
|
20250918:
|
||||||
|
Kyua has been moved to the FreeBSD-kyua package, and ATF has been moved
|
||||||
|
to the FreeBSD-atf* packages. If you have FreeBSD-tests installed,
|
||||||
|
these packages will be installed automatically, otherwise you should
|
||||||
|
manually install them if you need these tools.
|
||||||
|
|
||||||
|
This only affects pkgbase users.
|
||||||
|
|
||||||
20250912:
|
20250912:
|
||||||
If SRCCONF is unset and a file named src.conf is present at
|
If SRCCONF is unset and a file named src.conf is present at
|
||||||
the top of the source tree, it will now be used instead of
|
the top of the source tree, it will now be used instead of
|
||||||
|
|||||||
@@ -24,6 +24,8 @@
|
|||||||
# SUCH DAMAGE.
|
# SUCH DAMAGE.
|
||||||
#
|
#
|
||||||
|
|
||||||
|
PACKAGE= atf
|
||||||
|
LIB_PACKAGE=
|
||||||
CFLAGS+= -DHAVE_CONFIG_H
|
CFLAGS+= -DHAVE_CONFIG_H
|
||||||
|
|
||||||
WARNS?= 3
|
WARNS?= 3
|
||||||
|
|||||||
@@ -27,7 +27,6 @@
|
|||||||
.include <src.opts.mk>
|
.include <src.opts.mk>
|
||||||
.include <bsd.init.mk>
|
.include <bsd.init.mk>
|
||||||
|
|
||||||
PACKAGE= tests
|
|
||||||
LIB_CXX= atf-c++
|
LIB_CXX= atf-c++
|
||||||
PRIVATELIB= true
|
PRIVATELIB= true
|
||||||
SHLIB_MAJOR= 2
|
SHLIB_MAJOR= 2
|
||||||
|
|||||||
@@ -1,7 +1,5 @@
|
|||||||
.include <bsd.init.mk>
|
.include <bsd.init.mk>
|
||||||
|
|
||||||
PACKAGE= tests
|
|
||||||
|
|
||||||
TESTS_SUBDIRS= detail
|
TESTS_SUBDIRS= detail
|
||||||
|
|
||||||
ATF= ${SRCTOP}/contrib/atf
|
ATF= ${SRCTOP}/contrib/atf
|
||||||
|
|||||||
@@ -27,7 +27,6 @@
|
|||||||
.include <src.opts.mk>
|
.include <src.opts.mk>
|
||||||
.include <bsd.init.mk>
|
.include <bsd.init.mk>
|
||||||
|
|
||||||
PACKAGE= tests
|
|
||||||
LIB= atf-c
|
LIB= atf-c
|
||||||
PRIVATELIB= true
|
PRIVATELIB= true
|
||||||
SHLIB_MAJOR= 1
|
SHLIB_MAJOR= 1
|
||||||
|
|||||||
@@ -1,7 +1,5 @@
|
|||||||
.include <bsd.init.mk>
|
.include <bsd.init.mk>
|
||||||
|
|
||||||
PACKAGE= tests
|
|
||||||
|
|
||||||
TESTS_SUBDIRS= detail
|
TESTS_SUBDIRS= detail
|
||||||
|
|
||||||
ATF= ${SRCTOP}/contrib/atf
|
ATF= ${SRCTOP}/contrib/atf
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ SRCS= h_tls_dlopen.c
|
|||||||
|
|
||||||
MAN=
|
MAN=
|
||||||
PACKAGE= tests
|
PACKAGE= tests
|
||||||
|
NO_DEV_PACKAGE=
|
||||||
|
|
||||||
LIBDIR= ${TESTSBASE}/lib/libc/tls
|
LIBDIR= ${TESTSBASE}/lib/libc/tls
|
||||||
SHLIB_MAJOR= 1
|
SHLIB_MAJOR= 1
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ LIBDIR= ${TESTSBASE}/lib/libc/tls
|
|||||||
SHLIBDIR= ${TESTSBASE}/lib/libc/tls
|
SHLIBDIR= ${TESTSBASE}/lib/libc/tls
|
||||||
SHLIB_MAJOR= 1
|
SHLIB_MAJOR= 1
|
||||||
PACKAGE= tests
|
PACKAGE= tests
|
||||||
|
NO_DEV_PACKAGE=
|
||||||
|
|
||||||
WITHOUT_STATIC=
|
WITHOUT_STATIC=
|
||||||
WITHOUT_PROFILE=
|
WITHOUT_PROFILE=
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
PACKAGE= tests
|
PACKAGE= tests
|
||||||
|
NO_DEV_PACKAGE=
|
||||||
|
|
||||||
LIBXOSRC= ${SRCTOP}/contrib/libxo
|
LIBXOSRC= ${SRCTOP}/contrib/libxo
|
||||||
|
|
||||||
|
|||||||
@@ -24,6 +24,8 @@
|
|||||||
# SUCH DAMAGE.
|
# SUCH DAMAGE.
|
||||||
#
|
#
|
||||||
|
|
||||||
|
PACKAGE= atf
|
||||||
|
LIB_PACKAGE=
|
||||||
CFLAGS+= -DHAVE_CONFIG_H
|
CFLAGS+= -DHAVE_CONFIG_H
|
||||||
|
|
||||||
WARNS?= 3
|
WARNS?= 3
|
||||||
|
|||||||
@@ -30,7 +30,6 @@
|
|||||||
ATF= ${SRCTOP}/contrib/atf
|
ATF= ${SRCTOP}/contrib/atf
|
||||||
.PATH: ${ATF}/atf-sh
|
.PATH: ${ATF}/atf-sh
|
||||||
|
|
||||||
PACKAGE= tests
|
|
||||||
PROG_CXX= atf-check
|
PROG_CXX= atf-check
|
||||||
SRCS= atf-check.cpp
|
SRCS= atf-check.cpp
|
||||||
MAN= atf-check.1
|
MAN= atf-check.1
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
.include <src.opts.mk>
|
.include <src.opts.mk>
|
||||||
.include <bsd.init.mk>
|
.include <bsd.init.mk>
|
||||||
|
|
||||||
PACKAGE= tests
|
|
||||||
PROG_CXX= atf_pytest_wrapper
|
PROG_CXX= atf_pytest_wrapper
|
||||||
SRCS= atf_pytest_wrapper.cpp
|
SRCS= atf_pytest_wrapper.cpp
|
||||||
MAN=
|
MAN=
|
||||||
|
|||||||
@@ -30,7 +30,6 @@
|
|||||||
ATF= ${SRCTOP}/contrib/atf
|
ATF= ${SRCTOP}/contrib/atf
|
||||||
.PATH: ${ATF}/atf-sh
|
.PATH: ${ATF}/atf-sh
|
||||||
|
|
||||||
PACKAGE= tests
|
|
||||||
PROG_CXX= atf-sh
|
PROG_CXX= atf-sh
|
||||||
SRCS= atf-sh.cpp
|
SRCS= atf-sh.cpp
|
||||||
MAN= atf-sh.1 atf-sh.3
|
MAN= atf-sh.1 atf-sh.3
|
||||||
|
|||||||
@@ -1,2 +1,3 @@
|
|||||||
PACKAGE?= tests
|
PACKAGE?= tests
|
||||||
|
NO_DEV_PACKAGE=
|
||||||
TESTSDIR?= ${TESTSBASE}/libexec/rtld-elf
|
TESTSDIR?= ${TESTSBASE}/libexec/rtld-elf
|
||||||
|
|||||||
@@ -0,0 +1,8 @@
|
|||||||
|
comment = "Automated Testing Framework"
|
||||||
|
|
||||||
|
desc = <<EOD
|
||||||
|
The Automated Testing Framework (ATF) is a collection of libraries to implement
|
||||||
|
test programs in a variety of languages. These libraries all offer similar
|
||||||
|
functionality and any test program written with them exposes a consistent user
|
||||||
|
interface.
|
||||||
|
EOD
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
comment = "Testing framework for infrastructure software"
|
||||||
|
|
||||||
|
desc = <<EOD
|
||||||
|
Kyua is a testing framework for infrastructure software, originally designed
|
||||||
|
to equip BSD-based operating systems with a test suite. This means that Kyua
|
||||||
|
is lightweight and simple, and that Kyua integrates well with various build
|
||||||
|
systems and continuous integration frameworks.
|
||||||
|
|
||||||
|
Kyua features an expressive test suite definition language, a safe runtime
|
||||||
|
engine for test suites and a powerful report generation engine.
|
||||||
|
|
||||||
|
Kyua is for both developers and users, from the developer applying a simple
|
||||||
|
fix to a library to the system administrator deploying a new release on a
|
||||||
|
production machine.
|
||||||
|
|
||||||
|
Kyua is able to execute test programs written with a plethora of testing
|
||||||
|
libraries and languages. The test program library of choice is ATF, which
|
||||||
|
kyua's design originated from. However, framework-less test programs and
|
||||||
|
TAP-compliant test programs can also be executed through kyua.
|
||||||
|
EOD
|
||||||
@@ -1,8 +1,31 @@
|
|||||||
comment = "Test Suite"
|
comment = "Test suite"
|
||||||
|
|
||||||
desc = <<EOD
|
desc = <<EOD
|
||||||
Test Suite
|
The test suite, installed in /usr/tests, allows the functionality of the
|
||||||
|
installed system to be verified.
|
||||||
EOD
|
EOD
|
||||||
|
|
||||||
|
deps {
|
||||||
|
# Nearly all the tests require atf to run.
|
||||||
|
"atf": {
|
||||||
|
version = "${VERSION}"
|
||||||
|
origin = "base"
|
||||||
|
},
|
||||||
|
|
||||||
|
# The test framework requires Kyua.
|
||||||
|
"kyua": {
|
||||||
|
version = "${VERSION}"
|
||||||
|
origin = "base"
|
||||||
|
},
|
||||||
|
|
||||||
|
# Since the purpose of the tests is to test the base system, the base
|
||||||
|
# system must be installed.
|
||||||
|
"set-base": {
|
||||||
|
version = "${VERSION}"
|
||||||
|
origin = "base"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
annotations {
|
annotations {
|
||||||
set = tests
|
set = tests
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -74,7 +74,14 @@ LIB_TAG_ARGS= ${TAG_ARGS}
|
|||||||
TAG_ARGS= -T ${TAGS:ts,:[*]}
|
TAG_ARGS= -T ${TAGS:ts,:[*]}
|
||||||
|
|
||||||
DBG_TAG_ARGS= ${TAG_ARGS},dbg
|
DBG_TAG_ARGS= ${TAG_ARGS},dbg
|
||||||
|
# Usually we want to put development files (e.g., static libraries) into a
|
||||||
|
# separate -dev packages but for a few cases, like tests, that's not wanted,
|
||||||
|
# so allow the caller to disable it by setting NO_DEV_PACKAGE.
|
||||||
|
.if !defined(NO_DEV_PACKAGE)
|
||||||
DEV_TAG_ARGS= ${TAG_ARGS},dev
|
DEV_TAG_ARGS= ${TAG_ARGS},dev
|
||||||
|
.else
|
||||||
|
DEV_TAG_ARGS= ${TAG_ARGS}
|
||||||
|
.endif
|
||||||
.endif # !defined(NO_ROOT)
|
.endif # !defined(NO_ROOT)
|
||||||
|
|
||||||
# ELF hardening knobs
|
# ELF hardening knobs
|
||||||
@@ -450,7 +457,11 @@ LINKGRP?= ${LIBGRP}
|
|||||||
LINKMODE?= ${LIBMODE}
|
LINKMODE?= ${LIBMODE}
|
||||||
SYMLINKOWN?= ${LIBOWN}
|
SYMLINKOWN?= ${LIBOWN}
|
||||||
SYMLINKGRP?= ${LIBGRP}
|
SYMLINKGRP?= ${LIBGRP}
|
||||||
|
.if !defined(NO_DEV_PACKAGE)
|
||||||
LINKTAGS= dev${_COMPAT_TAG}
|
LINKTAGS= dev${_COMPAT_TAG}
|
||||||
|
.else
|
||||||
|
LINKTAGS= ${_COMPAT_TAG}
|
||||||
|
.endif
|
||||||
.include <bsd.links.mk>
|
.include <bsd.links.mk>
|
||||||
|
|
||||||
.if ${MK_MAN} != "no" && !defined(LIBRARIES_ONLY)
|
.if ${MK_MAN} != "no" && !defined(LIBRARIES_ONLY)
|
||||||
|
|||||||
@@ -16,6 +16,9 @@ LOCALBASE?= /usr/local
|
|||||||
TESTSDIR?= ${TESTSBASE}/${RELDIR:H}
|
TESTSDIR?= ${TESTSBASE}/${RELDIR:H}
|
||||||
|
|
||||||
PACKAGE?= tests
|
PACKAGE?= tests
|
||||||
|
# Prevent creating a -dev package for tests. Sometimes tests include static
|
||||||
|
# libraries or other artifacts which are not actually "development" files.
|
||||||
|
NO_DEV_PACKAGE=
|
||||||
|
|
||||||
FILESGROUPS+= ${PACKAGE}FILES
|
FILESGROUPS+= ${PACKAGE}FILES
|
||||||
${PACKAGE}FILESPACKAGE= ${PACKAGE}
|
${PACKAGE}FILESPACKAGE= ${PACKAGE}
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ KYUA_VERSION= 0.13
|
|||||||
KYUA_SRCDIR= ${SRCTOP}/contrib/kyua
|
KYUA_SRCDIR= ${SRCTOP}/contrib/kyua
|
||||||
.PATH: ${KYUA_SRCDIR}
|
.PATH: ${KYUA_SRCDIR}
|
||||||
|
|
||||||
PACKAGE= tests
|
PACKAGE= kyua
|
||||||
PROG_CXX= kyua
|
PROG_CXX= kyua
|
||||||
SRCS= main.cpp
|
SRCS= main.cpp
|
||||||
LIBADD= lutok sqlite3 util
|
LIBADD= lutok sqlite3 util
|
||||||
|
|||||||
Reference in New Issue
Block a user