Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/share/mk Prevent build breakage if TESTSDIR is not defined (...
details: https://anonhg.NetBSD.org/src/rev/cf87681fca94
branches: trunk
changeset: 755742:cf87681fca94
user: jmmv <jmmv%NetBSD.org@localhost>
date: Fri Jun 18 13:14:21 2010 +0000
description:
Prevent build breakage if TESTSDIR is not defined (as in tests/modules/k_helper).
diffstat:
share/mk/bsd.test.mk | 14 ++++++++++----
1 files changed, 10 insertions(+), 4 deletions(-)
diffs (46 lines):
diff -r ca4605e2189f -r cf87681fca94 share/mk/bsd.test.mk
--- a/share/mk/bsd.test.mk Fri Jun 18 10:10:57 2010 +0000
+++ b/share/mk/bsd.test.mk Fri Jun 18 13:14:21 2010 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.test.mk,v 1.9 2010/06/18 10:10:57 jmmv Exp $
+# $NetBSD: bsd.test.mk,v 1.10 2010/06/18 13:14:21 jmmv Exp $
#
.include <bsd.init.mk>
@@ -79,14 +79,15 @@
CLEANFILES += ${_TESTS_FIFO} ${_TESTS_LOG}
.PHONY: test
-.if ${TESTSDIR} == ${TESTSBASE}
+.if defined(TESTSDIR)
+. if ${TESTSDIR} == ${TESTSBASE}
# Forbid this case. It is likely to cause false positives/negatives and it
# does not cover all the tests (e.g. it misses testing software in external).
test:
@echo "*** Sorry, you cannot use make test from src/tests. Install the"
@echo "*** tests into their final location and run them from /usr/tests"
@false
-.else
+. else
test:
@echo "*** WARNING: make test is experimental"
@echo "***"
@@ -94,7 +95,8 @@
@echo "*** installed in /usr/tests. This test run may raise false"
@echo "*** positives and/or false negatives."
@echo
- @cd ${DESTDIR}${TESTSDIR}; \
+ @set -e; \
+ cd ${DESTDIR}${TESTSDIR}; \
mkfifo ${_TESTS_FIFO}; \
cat ${_TESTS_FIFO} | tee ${_TESTS_LOG} | \
${TESTS_ENV} ${DESTDIR}/usr/bin/atf-report & \
@@ -106,4 +108,8 @@
echo "*** The verbatim output of atf-run has been saved to ${_TESTS_LOG}"; \
echo "*** Once again, note that "make test" is unsupported."; \
test $${result} -eq 0
+. endif
+.else
+test:
+ @echo "*** No TESTSDIR defined; nothing to do."
.endif
Home |
Main Index |
Thread Index |
Old Index