Skip to contentSkip to conversation

cppunit: Added package

PATCH Superseded Sebastien Bourdelin 2 participants 3 messages Oct 2, 2014 – Oct 14, 2014

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 cppunit: Added package

CppUnit is the C++ port of the famous JUnit framework for unit testing. Test output is in XML or text format for automatic testing and GUI based for supervised tests.

http://www.freedesktop.org/wiki/Software/cppunit/

---
 package/Config.in          |  1 +
 package/cppunit/Config.in  | 12 ++++++++++++
 package/cppunit/cppunit.mk | 27 +++++++++++++++++++++++++++
 3 files changed, 40 insertions(+)
 create mode 100644 package/cppunit/Config.in
 create mode 100644 package/cppunit/cppunit.mk
package/Config.in +1 -0
index 2ad72bc..5cde341 100644
@@ -831,6 +831,7 @@ menu "Other"
 	source "package/clapack/Config.in"
 	source "package/classpath/Config.in"
 	source "package/cppcms/Config.in"
+	source "package/cppunit/Config.in"
 	source "package/eigen/Config.in"
 	source "package/elfutils/Config.in"
 	source "package/fftw/Config.in"
package/cppunit/Config.in new file +12 -0
new file mode 100644
index 0000000..91700b8
@@ -0,0 +1,12 @@
+config BR2_PACKAGE_CPPUNIT
+	bool "cppunit"
+	depends on BR2_INSTALL_LIBSTDCPP
+	help
+	  CppUnit is the C++ port of the famous JUnit framework for unit testing.
+	  Test output is in XML or text format for automatic testing and GUI
+	  based for supervised tests.
+
+	  http://www.freedesktop.org/wiki/Software/cppunit/
+
+comment "cppunit needs a toolchain w/ C++"
+	depends on !BR2_INSTALL_LIBSTDCPP
package/cppunit/cppunit.mk new file +27 -0
new file mode 100644
index 0000000..47d27be
@@ -0,0 +1,27 @@
+################################################################################
+#
+# cppunit
+#
+################################################################################
+
+CPPUNIT_VERSION = cppunit-1.13.2
+CPPUNIT_SITE = git://anongit.freedesktop.org/git/libreoffice/cppunit/
+CPPUNIT_INSTALL_STAGING = YES
+CPPUNIT_LICENSE = GPLv2
+CPPUNIT_LICENSE_FILES = COPYING
+
+define CPPUNIT_RUN_AUTOGEN
+	cd $(@D) && PATH=$(BR_PATH) ./autogen.sh
+endef
+CPPUNIT_PRE_CONFIGURE_HOOKS += CPPUNIT_RUN_AUTOGEN
+
+define CPPUNIT_CONFIGURE_CMDS
+	(cd $(@D); \
+		./configure \
+		--host=$(GNU_TARGET_NAME) \
+		--prefix=/usr \
+		$(TARGET_CONFIGURE_OPTS) \
+	)
+endef
+
+$(eval $(autotools-package))
Signature · 1 line
1.8.3.4
#1 lore raw

PATCH 1/1 cppunit: Added package

Hi Sebastien,

Le 02/10/2014 21:58, Sebastien Bourdelin a ?crit :

Quoted 56 lines

CppUnit is the C++ port of the famous JUnit framework for unit testing. Test output is in XML or text format for automatic testing and GUI based for supervised tests.

http://www.freedesktop.org/wiki/Software/cppunit/

---
  package/Config.in          |  1 +
  package/cppunit/Config.in  | 12 ++++++++++++
  package/cppunit/cppunit.mk | 27 +++++++++++++++++++++++++++
  3 files changed, 40 insertions(+)

create mode 100644 package/cppunit/Config.in
create mode 100644 package/cppunit/cppunit.mk

package/Config.in +1 -0
index 2ad72bc..5cde341 100644
@@ -831,6 +831,7 @@ menu "Other"
  	source "package/clapack/Config.in"
  	source "package/classpath/Config.in"
  	source "package/cppcms/Config.in"
+	source "package/cppunit/Config.in"
  	source "package/eigen/Config.in"
  	source "package/elfutils/Config.in"
  	source "package/fftw/Config.in"
package/cppunit/Config.in new file +12 -0
new file mode 100644
index 0000000..91700b8
@@ -0,0 +1,12 @@
+config BR2_PACKAGE_CPPUNIT
+	bool "cppunit"
+	depends on BR2_INSTALL_LIBSTDCPP
+	help
+	  CppUnit is the C++ port of the famous JUnit framework for unit testing.
+	  Test output is in XML or text format for automatic testing and GUI
+	  based for supervised tests.
+
+	http://www.freedesktop.org/wiki/Software/cppunit/
+
+comment "cppunit needs a toolchain w/ C++"
+	depends on !BR2_INSTALL_LIBSTDCPP
package/cppunit/cppunit.mk new file +6 -0
new file mode 100644
index 0000000..47d27be
@@ -0,0 +1,27 @@
+################################################################################
+#
+# cppunit
+#
+################################################################################
+

package/cppunit/cppunit.mk line 16

