git: 13c13c14c709 - main - devel/shunit2: New port: xUnit based unit testing for Unix shell scripts
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 27 Sep 2022 02:49:10 UTC
The branch main has been updated by yuri: URL: https://cgit.FreeBSD.org/ports/commit/?id=13c13c14c709d0aad26486528fb6e16c07d684e7 commit 13c13c14c709d0aad26486528fb6e16c07d684e7 Author: Yuri Victorovich <yuri@FreeBSD.org> AuthorDate: 2022-09-26 16:02:57 +0000 Commit: Yuri Victorovich <yuri@FreeBSD.org> CommitDate: 2022-09-27 02:48:58 +0000 devel/shunit2: New port: xUnit based unit testing for Unix shell scripts --- devel/Makefile | 1 + devel/shunit2/Makefile | 36 ++++++++++++++++++++++++++++++++++++ devel/shunit2/distinfo | 3 +++ devel/shunit2/pkg-descr | 3 +++ 4 files changed, 43 insertions(+) diff --git a/devel/Makefile b/devel/Makefile index d91c584b9c15..4d55896da647 100644 --- a/devel/Makefile +++ b/devel/Makefile @@ -7178,6 +7178,7 @@ SUBDIR += shmap SUBDIR += shtk SUBDIR += shtool + SUBDIR += shunit2 SUBDIR += sigar SUBDIR += sigslot SUBDIR += silc-toolkit diff --git a/devel/shunit2/Makefile b/devel/shunit2/Makefile new file mode 100644 index 000000000000..e0f9bdaf76fc --- /dev/null +++ b/devel/shunit2/Makefile @@ -0,0 +1,36 @@ +PORTNAME= shunit2 +DISTVERSIONPREFIX= v +DISTVERSION= 2.1.8-93 +DISTVERSIONSUFFIX= -g47be8b2 +CATEGORIES= devel + +MAINTAINER= yuri@FreeBSD.org +COMMENT= xUnit based unit testing for Unix shell scripts +WWW= https://github.com/kward/shunit2/ + +LICENSE= APACHE20 +LICENSE_FILE= ${WRKSRC}/LICENSE + +BUILD_DEPENDS= bash:shells/bash +RUN_DEPENDS= bash:shells/bash + +USE_GITHUB= yes +GH_ACCOUNT= kward + +NO_BUILD= yes +NO_ARCH= yes + +PLIST_FILES= bin/${PORTNAME} + +post-extract: + @${REINPLACE_CMD} -e 's|#! /bin/sh|#! ${LOCALBASE}/bin/bash|' \ + ${WRKSRC}/shunit2 \ + ${WRKSRC}/test_runner + +do-install: + ${INSTALL_SCRIPT} ${WRKSRC}/shunit2 ${STAGEDIR}${PREFIX}/bin + +do-test: + @cd ${WRKSRC} && SHELL=${LOCALBASE}/bin/bash bash ./test_runner -s ${LOCALBASE}/bin/bash + +.include <bsd.port.mk> diff --git a/devel/shunit2/distinfo b/devel/shunit2/distinfo new file mode 100644 index 000000000000..55c11b21f890 --- /dev/null +++ b/devel/shunit2/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1664206700 +SHA256 (kward-shunit2-v2.1.8-93-g47be8b2_GH0.tar.gz) = 8b2b0f775482d2441d87ade6328b6295b096c70a79d619fe764eead244b3beb8 +SIZE (kward-shunit2-v2.1.8-93-g47be8b2_GH0.tar.gz) = 57783 diff --git a/devel/shunit2/pkg-descr b/devel/shunit2/pkg-descr new file mode 100644 index 000000000000..0665597a7cdb --- /dev/null +++ b/devel/shunit2/pkg-descr @@ -0,0 +1,3 @@ +shUnit2 is a xUnit unit test framework for Bourne based shell scripts, and it is +designed to work in a similar manner to JUnit, PyUnit, etc.. If you have ever +had the desire to write a unit test for a shell script, shUnit2 can do the job.