Date: Thu, 26 Jul 2007 13:14:59 GMT From: Stefan Pauly <stefan@fh-mainz.de> To: freebsd-gnats-submit@FreeBSD.org Subject: ports/114934: [NEW PORT] devel/cunit: An automated unit testing framework for C Message-ID: <200707261314.l6QDExsL065120@www.freebsd.org> Resent-Message-ID: <200707261320.l6QDK18o088567@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 114934 >Category: ports >Synopsis: [NEW PORT] devel/cunit: An automated unit testing framework for C >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: maintainer-update >Submitter-Id: current-users >Arrival-Date: Thu Jul 26 13:20:00 GMT 2007 >Closed-Date: >Last-Modified: >Originator: Stefan Pauly >Release: FreeBSD 6.2-STABLE amd64 >Organization: >Environment: FreeBSD gogswana.fh-mainz.de 6.2-STABLE FreeBSD 6.2-STABLE #0: Sat May 26 18:26:24 CEST 2007 root@gogswana.fh-mainz.de:/usr/obj/usr/src/sys/SMP3 amd64 >Description: CUnit is a lightweight system for writing, administering, and running unit tests in C. It provides C programmers a basic testing functionality with a flexible variety of user interfaces. CUnit is built as a static library which is linked with the user's testing code. It uses a simple framework for building test structures, and provides a rich set of assertions for testing common data types. In addition, several different interfaces are provided for running tests and reporting results. WWW: http://cunit.sourceforge.net/ >How-To-Repeat: >Fix: # This is a shell archive. Save it in a file, remove anything before # this line, and then unpack it by entering "sh file". Note, it may # create directories; files and directories will be owned by you and # have default permissions. # # This archive contains: # # cunit # cunit/pkg-plist # cunit/pkg-descr # cunit/distinfo # cunit/Makefile # cunit/files # cunit/files/patch-CUnit-Sources-Automated-Automated.c # cunit/files/patch-CUnit-Sources-Framework-MyMem.c # echo c - cunit mkdir -p cunit > /dev/null 2>&1 echo x - cunit/pkg-plist sed 's/^X//' >cunit/pkg-plist << 'END-of-cunit/pkg-plist' Xinclude/CUnit/CUError.h Xinclude/CUnit/CUnit.h Xinclude/CUnit/MyMem.h Xinclude/CUnit/TestDB.h Xinclude/CUnit/TestRun.h Xinclude/CUnit/Util.h Xlib/libcunit.a Xlib/libcunit.la Xlib/libcunit.so Xlib/libcunit.so.1 Xshare/CUnit/CUnit-List.dtd Xshare/CUnit/CUnit-List.xsl Xshare/CUnit/CUnit-Run.dtd Xshare/CUnit/CUnit-Run.xsl Xshare/CUnit/Memory-Dump.dtd Xshare/CUnit/Memory-Dump.xsl X%%PORTDOCS%%%%DOCSDIR%%/CUnit_doc.css X%%PORTDOCS%%%%DOCSDIR%%/error_handling.html X%%PORTDOCS%%%%DOCSDIR%%/fdl.html X%%PORTDOCS%%%%DOCSDIR%%/headers/Automated.h X%%PORTDOCS%%%%DOCSDIR%%/headers/Basic.h X%%PORTDOCS%%%%DOCSDIR%%/headers/CUCurses.h X%%PORTDOCS%%%%DOCSDIR%%/headers/CUError.h X%%PORTDOCS%%%%DOCSDIR%%/headers/CUnit.h X%%PORTDOCS%%%%DOCSDIR%%/headers/Console.h X%%PORTDOCS%%%%DOCSDIR%%/headers/MyMem.h X%%PORTDOCS%%%%DOCSDIR%%/headers/TestDB.h X%%PORTDOCS%%%%DOCSDIR%%/headers/TestRun.h X%%PORTDOCS%%%%DOCSDIR%%/headers/Util.h X%%PORTDOCS%%%%DOCSDIR%%/headers/Win.h X%%PORTDOCS%%%%DOCSDIR%%/index.html X%%PORTDOCS%%%%DOCSDIR%%/introduction.html X%%PORTDOCS%%%%DOCSDIR%%/managing_tests.html X%%PORTDOCS%%%%DOCSDIR%%/running_tests.html X%%PORTDOCS%%%%DOCSDIR%%/test_registry.html X%%PORTDOCS%%%%DOCSDIR%%/writing_tests.html X@dirrmtry share/examples/CUnit/Curses X@dirrmtry share/examples/CUnit/Console X@dirrmtry share/examples/CUnit/Basic X@dirrmtry share/examples/CUnit/Automated X@dirrmtry share/examples/CUnit X@dirrmtry share/CUnit/Test X%%PORTDOCS%%@dirrm %%DOCSDIR%%/headers X%%PORTDOCS%%@dirrm %%DOCSDIR%% X%%PORTDOCS%%@dirrmtry share/doc X@dirrm share/CUnit X@dirrm include/CUnit END-of-cunit/pkg-plist echo x - cunit/pkg-descr sed 's/^X//' >cunit/pkg-descr << 'END-of-cunit/pkg-descr' XCUnit is a lightweight system for writing, administering, and running Xunit tests in C. It provides C programmers a basic testing functionality Xwith a flexible variety of user interfaces. CUnit is built as a static Xlibrary which is linked with the user's testing code. It uses a simple Xframework for building test structures, and provides a rich set of Xassertions for testing common data types. In addition, several different Xinterfaces are provided for running tests and reporting results. X XWWW: http://cunit.sourceforge.net/ END-of-cunit/pkg-descr echo x - cunit/distinfo sed 's/^X//' >cunit/distinfo << 'END-of-cunit/distinfo' XMD5 (CUnit-2.1-0-src.tar.gz) = f4f53d2c41e9315a91b4f14a1706fe4f XSHA256 (CUnit-2.1-0-src.tar.gz) = b5fc0ab0f03e8d287a3f65935c7e36fabfdcd9f926ee6f50ac621ea6ab6fa8c6 XSIZE (CUnit-2.1-0-src.tar.gz) = 628767 END-of-cunit/distinfo echo x - cunit/Makefile sed 's/^X//' >cunit/Makefile << 'END-of-cunit/Makefile' X# New ports collection makefile for: cunit X# Date created: 26 Jul 2007 X# Whom: Stefan Pauly <stefan@fh-mainz.de> X# X# $FreeBSD$ X XPORTNAME= cunit XDISTVERSION= 2.1-0 XCATEGORIES= devel XMASTER_SITES= ${MASTER_SITE_SOURCEFORGE} XMASTER_SITE_SUBDIR= ${PORTNAME} XDISTNAME= ${PORTNAME:S/^cu/CU/}-${DISTVERSION}-src X XMAINTAINER= stefan@fh-mainz.de XCOMMENT= An automated unit testing framework for C X XWRKSRC= ${WRKDIR}/${PORTNAME:S/^cu/CU/}-${DISTVERSION} XDOCSDIR= ${PREFIX}/share/doc/CUnit XGNU_CONFIGURE= yes XCONFIGURE_TARGET= --build=${ARCH}-portbld-freebsd${OSREL} XUSE_GMAKE= yes XUSE_AUTOTOOLS= autoheader:259 # 2.58 or higher is required XUSE_LDCONFIG= yes X XMAN3= CUnit.3 X XOPTIONS= DEB "Enable debug interface" Off \ X AUT "Enable automated(XML) interface" On \ X BAS "Enable basic interface" On \ X CON "Enable console interface" On \ X CUR "Enable curses interface" Off \ X EXA "Compile example programs" Off \ X ITE "Compile internal test program" Off \ X MEM "Enable internal memory tracking" Off X# DEP "Enable use of deprecated v1.1 names" Off X Xpost-patch: X @${REINPLACE_CMD} -e 's|/doc/@PACKAGE@|/share/doc/@PACKAGE@|g' ${WRKSRC}/doc/Makefile.in X @${REINPLACE_CMD} -e 's|/doc/@PACKAGE@|/share/doc/@PACKAGE@|g' ${WRKSRC}/doc/headers/Makefile.in X @${REINPLACE_CMD} -e 's|/@PACKAGE@/Examples/Automated|/examples/@PACKAGE@/Automated|g' ${WRKSRC}/Examples/AutomatedTest/Makefile.in X @${REINPLACE_CMD} -e 's|/@PACKAGE@/Examples/Basic|/examples/@PACKAGE@/Basic|g' ${WRKSRC}/Examples/BasicTest/Makefile.in X @${REINPLACE_CMD} -e 's|/@PACKAGE@/Examples/Console|/examples/@PACKAGE@/Console|g' ${WRKSRC}/Examples/ConsoleTest/Makefile.in X @${REINPLACE_CMD} -e 's|/@PACKAGE@/Examples/Curses|/examples/@PACKAGE@/Curses|g' ${WRKSRC}/Examples/CursesTest/Makefile.in X.if defined(NOPORTDOCS) X ${REINPLACE_CMD} -e 's|CUnit doc Man Share|CUnit Man Share|g' ${WRKSRC}/Makefile.in X.endif X X.include <bsd.port.pre.mk> X X.if defined(WITH_DEB) XCONFIGURE_ARGS+= --enable-debug X.endif X.if defined(WITHOUT_AUT) XCONFIGURE_ARGS+= --disable-automated X.else XPLIST_FILES+= include/CUnit/Automated.h X.endif X.if defined(WITHOUT_BAS) XCONFIGURE_ARGS+= --disable-basic X.else XPLIST_FILES+= include/CUnit/Basic.h X.endif X.if defined(WITHOUT_CON) XCONFIGURE_ARGS+= --disable-console X.else XPLIST_FILES+= include/CUnit/Console.h X.endif X.if defined(WITH_CUR) XCONFIGURE_ARGS+= --enable-curses XPLIST_FILES+= include/CUnit/CUCurses.h X.endif X.if defined(WITH_EXA) XCONFIGURE_ARGS+= --enable-examples X.if defined(WITH_AUT) XPLIST_FILES+= share/examples/CUnit/Automated/AutomatedTest \ X share/examples/CUnit/Automated/README X.endif X.if defined(WITH_BAS) XPLIST_FILES+= share/examples/CUnit/Basic/BasicTest \ X share/examples/CUnit/Basic/README X.endif X.if defined(WITH_CON) XPLIST_FILES+= share/examples/CUnit/Console/ConsoleTest \ X share/examples/CUnit/Console/README X.endif X.if defined(WITH_CUR) XPLIST_FILES+= share/examples/CUnit/Curses/CursesTest \ X share/examples/CUnit/Curses/README X.endif X.endif X.if defined(WITH_ITE) XCONFIGURE_ARGS+= --enable-test XPLIST_FILES+= share/CUnit/Test/test_cunit X.endif X.if defined(WITH_MEM) XCONFIGURE_ARGS+= --enable-memtrace X.endif X#.if defined(WITH_DEP) X#CONFIGURE_ARGS+= --enable-deprecated X#.endif X X.include <bsd.port.post.mk> END-of-cunit/Makefile echo c - cunit/files mkdir -p cunit/files > /dev/null 2>&1 echo x - cunit/files/patch-CUnit-Sources-Automated-Automated.c sed 's/^X//' >cunit/files/patch-CUnit-Sources-Automated-Automated.c << 'END-of-cunit/files/patch-CUnit-Sources-Automated-Automated.c' X--- CUnit/Sources/Automated/Automated.c.orig Wed Jul 25 09:07:09 2007 X+++ CUnit/Sources/Automated/Automated.c Wed Jul 25 16:45:43 2007 X@@ -222,8 +222,8 @@ X X fprintf(f_pTestResultFile, X "<?xml version=\"1.0\" ?> \n" X- "<?xml-stylesheet type=\"text/xsl\" href=\"CUnit-Run.xsl\" ?> \n" X- "<!DOCTYPE CUNIT_TEST_RUN_REPORT SYSTEM \"CUnit-Run.dtd\"> \n" X+ "<?xml-stylesheet type=\"text/xsl\" href=\"/usr/local/share/CUnit/CUnit-Run.xsl\" ?> \n" X+ "<!DOCTYPE CUNIT_TEST_RUN_REPORT SYSTEM \"/usr/local/share/CUnit/CUnit-Run.dtd\"> \n" X "<CUNIT_TEST_RUN_REPORT> \n" X " <CUNIT_HEADER/> \n"); X } X@@ -509,8 +509,8 @@ X X fprintf(pTestListFile, X "<?xml version=\"1.0\" ?> \n" X- "<?xml-stylesheet type=\"text/xsl\" href=\"CUnit-List.xsl\" ?> \n" X- "<!DOCTYPE CUNIT_TEST_LIST_REPORT SYSTEM \"CUnit-List.dtd\"> \n" X+ "<?xml-stylesheet type=\"text/xsl\" href=\"/usr/local/share/CUnit/CUnit-List.xsl\" ?> \n" X+ "<!DOCTYPE CUNIT_TEST_LIST_REPORT SYSTEM \"/usr/local/share/CUnit/CUnit-List.dtd\"> \n" X "<CUNIT_TEST_LIST_REPORT> \n" X " <CUNIT_HEADER/> \n" X " <CUNIT_LIST_TOTAL_SUMMARY> \n"); END-of-cunit/files/patch-CUnit-Sources-Automated-Automated.c echo x - cunit/files/patch-CUnit-Sources-Framework-MyMem.c sed 's/^X//' >cunit/files/patch-CUnit-Sources-Framework-MyMem.c << 'END-of-cunit/files/patch-CUnit-Sources-Framework-MyMem.c' X--- CUnit/Sources/Framework/MyMem.c.orig Wed Jul 25 16:47:05 2007 X+++ CUnit/Sources/Framework/MyMem.c Wed Jul 25 16:47:40 2007 X@@ -340,8 +340,8 @@ X setvbuf(pFile, NULL, _IONBF, 0); X X fprintf(pFile, "<\?xml version=\"1.0\" \?>"); X- fprintf(pFile, "\n<\?xml-stylesheet type=\"text/xsl\" href=\"Memory-Dump.xsl\" \?>"); X- fprintf(pFile, "\n<!DOCTYPE MEMORY_DUMP_REPORT SYSTEM \"Memory-Dump.dtd\">"); X+ fprintf(pFile, "\n<\?xml-stylesheet type=\"text/xsl\" href=\"/usr/local/share/CUnit/Memory-Dump.xsl\" \?>"); X+ fprintf(pFile, "\n<!DOCTYPE MEMORY_DUMP_REPORT SYSTEM \"/usr/local/share/CUnit/Memory-Dump.dtd\">"); X fprintf(pFile, "\n<MEMORY_DUMP_REPORT>"); X fprintf(pFile, "\n <MD_HEADER/>"); X fprintf(pFile, "\n <MD_RUN_LISTING>"); END-of-cunit/files/patch-CUnit-Sources-Framework-MyMem.c exit >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200707261314.l6QDExsL065120>