devel/shflags: Add make test

This commit is contained in:
Po-Chuan Hsieh 2023-08-27 05:41:44 +08:00
parent d3f377a88d
commit ae6d59fd55
No known key found for this signature in database
GPG key ID: 9A4BD10F002DD04B
2 changed files with 23 additions and 0 deletions

View file

@ -10,6 +10,12 @@ WWW= https://github.com/kward/shflags
LICENSE= APACHE20
LICENSE_FILE= ${WRKSRC}/LICENSE
TEST_DEPENDS= bash:shells/bash \
dash:shells/dash \
ksh93:shells/ksh \
mksh:shells/mksh \
zsh:shells/zsh
NO_ARCH= yes
NO_BUILD= yes
@ -18,7 +24,13 @@ PLIST_FILES= lib/shflags
GH_ACCOUNT= kward
USE_GITHUB= yes
post-patch:
@${REINPLACE_CMD} -e 's|%%LOCALBASE%%|${LOCALBASE}|g' ${WRKSRC}/test_runner
do-install:
${INSTALL_DATA} ${WRKSRC}/shflags ${STAGEDIR}${PREFIX}/lib/
do-test:
cd ${WRKSRC} && ${SH} test_runner
.include <bsd.port.mk>

View file

@ -0,0 +1,11 @@
--- test_runner.orig 2023-08-22 09:34:14 UTC
+++ test_runner
@@ -39,7 +39,7 @@
RUNNER_LOADED=0
RUNNER_ARGV0=`basename "$0"`
-RUNNER_SHELLS='/bin/sh ash /bin/bash /bin/dash /bin/ksh /bin/mksh /bin/zsh'
+RUNNER_SHELLS='/bin/sh %%LOCALBASE%%/bin/bash %%LOCALBASE%%/bin/dash %%LOCALBASE%%/bin/ksh93 %%LOCALBASE%%/bin/mksh %%LOCALBASE%%/bin/zsh'
RUNNER_TEST_SUFFIX='_test.sh'
true; RUNNER_TRUE=$?
false; RUNNER_FALSE=$?