Quoted 10 lines
package/cppunit/cppunit.mk new file +10 -0
+CPPUNIT_VERSION = cppunit-1.13.2
+CPPUNIT_SITE = git://anongit.freedesktop.org/git/libreoffice/cppunit/
+CPPUNIT_INSTALL_STAGING = YES
+CPPUNIT_LICENSE = GPLv2
+CPPUNIT_LICENSE_FILES = COPYING
+
+define CPPUNIT_RUN_AUTOGEN
+	cd $(@D) && PATH=$(BR_PATH) ./autogen.sh
+endef
+CPPUNIT_PRE_CONFIGURE_HOOKS += CPPUNIT_RUN_AUTOGEN

Why not using CPPUNIT_AUTORECONF = YES here ?
It seems that autoreconf mechanism works.

package/cppunit/cppunit.mk line 25

Quoted 9 lines
package/cppunit/cppunit.mk new file +9 -0
+
+define CPPUNIT_CONFIGURE_CMDS
+	(cd $(@D); \
+		./configure \
+		--host=$(GNU_TARGET_NAME) \
+		--prefix=/usr \
+		$(TARGET_CONFIGURE_OPTS) \
+	)
+endef

It's already done in pkg-autotools.mk, so you can remove this.

package/cppunit/cppunit.mk line 27

Quoted 2 lines
package/cppunit/cppunit.mk new file +2 -0
+
+$(eval $(autotools-package))

Have you tested cppunit over several toolchain configuration ? Otherwise, looks good.

Best regards,
Romain Naour

#2 lore raw

PATCH 1/1 cppunit: Added package

Hi Romain,

Quoted 63 lines · Romain Naour

Hi Sebastien,

Le 02/10/2014 21:58, Sebastien Bourdelin a ?crit :

Quoted 60 lines

CppUnit is the C++ port of the famous JUnit framework for unit testing. Test output is in XML or text format for automatic testing and GUI based for supervised tests.

http://www.freedesktop.org/wiki/Software/cppunit/

---
  package/Config.in          |  1 +
  package/cppunit/Config.in  | 12 ++++++++++++
  package/cppunit/cppunit.mk | 27 +++++++++++++++++++++++++++
  3 files changed, 40 insertions(+)

create mode 100644 package/cppunit/Config.in
create mode 100644 package/cppunit/cppunit.mk

package/Config.in +1 -0
index 2ad72bc..5cde341 100644
@@ -831,6 +831,7 @@ menu "Other"
  	source "package/clapack/Config.in"
  	source "package/classpath/Config.in"
  	source "package/cppcms/Config.in"
+	source "package/cppunit/Config.in"
  	source "package/eigen/Config.in"
  	source "package/elfutils/Config.in"
  	source "package/fftw/Config.in"
package/cppunit/Config.in new file +12 -0
new file mode 100644
index 0000000..91700b8
@@ -0,0 +1,12 @@
+config BR2_PACKAGE_CPPUNIT
+	bool "cppunit"
+	depends on BR2_INSTALL_LIBSTDCPP
+	help
+	  CppUnit is the C++ port of the famous JUnit framework for unit testing.
+	  Test output is in XML or text format for automatic testing and GUI
+	  based for supervised tests.
+
+	http://www.freedesktop.org/wiki/Software/cppunit/
+
+comment "cppunit needs a toolchain w/ C++"
+	depends on !BR2_INSTALL_LIBSTDCPP
package/cppunit/cppunit.mk new file +10 -0
new file mode 100644
index 0000000..47d27be
@@ -0,0 +1,27 @@
+################################################################################
+#
+# cppunit
+#
+################################################################################
+
+CPPUNIT_VERSION = cppunit-1.13.2
+CPPUNIT_SITE = git://anongit.freedesktop.org/git/libreoffice/cppunit/
+CPPUNIT_INSTALL_STAGING = YES
+CPPUNIT_LICENSE = GPLv2
Quoted 8 lines

package/cppunit/cppunit.mk line 16

Quoted 6 lines
package/cppunit/cppunit.mk new file +6 -0
+CPPUNIT_LICENSE_FILES = COPYING
+
+define CPPUNIT_RUN_AUTOGEN
+	cd $(@D) && PATH=$(BR_PATH) ./autogen.sh
+endef
+CPPUNIT_PRE_CONFIGURE_HOOKS += CPPUNIT_RUN_AUTOGEN

Why not using CPPUNIT_AUTORECONF = YES here ?
It seems that autoreconf mechanism works.

I missed that option. Thanks!

Quoted 10 lines

package/cppunit/cppunit.mk line 25

Quoted 9 lines
package/cppunit/cppunit.mk new file +9 -0
+
+define CPPUNIT_CONFIGURE_CMDS
+	(cd $(@D); \
+		./configure \
+		--host=$(GNU_TARGET_NAME) \
+		--prefix=/usr \
+		$(TARGET_CONFIGURE_OPTS) \
+	)
+endef

It's already done in pkg-autotools.mk, so you can remove this.

Ok.

Quoted 4 lines

package/cppunit/cppunit.mk line 27

Quoted 2 lines
package/cppunit/cppunit.mk new file +2 -0
+
+$(eval $(autotools-package))

Have you tested cppunit over several toolchain configuration ? Otherwise, looks good.

Tested with an external toolchain and Buildroot toolchain with no other options that C++ support (e.g: without Large file / Wchar / etc...) I didn't try a toolchain without thread support but cppunit doesn't seems to need it.

Quoted 2 lines

Best regards,
Romain Naour

I will send a new patch with your suggestions.

Best regards,
Sebastien Bourdelin.