aboutsummaryrefslogtreecommitdiffstats
path: root/meta-ivi-test
diff options
context:
space:
mode:
authorYong-iL Joh <yong-il.joh@windriver.com>2017-01-11 17:06:45 +0900
committerYong-iL Joh <yong-il.joh@windriver.com>2017-01-25 15:35:58 +0900
commited2c27e760df5618a1b8e150bd4a9cfc4a5a9f93 (patch)
treedb65311ea7b3e2cd0c306fdfe1bafe3dd02f795b /meta-ivi-test
parente0b330ff1f0136949ead6b4eb4c775c0df553473 (diff)
downloadmeta-ivi-ed2c27e760df5618a1b8e150bd4a9cfc4a5a9f93.tar.gz
meta-ivi-ed2c27e760df5618a1b8e150bd4a9cfc4a5a9f93.tar.bz2
meta-ivi-ed2c27e760df5618a1b8e150bd4a9cfc4a5a9f93.zip
common-api-c++-dbus: add test
Signed-off-by: Yong-iL Joh <yong-il.joh@windriver.com>
Diffstat (limited to 'meta-ivi-test')
-rw-r--r--meta-ivi-test/recipes-extended/common-api/common-api-c++-dbus/common-api-c++-dbus_t.inc31
-rw-r--r--meta-ivi-test/recipes-extended/common-api/common-api-c++-dbus_%.bbappend34
-rw-r--r--meta-ivi-test/recipes-yocto-ivi/images/test-image.bb1
3 files changed, 66 insertions, 0 deletions
diff --git a/meta-ivi-test/recipes-extended/common-api/common-api-c++-dbus/common-api-c++-dbus_t.inc b/meta-ivi-test/recipes-extended/common-api/common-api-c++-dbus/common-api-c++-dbus_t.inc
new file mode 100644
index 0000000..09199db
--- /dev/null
+++ b/meta-ivi-test/recipes-extended/common-api/common-api-c++-dbus/common-api-c++-dbus_t.inc
@@ -0,0 +1,31 @@
+#!/bin/sh
+get_list() {
+ return 1
+}
+
+get_title() {
+ echo "Common API C++ test code"
+}
+
+_run_dir=/opt/tests/capicxx-perf
+_run_1() {
+ ${_run_dir}/capicxx-server &
+ ${_run_dir}/capicxx-client
+ kill -9 `pidof capicxx-server`
+ sleep 1
+}
+
+run_1() {
+ if [ "x${1}" != "x" ]; then
+ _run_1 >& /tmp/t
+ _test_completed=`cat /tmp/t | grep "test completed"`
+ _10000_sent=`cat /tmp/t | grep "sync messages sent" | grep 10000`
+ if [ "x${_test_completed}" != "x" -a "y${_10000_sent}" != "y" ]; then
+ echo " PASSED"
+ else
+ echo " FAILED"
+ fi
+ else
+ _run_1
+ fi
+}
diff --git a/meta-ivi-test/recipes-extended/common-api/common-api-c++-dbus_%.bbappend b/meta-ivi-test/recipes-extended/common-api/common-api-c++-dbus_%.bbappend
new file mode 100644
index 0000000..31c2875
--- /dev/null
+++ b/meta-ivi-test/recipes-extended/common-api/common-api-c++-dbus_%.bbappend
@@ -0,0 +1,34 @@
+#
+# for test
+#
+FILESEXTRAPATHS_append := ":${THISDIR}/${PN}"
+SRC_URI_append += " \
+ file://${BPN}_t.inc \
+ "
+SRC_URI_append += " \
+ http://googletest.googlecode.com/files/gtest-1.7.0.zip \
+ "
+SRC_URI[md5sum] = "2d6ec8ccdf5c46b05ba54a9fd1d130d7"
+SRC_URI[sha256sum] = "247ca18dd83f53deb1328be17e4b1be31514cedfc1e3424f672bf11fd7e0d60d"
+
+EXTRA_OECMAKE += "-DWITH_DLTTEST=ON -DCMAKE_SKIP_RPATH=ON -DWITH_MAN=OFF \
+ -DGTEST_ROOT=${WORKDIR}/gtest-1.7.0 \
+ "
+
+do_compile_append() {
+ make -C src/test
+}
+
+do_install_append() {
+ _BIN=${WORKDIR}/build/src/test
+ install -d ${D}/opt/tests/${PN}
+ install -m 0755 ${_BIN}/DBus*Test ${D}/opt/tests/${PN}
+
+ install -m 0755 ${WORKDIR}/${BPN}_t.inc ${D}/opt/tests/${PN}
+}
+
+PACKAGES += "${PN}-test"
+DEPENDS_${PN}-test = "${PN}"
+
+FILES_${PN}-dbg += "/opt/tests/${PN}/.debug/* "
+FILES_${PN}-test = "/opt/tests/${PN}/ "
diff --git a/meta-ivi-test/recipes-yocto-ivi/images/test-image.bb b/meta-ivi-test/recipes-yocto-ivi/images/test-image.bb
index 909182d..0f73eea 100644
--- a/meta-ivi-test/recipes-yocto-ivi/images/test-image.bb
+++ b/meta-ivi-test/recipes-yocto-ivi/images/test-image.bb
@@ -5,6 +5,7 @@ PV = "${DATE}"
IMAGE_INSTALL_append += " openssh test-fw \
audiomanager-test audiomanagerplugins-test \
common-api-test capicxx-perf \
+ common-api-c++-dbus-test \
persistence-client-library-test \
persistence-common-object-test \
persistence-administrator-test \