From 9622238c09a17f74ca930020f2420952e324a155 Mon Sep 17 00:00:00 2001 From: Julio Merino Date: Tue, 14 Jan 2014 18:45:32 +0000 Subject: 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 --- bin/sh/tests/Kyuafile | 12 ------------ bin/sh/tests/Makefile | 7 ++++++- bin/test/tests/Kyuafile | 12 ------------ bin/test/tests/Makefile | 7 ++++++- 4 files changed, 12 insertions(+), 26 deletions(-) delete mode 100644 bin/sh/tests/Kyuafile delete mode 100644 bin/test/tests/Kyuafile diff --git a/bin/sh/tests/Kyuafile b/bin/sh/tests/Kyuafile deleted file mode 100644 index b2e4b320dd89..000000000000 --- a/bin/sh/tests/Kyuafile +++ /dev/null @@ -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"} diff --git a/bin/sh/tests/Makefile b/bin/sh/tests/Makefile index 94bcba6062d8..f6ddb8a07277 100644 --- a/bin/sh/tests/Makefile +++ b/bin/sh/tests/Makefile @@ -3,10 +3,15 @@ .include 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 diff --git a/bin/test/tests/Kyuafile b/bin/test/tests/Kyuafile deleted file mode 100644 index b2e4b320dd89..000000000000 --- a/bin/test/tests/Kyuafile +++ /dev/null @@ -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"} diff --git a/bin/test/tests/Makefile b/bin/test/tests/Makefile index dfffbedd735a..be32dbb29bf8 100644 --- a/bin/test/tests/Makefile +++ b/bin/test/tests/Makefile @@ -3,8 +3,13 @@ .include 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 -- cgit v1.2.3