summaryrefslogtreecommitdiffstats
path: root/meta/recipes-support/libevent
diff options
context:
space:
mode:
authorDmitry Eremin-Solenikov <dmitry_eremin@mentor.com>2015-05-11 22:52:29 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-05-14 11:41:14 +0100
commitd32fb4c50f73d169d7b9a238801aa72d77560135 (patch)
treece9839eeb1150490be0f795c97b6dcd19affac2a /meta/recipes-support/libevent
parente3330d0602fb3ad347f028063d25f634a36ea344 (diff)
downloadopenembedded-core-d32fb4c50f73d169d7b9a238801aa72d77560135.tar.gz
openembedded-core-d32fb4c50f73d169d7b9a238801aa72d77560135.tar.bz2
openembedded-core-d32fb4c50f73d169d7b9a238801aa72d77560135.zip
libevent: add ptest
Use provided regression testing as a ptest for libevent package. Signed-off-by: Dmitry Eremin-Solenikov <dmitry_eremin@mentor.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
Diffstat (limited to 'meta/recipes-support/libevent')
-rw-r--r--meta/recipes-support/libevent/libevent/run-ptest18
-rw-r--r--meta/recipes-support/libevent/libevent_2.0.22.bb17
2 files changed, 34 insertions, 1 deletions
diff --git a/meta/recipes-support/libevent/libevent/run-ptest b/meta/recipes-support/libevent/libevent/run-ptest
new file mode 100644
index 0000000000..d521688e77
--- /dev/null
+++ b/meta/recipes-support/libevent/libevent/run-ptest
@@ -0,0 +1,18 @@
+#!/bin/sh
+
+fail=0
+for test in ./test/*
+do
+ $test
+ if [ $? -eq 0 ]
+ then
+ fail=1
+ fi
+done
+
+if [ $fail -eq 0 ]
+then
+ echo "PASS: libevent"
+else
+ echo "FAIL: libevent"
+fi
diff --git a/meta/recipes-support/libevent/libevent_2.0.22.bb b/meta/recipes-support/libevent/libevent_2.0.22.bb
index 3f9475ed75..2f492930d4 100644
--- a/meta/recipes-support/libevent/libevent_2.0.22.bb
+++ b/meta/recipes-support/libevent/libevent_2.0.22.bb
@@ -6,7 +6,10 @@ SECTION = "libs"
LICENSE = "BSD"
LIC_FILES_CHKSUM = "file://LICENSE;md5=45c5316ff684bcfe2f9f86d8b1279559"
-SRC_URI = "${SOURCEFORGE_MIRROR}/levent/${BP}-stable.tar.gz"
+SRC_URI = " \
+ ${SOURCEFORGE_MIRROR}/levent/${BP}-stable.tar.gz \
+ file://run-ptest \
+"
SRC_URI[md5sum] = "c4c56f986aa985677ca1db89630a2e11"
SRC_URI[sha256sum] = "71c2c49f0adadacfdbe6332a372c38cf9c8b7895bb73dabeaa53cdcc1d4e1fa3"
@@ -20,3 +23,15 @@ inherit autotools
# Needed for Debian packaging
LEAD_SONAME = "libevent-2.0.so"
+
+inherit ptest
+
+DEPENDS = "zlib"
+
+do_install_ptest() {
+ install -d ${D}${PTEST_PATH}/test
+ for file in ${B}/test/.libs/regress ${B}/test/.libs/test*
+ do
+ install -m 0755 $file ${D}${PTEST_PATH}/test
+ done
+}