aboutsummaryrefslogtreecommitdiffstats
path: root/meta-ivi-test/recipes-yocto-ivi
diff options
context:
space:
mode:
Diffstat (limited to 'meta-ivi-test/recipes-yocto-ivi')
-rw-r--r--meta-ivi-test/recipes-yocto-ivi/images/test-image.bb20
-rwxr-xr-xmeta-ivi-test/recipes-yocto-ivi/test-fw/test-fw/test-fw.sh77
-rw-r--r--meta-ivi-test/recipes-yocto-ivi/test-fw/test-fw_0.1.bb21
3 files changed, 118 insertions, 0 deletions
diff --git a/meta-ivi-test/recipes-yocto-ivi/images/test-image.bb b/meta-ivi-test/recipes-yocto-ivi/images/test-image.bb
new file mode 100644
index 0000000..909182d
--- /dev/null
+++ b/meta-ivi-test/recipes-yocto-ivi/images/test-image.bb
@@ -0,0 +1,20 @@
+require recipes-yocto-ivi/images/ivi-image.bb
+
+PV = "${DATE}"
+
+IMAGE_INSTALL_append += " openssh test-fw \
+ audiomanager-test audiomanagerplugins-test \
+ common-api-test capicxx-perf \
+ persistence-client-library-test \
+ persistence-common-object-test \
+ persistence-administrator-test \
+ dlt-daemon-test \
+ node-state-manager-test \
+ node-health-monitor-test \
+ bluez5-noinst-tools bluez5-test \
+ node-startup-controller-nsm-dummy glib-2.0-utils \
+ vsomeip-test \
+ wayland-ivi-extension-test \
+ "
+
+EXTRA_USERS_PARAMS = ""
diff --git a/meta-ivi-test/recipes-yocto-ivi/test-fw/test-fw/test-fw.sh b/meta-ivi-test/recipes-yocto-ivi/test-fw/test-fw/test-fw.sh
new file mode 100755
index 0000000..b2f4c3e
--- /dev/null
+++ b/meta-ivi-test/recipes-yocto-ivi/test-fw/test-fw/test-fw.sh
@@ -0,0 +1,77 @@
+#!/bin/bash
+# create dbus-session
+dbus_live_p() {
+ dbus-send --bus=$1 \
+ --dest=org.freedesktop.DBus --type=method_call --print-reply \
+ /org/freedesktop/DBus org.freedesktop.DBus.ListNames > /tmp/dbus_check
+}
+
+if [ -f /tmp/dbus_test-fw ]; then
+ _bus_str=`grep -r DBUS_SESSION_BUS_ADDRESS /tmp/dbus_test-fw`
+ _bus_addr=`echo ${_bus_str} | awk -F_BUS_ADDRESS= '{print $2}'`
+ dbus_live_p ${_bus_addr}
+ _dbus_live_p=`grep "method return" /tmp/dbus_check`
+ if [ "x${_dbus_live_p}" = "x" ]; then
+ dbus-launch >& /tmp/dbus_test-fw
+ fi
+else
+ dbus-launch >& /tmp/dbus_test-fw
+fi
+export `grep -r DBUS_SESSION_BUS_ADDRESS /tmp/dbus_test-fw`
+
+test_list=`ls /opt/tests/*/*_t.inc | awk -F/ '{print $4}' | awk -F_t '{print $1}'`
+
+_test_run() {
+ n=$1
+ echo "##########"
+ get_title
+ echo "##########"
+
+ if [ "x${n}" = "x" ]; then
+ get_list
+ cnt=$?
+ echo "[ number of tests:" $cnt "]"
+ for k in `seq $cnt`; do
+ echo -n "[" run_${k} "]"
+ eval run_${k} "no_verbose_output"
+ done
+ else
+ echo "[" run_${n} "]"
+ eval run_${n}
+ fi
+}
+
+if [ "x$1" = "xhelp" ]; then
+ echo "$0"
+ echo " - run all test"
+ echo ""
+ echo "$0 list"
+ echo " - list all test program"
+ echo ""
+ echo "$0 <name>"
+ echo " - run all sequence of test <name>"
+ echo ""
+ echo "$0 <name> <no>"
+ echo " - run sequence <no> of test <name>"
+ echo ""
+ exit 0
+fi
+
+for i in $test_list; do
+ j="/opt/tests/${i}/${i}_t.inc"
+ . $j
+
+ if [ "x$1" != "x" ]; then
+ if [ "$1" = "list" ]; then
+ get_list
+ cnt=$?
+ echo $i $cnt
+ elif [ "${1}" = "${i}" ]; then
+ _test_run $2
+ break
+ fi
+ continue;
+ fi
+ _test_run
+ sleep 2
+done
diff --git a/meta-ivi-test/recipes-yocto-ivi/test-fw/test-fw_0.1.bb b/meta-ivi-test/recipes-yocto-ivi/test-fw/test-fw_0.1.bb
new file mode 100644
index 0000000..561cb32
--- /dev/null
+++ b/meta-ivi-test/recipes-yocto-ivi/test-fw/test-fw_0.1.bb
@@ -0,0 +1,21 @@
+SUMMARY = "Simple Test script for meta-ivi"
+DESCRIPTION = "This component provides a simple test framework for testing meta-ivi s/w"
+HOMEPAGE = "https://github.com/GENIVI/meta-ivi"
+SECTION = "test"
+LICENSE = "MPL-2.0"
+LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MPL-2.0;md5=815ca599c9df247a0c7f619bab123dad"
+
+SRC_URI = "file://test-fw.sh \
+ "
+
+do_compile() {
+}
+
+do_install() {
+ install -d ${D}/opt/tests/
+ install -m 0755 ${WORKDIR}/test-fw.sh ${D}/opt/tests/
+}
+
+FILES_${PN} += " \
+ /opt/tests/ \
+ "