cxxtest: new package
authorAbhishek Singh <Abhishek.Singh@imgtec.com>
Fri, 18 Dec 2015 09:27:14 +0000 (14:57 +0530)
committerPeter Korsgaard <peter@korsgaard.com>
Fri, 1 Jan 2016 20:52:14 +0000 (21:52 +0100)
[Peter: fix toolchain comment, use INSTALL instead of mkdir/cp]
Reviewed-by: Marcin Nowakowski <marcin.nowakowski@imgtec.com>
Reviewed-by: Rahul Bedarkar <rahul.bedarkar@imgtec.com>
Reviewed-by: Piotr Nakraszewicz <piotr.nakraszewicz@imgtec.com>
Reviewed-by: Jerzy Grzegorek <jerzy.grzegorek@trzebnica.net>
Signed-off-by: Abhishek Singh <Abhishek.Singh@imgtec.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
package/Config.in
package/cxxtest/Config.in [new file with mode: 0644]
package/cxxtest/cxxtest.hash [new file with mode: 0644]
package/cxxtest/cxxtest.mk [new file with mode: 0644]

index 71e19484b408444d5207d08c213ef99da4a73974..f58f2be5d3557b38a3f038369552e1a3b3ff957b 100644 (file)
@@ -122,6 +122,7 @@ menu "Development tools"
        source "package/cmake/Config.in"
        source "package/cppunit/Config.in"
        source "package/cvs/Config.in"
+       source "package/cxxtest/Config.in"
 if BR2_PACKAGE_BUSYBOX_SHOW_OTHERS
        source "package/diffutils/Config.in"
        source "package/dos2unix/Config.in"
diff --git a/package/cxxtest/Config.in b/package/cxxtest/Config.in
new file mode 100644 (file)
index 0000000..207adab
--- /dev/null
@@ -0,0 +1,10 @@
+config BR2_PACKAGE_CXXTEST
+       bool "cxxtest"
+       depends on BR2_INSTALL_LIBSTDCPP
+       help
+         CxxTest is a unit testing framework for C++
+
+         http://cxxtest.com/
+
+comment "cxxtest needs a toolchain w/ C++ support"
+       depends on !BR2_INSTALL_LIBSTDCPP
diff --git a/package/cxxtest/cxxtest.hash b/package/cxxtest/cxxtest.hash
new file mode 100644 (file)
index 0000000..f552e80
--- /dev/null
@@ -0,0 +1,2 @@
+# Locally computed:
+sha256 1c154fef91c65dbf1cd4519af7ade70a61d85a923b6e0c0b007dc7f4895cf7d8        cxxtest-4.4.tar.gz
diff --git a/package/cxxtest/cxxtest.mk b/package/cxxtest/cxxtest.mk
new file mode 100644 (file)
index 0000000..93bdd8b
--- /dev/null
@@ -0,0 +1,30 @@
+#######################################################################################
+#
+# cxxtest
+#
+#######################################################################################
+
+CXXTEST_VERSION = 4.4
+CXXTEST_SITE = https://github.com/CxxTest/cxxtest/releases/download/$(CXXTEST_VERSION)
+CXXTEST_LICENSE = LGPLv3
+CXXTEST_LICENSE_FILES = COPYING
+CXXTEST_INSTALL_STAGING = YES
+CXXTEST_INSTALL_TARGET = NO
+CXXTEST_DEPENDENCIES = host-cxxtest
+HOST_CXXTEST_SETUP_TYPE = setuptools
+HOST_CXXTEST_SUBDIR = python
+
+# Copy CxxTest header files to staging directory
+define CXXTEST_INSTALL_STAGING_CMDS
+       $(INSTALL) -m 755 -d $(STAGING_DIR)/usr/include/cxxtest
+       $(INSTALL) -m 644 -t $(STAGING_DIR)/usr/include/cxxtest $(@D)/cxxtest/*
+endef
+
+# CxxTest uses python infrastructure as the build system. It consists of two parts:
+# 1. cxxtestgen tool to process tests defined in header files to generate C++ source
+# files. cxxtestgen is built as a host package, so that it can be used natively.
+# 2. A set of header files which are installed in staging directory. This will be
+# used in cross-compiling test harness to generate executable which will run on target.
+
+$(eval $(generic-package))
+$(eval $(host-python-package))