aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xmeta-linaro/recipes-extra/odp/files/run-ptest36
-rw-r--r--meta-linaro/recipes-extra/odp/odp.bb41
-rw-r--r--meta-linaro/recipes-linaro/images/linaro-image-lng.bb3
3 files changed, 67 insertions, 13 deletions
diff --git a/meta-linaro/recipes-extra/odp/files/run-ptest b/meta-linaro/recipes-extra/odp/files/run-ptest
new file mode 100755
index 0000000..14abbac
--- /dev/null
+++ b/meta-linaro/recipes-extra/odp/files/run-ptest
@@ -0,0 +1,36 @@
+#!/bin/sh
+#
+# Run the ODP Validation Suite Tests
+#
+res=0
+script_dir=$(readlink -m $(dirname $0))
+tests=$(find $script_dir/test/* -type f -executable | grep -v .debug | sort)
+
+if [ "$1" = "-v" ]; then
+ verbose=1
+else
+ verbose=0
+fi
+
+mkdir -p logs
+
+for tc in $tests; do
+ [ -f ${tc}_run ] && continue
+
+ tcname=$(basename $tc)
+
+ if [ $verbose = 1 ]; then
+ $tc 2>&1 | tee logs/${tcname}.log
+ else
+ $tc > logs/${tcname}.log 2>&1
+ fi
+ tres=$?
+ case $tres in
+ 0) echo -n "PASS: " ;;
+ 77) echo -n "SKIP: " ;;
+ *) echo -n "FAIL: "; res=1 ;;
+ esac
+ echo "$tcname"
+done
+
+exit $res
diff --git a/meta-linaro/recipes-extra/odp/odp.bb b/meta-linaro/recipes-extra/odp/odp.bb
index 67f8097..b32bb0b 100644
--- a/meta-linaro/recipes-extra/odp/odp.bb
+++ b/meta-linaro/recipes-extra/odp/odp.bb
@@ -5,28 +5,43 @@ SECTION = "console/network"
LICENSE = "BSD | GPLv2"
LIC_FILES_CHKSUM = "file://LICENSE;md5=4ccfa994aa96974cfcd39a59faee20a2"
-PV = "20140820+git${SRCPV}"
+PV = "v1.0.0"
DEPENDS = "openssl"
-SRC_URI = "git://git.linaro.org/lng/odp.git;name=odp \
- file://0001-Replace-deprecated-_BSD_SOURCE-with-_DEFAULT_SOURCE.patch \
-"
+SRC_URI = "git://git.linaro.org/people/stuart.haslam/odp.git;branch=ptest;name=odp \
+ file://run-ptest"
-SRCREV_odp = "49bc9ee8fdd47c6193108a90c94ca3b3de66ba46"
+SRCREV_odp = "${AUTOREV}"
SRCREV_FORMAT = "odp"
S = "${WORKDIR}/git"
-inherit autotools
+inherit autotools ptest
RDEPENDS_${PN} = "bash libcrypto"
+RDEPENDS_${PN}-ptest += "make cunit"
-#PACKAGECONFIG ?= "perf"
-#PACKAGECONFIG ?= "perf vald" NOTE: add 'vald' to above list and uncomment
-#the PACKAGECONFIG[vald] line below to enable cunit tests when available
-PACKAGECONFIG[perf] = "--enable-test-perf,,,"
-#PACKAGECONFIG[vald] = "--enable-test-vald,,cunit,cunit"
-
-# ODP primary shipped as static library plus some API test and samples/
+# ODP is primarily shipped as static library plus some API test and samples/
FILES_${PN}-staticdev += "${datadir}/opendataplane/*.la"
+
+do_configure_ptest() {
+ oe_runconf --enable-test-perf --enable-test-vald
+}
+
+do_compile_ptest() {
+ for testdir in test/validation test/performance; do
+ oe_runmake -C $testdir buildtest-TESTS
+ done
+}
+
+do_install_ptest() {
+ for testdir in test/validation test/performance; do
+ oe_runmake -C $testdir install BUILDDIR=${B} \
+ DESTDIR=${D}${PTEST_PATH}/$testdir
+ find ${D}${PTEST_PATH}/$testdir -type f -executable \
+ -print -exec mv -f {} ${D}${PTEST_PATH}/$testdir \;
+ rm -rf ${D}${PTEST_PATH}/$testdir/usr
+ done
+}
+
diff --git a/meta-linaro/recipes-linaro/images/linaro-image-lng.bb b/meta-linaro/recipes-linaro/images/linaro-image-lng.bb
index 641114c..ac432c5 100644
--- a/meta-linaro/recipes-linaro/images/linaro-image-lng.bb
+++ b/meta-linaro/recipes-linaro/images/linaro-image-lng.bb
@@ -4,6 +4,7 @@ IMAGE_INSTALL += " \
arndale-pre-boot \
bridge-utils \
calibrator \
+ cunit \
curl \
cronie \
fping \
@@ -25,6 +26,8 @@ IMAGE_INSTALL += " \
usecpu \
"
+IMAGE_INSTALL += "${@bb.utils.contains('DISTRO_FEATURES', 'ptest', 'odp-ptest', '', d)}"
+
IMAGE_INSTALL_append_armv7a = " \
latency-test \
systemtap \