diff options
author | Po-Chuan Hsieh <sunpoet@FreeBSD.org> | 2023-08-26 21:41:44 +0000 |
---|---|---|
committer | Po-Chuan Hsieh <sunpoet@FreeBSD.org> | 2023-08-26 21:41:44 +0000 |
commit | ae6d59fd55975bc2d310acc170b7045d0a659c93 (patch) | |
tree | 872f062435f264df9e0de2f0f9dc03a06b6f89be | |
parent | d3f377a88d53acb059a07cb40dd81bd9dd09eb27 (diff) | |
download | ports-ae6d59fd55975bc2d310acc170b7045d0a659c93.tar.gz ports-ae6d59fd55975bc2d310acc170b7045d0a659c93.zip |
devel/shflags: Add make test
-rw-r--r-- | devel/shflags/Makefile | 12 | ||||
-rw-r--r-- | devel/shflags/files/patch-test_runner | 11 |
2 files changed, 23 insertions, 0 deletions
diff --git a/devel/shflags/Makefile b/devel/shflags/Makefile index 76ca0022a0c4..364d1753f43d 100644 --- a/devel/shflags/Makefile +++ b/devel/shflags/Makefile @@ -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> diff --git a/devel/shflags/files/patch-test_runner b/devel/shflags/files/patch-test_runner new file mode 100644 index 000000000000..85e75e7b80af --- /dev/null +++ b/devel/shflags/files/patch-test_runner @@ -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=$? |