diff options
author | mi <mi@FreeBSD.org> | 2006-10-11 04:25:58 +0800 |
---|---|---|
committer | mi <mi@FreeBSD.org> | 2006-10-11 04:25:58 +0800 |
commit | 795b55672e9f47f42423aae29a1b429667b80992 (patch) | |
tree | 8a279a4daef954b1b890dd957a57e591cd5a5e30 | |
parent | 3bb882cede4132fcc4cfdbfb5496e3cc51356180 (diff) | |
download | freebsd-ports-gnome-795b55672e9f47f42423aae29a1b429667b80992.tar.gz freebsd-ports-gnome-795b55672e9f47f42423aae29a1b429667b80992.tar.zst freebsd-ports-gnome-795b55672e9f47f42423aae29a1b429667b80992.zip |
Several tests fail, when run as root. Arrange to run them as `nobody', when
detecting a root-build.
Also, parse the created testlog to output only the failures (if any) to ease
the resolution of problem reports.
Reported by: Paul Schmehl, Sean McNeil
Approved by: portmgr (erwin)
-rw-r--r-- | devel/tcllib/Makefile | 31 | ||||
-rw-r--r-- | devel/tcllib/pkg-plist | 2 |
2 files changed, 21 insertions, 12 deletions
diff --git a/devel/tcllib/Makefile b/devel/tcllib/Makefile index 3b0ae79a7788..2f43a3b9a536 100644 --- a/devel/tcllib/Makefile +++ b/devel/tcllib/Makefile @@ -58,28 +58,37 @@ MANN= aes.n asn.n ansi_cmacros.n ansi_cctrl.n ansi_cattr.n \ MANCOMPRESSED= no post-patch: - # Substituting the pretty progress report with detailed output of - # vendors' self-tests: + # + # Ensure, the detailed output of vendors' self-tests is + # available in addition to the pretty progress report: + # ${REINPLACE_CMD} -e 's,test run,test run -l testlog,' \ ${WRKSRC}/Makefile.in -test: -.ifdef DISPLAY +.include <bsd.port.pre.mk> + +RUNTEST= ${SETENV} LANG=C DISPLAY= ${MAKE} -C ${WRKSRC} test +MYID != ${ID} -u +.if ${MYID} == 0 +RUNTEST:= ${SU_CMD:S/root/-m nobody/} "${RUNTEST}" +pre-build: # - # DISPLAY environment variable appears to be set (${DISPLAY}). - # Tcllib may perform some additional Tk-only tests. + # Preparing to run the tests as `nobody' # - -${TEST} -t 1 && sleep 2 + ${FIND} ${WRKSRC} -type d | ${XARGS} ${CHOWN} nobody .endif - @set -x ; if ! (cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${MAKE} test); \ + +test: + @set -x ; if ! ${RUNTEST}; \ then \ + ${AWK} '$$NF == "FAILED" { echo = 1 } \ + echo { if ($$NF == "start") echo = 0; else print }' \ + ${WRKSRC}/testlog.log; \ ${CAT} ${WRKSRC}/testlog.failures; \ - ${UNAME} -a \ + ${UNAME} -a; \ ${FALSE}; \ fi -.include <bsd.port.pre.mk> - post-build: test .include <bsd.port.post.mk> diff --git a/devel/tcllib/pkg-plist b/devel/tcllib/pkg-plist index 1a4d98d84443..6e72896eb93a 100644 --- a/devel/tcllib/pkg-plist +++ b/devel/tcllib/pkg-plist @@ -1,4 +1,4 @@ -bin/dtplit +bin/dtplite bin/page bin/tcldocstrip lib/tcllib%%PORTVERSION%%/aes/aes.tcl |