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.
See http://cunit.sourceforge.net/ All the best & greetings from Munich! Florian
commit 568b642bfa9681ee42b152093dbcec738d6c78b6 Author: Florian Sesser <ses...@in.tum.de> Date: Tue Apr 5 13:40:45 2011 +0200 Add to CUnit to /libs/ 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. Signed-off-by: Florian Sesser <ses...@in.tum.de> diff --git a/libs/libcunit/Makefile b/libs/libcunit/Makefile new file mode 100644 index 0000000..4e498f6 --- /dev/null +++ b/libs/libcunit/Makefile @@ -0,0 +1,69 @@ +# +# Copyright (C) 2007-2009 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. + +include $(TOPDIR)/rules.mk + +PKG_NAME:=libcunit +PKG_VERSION:=2.1-0 +PKG_RELEASE:=1 + +PKG_SOURCE:=CUnit-$(PKG_VERSION)-src.tar.gz +PKG_SOURCE_URL:=http://downloads.sourceforge.net/project/cunit/CUnit/$(PKG_VERSION) +PKG_MD5SUM:=f4f53d2c41e9315a91b4f14a1706fe4f +PKG_BUILD_DIR:=$(BUILD_DIR)/CUnit-$(PKG_VERSION) + +include $(INCLUDE_DIR)/package.mk + +define Package/libcunit + SECTION:=libs + CATEGORY:=Libraries + TITLE:=Unit testing framework for C + URL:=http://cunit.sourceforge.net/ +endef + +define Package/libcunit/description + CUnit, lightweight unit testing for C + 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. +endef + + +define Build/Configure + $(call Build/Configure/Default, \ + , \ + BUILD_CC="$(TARGET_CC)" \ + HOSTCC="$(HOSTCC)" \ + ) +endef + +define Build/Compile + $(MAKE) -C $(PKG_BUILD_DIR) \ + CCOPT="$(TARGET_CFLAGS)" \ + LDFLAGS="$(TARGET_LDFLAGS)" \ + DESTDIR="$(PKG_INSTALL_DIR)" \ + install +endef + + +define Build/InstallDev + mkdir -p $(1)/usr/include/CUnit + $(CP) $(PKG_INSTALL_DIR)/usr/include/CUnit/* \ + $(1)/usr/include/CUnit + + mkdir -p $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libcunit.* \ + $(1)/usr/lib +endef + + +define Package/libcunit/install + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libcunit.* $(1)/usr/lib +endef + + +$(eval $(call BuildPackage,libcunit))
_______________________________________________ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel