]> code.ossystems Code Review - openembedded-core.git/commitdiff
beecrypt: add ptest support
authorChong Lu <Chong.Lu@windriver.com>
Fri, 27 Dec 2013 07:44:29 +0000 (15:44 +0800)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 10 Jan 2014 15:11:06 +0000 (15:11 +0000)
Install beecrypt test suite and run it as ptest.
Make all ptest pass.

Signed-off-by: Chong Lu <Chong.Lu@windriver.com>
meta/recipes-support/beecrypt/beecrypt/beecrypt-enable-ptest-support.patch [new file with mode: 0644]
meta/recipes-support/beecrypt/beecrypt/run-ptest [new file with mode: 0644]
meta/recipes-support/beecrypt/beecrypt_4.2.1.bb

diff --git a/meta/recipes-support/beecrypt/beecrypt/beecrypt-enable-ptest-support.patch b/meta/recipes-support/beecrypt/beecrypt/beecrypt-enable-ptest-support.patch
new file mode 100644 (file)
index 0000000..3e5513f
--- /dev/null
@@ -0,0 +1,37 @@
+beecrypt: enable ptest support
+
+Upstream-Status: Inappropriate [embedded specific]
+
+Add install-ptest rules.
+
+Signed-off-by: Chong Lu <Chong.Lu@windriver.com>
+---
+ Makefile.am       | 3 +++
+ tests/Makefile.am | 3 +++
+ 2 files changed, 6 insertions(+)
+
+diff --git a/Makefile.am b/Makefile.am
+index b7e7869..5076f59 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -73,3 +73,6 @@ DISTCLEANFILES = mpopt.s blowfishopt.s sha1opt.s
+ bench:
+       (cd tests && $(MAKE) $(AM_MAKEFLAGS) bench)
++
++install-ptest:
++      (cd tests && $(MAKE) $(AM_MAKEFLAGS) check_PROGRAMS)
+diff --git a/tests/Makefile.am b/tests/Makefile.am
+index 1604e5e..d8db8d8 100644
+--- a/tests/Makefile.am
++++ b/tests/Makefile.am
+@@ -101,3 +101,6 @@ bench: benchme benchrsa benchhf benchbc
+       ./benchbc AES 128
+       ./benchbc Blowfish 128
+       ./benchbc Blowfish 128
++
++check_PROGRAMS:
++      $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS)
+-- 
+1.8.1.2
+
diff --git a/meta/recipes-support/beecrypt/beecrypt/run-ptest b/meta/recipes-support/beecrypt/beecrypt/run-ptest
new file mode 100644 (file)
index 0000000..5bc7460
--- /dev/null
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+cd tests
+for i in `ls`; do ./$i; if [ $? == 0 ]; then echo "PASS: $i"; \
+    else echo "FAIL: $i"; fi; done
index 46834d2149fc3f07127aa1e5eeea9fc6a418d8df..209b92e653002136f8c76c23f20ef779c621e9ae 100644 (file)
@@ -8,7 +8,10 @@ HOMEPAGE = "http://sourceforge.net/projects/beecrypt"
 SRC_URI = "${SOURCEFORGE_MIRROR}/beecrypt/beecrypt-${PV}.tar.gz \
            file://disable-icu-check.patch \
            file://fix-security.patch \
-           file://fix-for-gcc-4.7.patch"
+           file://fix-for-gcc-4.7.patch \
+           file://run-ptest \
+           file://beecrypt-enable-ptest-support.patch \
+          "
 
 SRC_URI[md5sum] = "8441c014170823f2dff97e33df55af1e"
 SRC_URI[sha256sum] = "286f1f56080d1a6b1d024003a5fa2158f4ff82cae0c6829d3c476a4b5898c55d"
@@ -20,7 +23,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=9894370afd5dfe7d02b8d14319e729a1 \
 
 PR = "r3"
 
-inherit autotools multilib_header
+inherit autotools multilib_header ptest
 acpaths=""
 
 do_install_append() {
@@ -37,3 +40,8 @@ FILES_${PN}-dev += "${libdir}/${BPN}/*.so ${libdir}/${BPN}/*.la"
 FILES_${PN}-staticdev += "${libdir}/${BPN}/*.a"
 
 BBCLASSEXTEND = "native nativesdk"
+
+do_install_ptest () {
+       mkdir ${D}${PTEST_PATH}/tests
+       cp -r ${B}/tests/.libs/test* ${D}${PTEST_PATH}/tests
+}