svn commit: r260584 - head/usr.bin/atf/atf-sh/tests

Julio Merino jmmv at FreeBSD.org
Mon Jan 13 10:47:27 UTC 2014


Author: jmmv
Date: Mon Jan 13 10:47:26 2014
New Revision: 260584
URL: http://svnweb.freebsd.org/changeset/base/260584

Log:
  Prevent misc_helpers from running as a test.
  
  Do this by generating misc_helpers explicitly, without using the
  ATF_TESTS_SH functionality.
  
  While this script is technically an atf-sh test program, it is not intended
  to be run as a test and therefore it mustn't end up in the Kyuafile.  Using
  ATF_TESTS_SH means that misc_helpers ended up registered in the Kyuafile
  and then failed to run as a test.
  
  The alternative would be to supply an explicit Kyuafile from this directory
  that lists the known test files, but doing it the way described above will
  be easier to maintain.
  
  MFC after:	3 days

Modified:
  head/usr.bin/atf/atf-sh/tests/Makefile

Modified: head/usr.bin/atf/atf-sh/tests/Makefile
==============================================================================
--- head/usr.bin/atf/atf-sh/tests/Makefile	Mon Jan 13 04:46:48 2014	(r260583)
+++ head/usr.bin/atf/atf-sh/tests/Makefile	Mon Jan 13 10:47:26 2014	(r260584)
@@ -10,9 +10,17 @@ ATF=		${.CURDIR:H:H:H:H}/contrib/atf
 ATF_TESTS_SH+=	atf_check_test
 ATF_TESTS_SH+=	config_test
 ATF_TESTS_SH+=	integration_test
-ATF_TESTS_SH+=	misc_helpers
 ATF_TESTS_SH+=	normalize_test
 ATF_TESTS_SH+=	tc_test
 ATF_TESTS_SH+=	tp_test
 
+SCRIPTS+=		misc_helpers
+SCRIPTSDIR_misc_helpers=${TESTSDIR}
+CLEANFILES+=		misc_helpers misc_helpers.tmp
+misc_helpers: misc_helpers.sh
+	echo '#! /usr/bin/atf-sh' >${.TARGET}.tmp
+	cat ${.ALLSRC} >>${.TARGET}.tmp
+	chmod +x ${.TARGET}.tmp
+	mv ${.TARGET}.tmp ${.TARGET}
+
 .include <atf.test.mk>


More information about the svn-src-head mailing list