Replace hand-crafted Kyuafiles with automatic generation.

Redo r260506 by using the new TEST_METADATA functionality of bsd.test.mk
to mark the sh(1) and test(1) tests as not supporting root.  This is to
get rid of hand-crafted Kyuafiles for these very simple cases.

MFC after:	5 days
This commit is contained in:
Julio Merino 2014-01-14 18:45:32 +00:00
parent d935b54263
commit 9622238c09
4 changed files with 12 additions and 26 deletions

View File

@ -1,12 +0,0 @@
-- $FreeBSD$
syntax(2)
test_suite("FreeBSD")
-- Some tests in here are silently not run when the tests are executed as
-- root. Explicitly tell Kyua to drop privileges.
--
-- TODO(jmmv): Kyua needs to do this by default, not only when explicitly
-- requested. See https://code.google.com/p/kyua/issues/detail?id=6
tap_test_program{name="legacy_test", required_user="unprivileged"}

View File

@ -3,10 +3,15 @@
.include <bsd.own.mk>
TESTSDIR= ${TESTSBASE}/bin/sh
KYUAFILE= yes
TAP_TESTS_SH= legacy_test
TAP_TESTS_SH_SED_legacy_test= -e 's,__SH__,/bin/sh,g'
# Some tests in here are silently not run when the tests are executed as
# root. Explicitly tell Kyua to drop privileges.
#
# TODO(jmmv): Kyua needs to do this by default, not only when explicitly
# requested. See https://code.google.com/p/kyua/issues/detail?id=6
TEST_METADATA.legacy_test+= required_user="unprivileged"
SUBDIR+= builtins errors execution expansion parameters parser set-e

View File

@ -1,12 +0,0 @@
-- $FreeBSD$
syntax(2)
test_suite("FreeBSD")
-- Some tests in here are silently not run when the tests are executed as
-- root. Explicitly tell Kyua to drop privileges.
--
-- TODO(jmmv): Kyua needs to do this by default, not only when explicitly
-- requested. See https://code.google.com/p/kyua/issues/detail?id=6
tap_test_program{name="legacy_test", required_user="unprivileged"}

View File

@ -3,8 +3,13 @@
.include <bsd.own.mk>
TESTSDIR= ${TESTSBASE}/bin/test
KYUAFILE= yes
TAP_TESTS_SH= legacy_test
# Some tests in here are silently not run when the tests are executed as
# root. Explicitly tell Kyua to drop privileges.
#
# TODO(jmmv): Kyua needs to do this by default, not only when explicitly
# requested. See https://code.google.com/p/kyua/issues/detail?id=6
TEST_METADATA.legacy_test+= required_user="unprivileged"
.include <tap.test.mk>