aboutsummaryrefslogtreecommitdiffstats
path: root/meta-ivi-test/recipes-extended
diff options
context:
space:
mode:
authorYong-iL Joh <yong-il.joh@windriver.com>2016-07-21 16:26:41 +0900
committerYong-iL Joh <yong-il.joh@windriver.com>2016-07-22 18:05:08 +0900
commitac2477469052e8c94c751a63781ee6d969e027f0 (patch)
treeaaa2018e0bf74c805a4ffc69256695e99ebfdb9f /meta-ivi-test/recipes-extended
parent3d5fe70bf61118412ca346c353eaa1c881bc1044 (diff)
downloadmeta-ivi-ac2477469052e8c94c751a63781ee6d969e027f0.tar.gz
meta-ivi-ac2477469052e8c94c751a63781ee6d969e027f0.tar.bz2
meta-ivi-ac2477469052e8c94c751a63781ee6d969e027f0.zip
test-fw: added (test framework)
Signed-off-by: Yong-iL Joh <yong-il.joh@windriver.com>
Diffstat (limited to 'meta-ivi-test/recipes-extended')
-rw-r--r--meta-ivi-test/recipes-extended/common-api/capicxx-perf/capicxx-perf_t.inc15
-rw-r--r--meta-ivi-test/recipes-extended/common-api/capicxx-perf_git.bb6
-rw-r--r--meta-ivi-test/recipes-extended/common-api/common-api-test/common-api-test_t.inc17
-rw-r--r--meta-ivi-test/recipes-extended/common-api/common-api-test_3.1.5.bb6
-rw-r--r--meta-ivi-test/recipes-extended/dlt-daemon/dlt-daemon/dlt-daemon_t.inc16
-rw-r--r--meta-ivi-test/recipes-extended/dlt-daemon/dlt-daemon_%.bbappend12
-rw-r--r--meta-ivi-test/recipes-extended/node-state-manager/node-state-manager/node-state-manager_t.inc28
-rw-r--r--meta-ivi-test/recipes-extended/node-state-manager/node-state-manager_%.bbappend9
-rw-r--r--meta-ivi-test/recipes-extended/persistence-administrator/persistence-administrator/persistence-administrator_t.inc27
-rw-r--r--meta-ivi-test/recipes-extended/persistence-administrator/persistence-administrator_%.bbappend15
-rw-r--r--meta-ivi-test/recipes-extended/persistence-client-library/persistence-client-library/persistence-client-library_t.inc17
-rw-r--r--meta-ivi-test/recipes-extended/persistence-client-library/persistence-client-library_%.bbappend16
-rw-r--r--meta-ivi-test/recipes-extended/persistence-common-object/persistence-common-object/persistence-common-object_t.inc12
-rw-r--r--meta-ivi-test/recipes-extended/persistence-common-object/persistence-common-object_%.bbappend15
14 files changed, 179 insertions, 32 deletions
diff --git a/meta-ivi-test/recipes-extended/common-api/capicxx-perf/capicxx-perf_t.inc b/meta-ivi-test/recipes-extended/common-api/capicxx-perf/capicxx-perf_t.inc
new file mode 100644
index 0000000..2503c10
--- /dev/null
+++ b/meta-ivi-test/recipes-extended/common-api/capicxx-perf/capicxx-perf_t.inc
@@ -0,0 +1,15 @@
+#!/bin/sh
+get_list() {
+ return 1
+}
+
+get_title() {
+ echo "Common API C++ test code"
+}
+
+run_1() {
+ /opt/tests/capicxx-perf/capicxx-server &
+ /opt/tests/capicxx-perf/capicxx-client
+ kill -9 `pidof capicxx-server`
+ sleep 1
+}
diff --git a/meta-ivi-test/recipes-extended/common-api/capicxx-perf_git.bb b/meta-ivi-test/recipes-extended/common-api/capicxx-perf_git.bb
index 2263647..f468650 100644
--- a/meta-ivi-test/recipes-extended/common-api/capicxx-perf_git.bb
+++ b/meta-ivi-test/recipes-extended/common-api/capicxx-perf_git.bb
@@ -6,7 +6,9 @@ LIC_FILES_CHKSUM = \
PR = "r0"
SRCREV = "2eacc9d7fb76957e9a5450a559675fddf0a95ce2"
-SRC_URI = "git://github.com/GENIVI/capic-poc.git"
+SRC_URI = "git://github.com/GENIVI/capic-poc.git \
+ file://${BPN}_t.inc \
+ "
S = "${WORKDIR}/git/test/capicxx-perf"
DEPENDS = "common-api-c++ common-api-c++-dbus capicxx-core-native capicxx-dbus-native"
@@ -31,4 +33,6 @@ do_install_append() {
mv ${D}/usr/bin/* ${_DEST}
rmdir ${D}/usr/bin
rmdir ${D}/usr
+
+ install -m 0755 ${WORKDIR}/${BPN}_t.inc ${D}/opt/tests/${PN}
}
diff --git a/meta-ivi-test/recipes-extended/common-api/common-api-test/common-api-test_t.inc b/meta-ivi-test/recipes-extended/common-api/common-api-test/common-api-test_t.inc
new file mode 100644
index 0000000..8b304f1
--- /dev/null
+++ b/meta-ivi-test/recipes-extended/common-api/common-api-test/common-api-test_t.inc
@@ -0,0 +1,17 @@
+#!/bin/sh
+get_list() {
+ return 1
+}
+
+get_title() {
+ echo "Common API C++ runtime"
+}
+
+run_1() {
+ /opt/tests/common-api-test/E05ManagerService &
+ /opt/tests/common-api-test/E05ManagerClient &
+ sleep 5
+ kill -9 `pidof E05ManagerClient`
+ kill -9 `pidof E05ManagerService`
+ sleep 1
+}
diff --git a/meta-ivi-test/recipes-extended/common-api/common-api-test_3.1.5.bb b/meta-ivi-test/recipes-extended/common-api/common-api-test_3.1.5.bb
index a286502..04b8154 100644
--- a/meta-ivi-test/recipes-extended/common-api/common-api-test_3.1.5.bb
+++ b/meta-ivi-test/recipes-extended/common-api/common-api-test_3.1.5.bb
@@ -4,12 +4,13 @@ LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
PR = "r0"
-inherit autotools cmake pkgconfig
+inherit cmake pkgconfig
DEPENDS += " common-api-c++ common-api-c++-dbus glib-2.0"
SRC_URI = " \
file://${PN}-${PV}.tar.gz \
+ file://${BPN}_t.inc \
"
S = "${WORKDIR}/${PN}"
@@ -22,6 +23,7 @@ FILES_${PN} = " \
/opt/tests/${PN}/*/commonapi4dbus.ini \
/opt/tests/${PN}/*/*Client \
/opt/tests/${PN}/*/*Service \
+ /opt/tests/${PN}/${BPN}_t.inc \
${libdir}/*.so \
"
@@ -60,4 +62,6 @@ do_install() {
fi
install -m 0755 ${_BIN}/${i}/lib${i}-dbus.so ${D}${libdir}
done
+
+ install -m 0755 ${WORKDIR}/${BPN}_t.inc ${D}/opt/tests/${PN}
}
diff --git a/meta-ivi-test/recipes-extended/dlt-daemon/dlt-daemon/dlt-daemon_t.inc b/meta-ivi-test/recipes-extended/dlt-daemon/dlt-daemon/dlt-daemon_t.inc
new file mode 100644
index 0000000..195db76
--- /dev/null
+++ b/meta-ivi-test/recipes-extended/dlt-daemon/dlt-daemon/dlt-daemon_t.inc
@@ -0,0 +1,16 @@
+#!/bin/sh
+get_list() {
+ return 2
+}
+
+get_title() {
+ echo "dlt-daemon"
+}
+
+run_1() {
+ /opt/tests/dlt-daemon/dlt-test-filetransfer
+}
+
+run_2() {
+ /opt/tests/dlt-daemon/dlt-test-user
+}
diff --git a/meta-ivi-test/recipes-extended/dlt-daemon/dlt-daemon_%.bbappend b/meta-ivi-test/recipes-extended/dlt-daemon/dlt-daemon_%.bbappend
index 8b50f89..4f6af19 100644
--- a/meta-ivi-test/recipes-extended/dlt-daemon/dlt-daemon_%.bbappend
+++ b/meta-ivi-test/recipes-extended/dlt-daemon/dlt-daemon_%.bbappend
@@ -4,6 +4,7 @@
FILESEXTRAPATHS_append := ":${THISDIR}/${PN}"
SRC_URI_append += " \
file://0001-change-file-position-for-dlt-test-filetransfer.patch \
+ file://${BPN}_t.inc \
"
EXTRA_OECMAKE += "-DWITH_DLTTEST=ON -DCMAKE_SKIP_RPATH=ON -DWITH_MAN=OFF"
@@ -12,15 +13,12 @@ do_install_append() {
_BIN=${WORKDIR}/build/src/tests
install -d ${D}/opt/tests/${PN}/data
install -m 0755 ${_BIN}/dlt-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}/dlt-test* \
- /opt/tests/${PN}/data/* \
- "
+FILES_${PN}-dbg += "/opt/tests/${PN}/.debug/* "
+FILES_${PN}-test = "/opt/tests/${PN}/ "
diff --git a/meta-ivi-test/recipes-extended/node-state-manager/node-state-manager/node-state-manager_t.inc b/meta-ivi-test/recipes-extended/node-state-manager/node-state-manager/node-state-manager_t.inc
new file mode 100644
index 0000000..6ac298c
--- /dev/null
+++ b/meta-ivi-test/recipes-extended/node-state-manager/node-state-manager/node-state-manager_t.inc
@@ -0,0 +1,28 @@
+#!/bin/sh
+get_list() {
+ return 1
+}
+
+get_title() {
+ echo "Node State Manager"
+}
+
+run_1() {
+ cd /usr/lib
+ mv libNodeStateMachineStub.so libNodeStateMachineStub.so.bak
+ cp /opt/tests/node-state-manager/lib/libNodeStateMachineTest.so \
+ libNodeStateMachineStub.so
+ ldconfig
+ sleep 1
+
+ systemctl start node-startup-controller
+
+ /opt/tests/node-state-manager/NodeStateTest
+
+ systemctl stop node-startup-controller
+ kill -9 `pidof NodeStateManager`
+
+ rm -f libNodeStateMachineStub.so
+ mv libNodeStateMachineStub.so.bak libNodeStateMachineStub.so
+ ldconfig
+}
diff --git a/meta-ivi-test/recipes-extended/node-state-manager/node-state-manager_%.bbappend b/meta-ivi-test/recipes-extended/node-state-manager/node-state-manager_%.bbappend
index 15b86d6..a35ecc5 100644
--- a/meta-ivi-test/recipes-extended/node-state-manager/node-state-manager_%.bbappend
+++ b/meta-ivi-test/recipes-extended/node-state-manager/node-state-manager_%.bbappend
@@ -1,6 +1,11 @@
#
# for test
#
+FILESEXTRAPATHS_append := ":${THISDIR}/${PN}"
+SRC_URI_append += " \
+ file://${BPN}_t.inc \
+ "
+
do_compile_append() {
make -C NodeStateMachineTest
}
@@ -12,6 +17,8 @@ do_install_append() {
${D}${datadir}/dbus-1/interfaces/
install -m 0755 ${S}/NodeStateMachineTest/.libs/libNodeStateMachineTest.so \
${D}/opt/tests/${PN}/lib
+
+ install -m 0755 ${WORKDIR}/${BPN}_t.inc ${D}/opt/tests/${PN}
}
PACKAGES += "${PN}-test"
@@ -22,7 +29,7 @@ FILES_${PN}-dbg += " \
/opt/tests/${PN}/lib/.debug/* \
"
FILES_${PN}-test = " \
- /opt/tests/${PN}/* \
+ /opt/tests/${PN}/ \
/opt/tests/${PN}/lib/libNodeStateMachineTest.so \
${datadir}/dbus-1/interfaces/org.genivi.NodeStateMachineTest.xml \
"
diff --git a/meta-ivi-test/recipes-extended/persistence-administrator/persistence-administrator/persistence-administrator_t.inc b/meta-ivi-test/recipes-extended/persistence-administrator/persistence-administrator/persistence-administrator_t.inc
new file mode 100644
index 0000000..0e3a65c
--- /dev/null
+++ b/meta-ivi-test/recipes-extended/persistence-administrator/persistence-administrator/persistence-administrator_t.inc
@@ -0,0 +1,27 @@
+#!/bin/sh
+get_list() {
+ return 1
+}
+
+get_title() {
+ echo "persistence-administrator"
+}
+
+run_1() {
+ echo "error!"
+ echo "segfault at 7fa2ac0b6010 ip 000000364d88e130 sp 00007fa2ae0f2aa8 error 4 in libc-2.23.so[364d800000+197000]"
+ exit -1
+
+ if [ ! -d /tmp/PAS ]; then
+ rm -f /tmp/PAS
+ mkdir -p /tmp/PAS
+ fi
+ cp /opt/tests/persistence-administrator/resource*.tar.gz /tmp/PAS/
+
+ systemctl restart dlt-dbus
+ systemctl restart dlt-example-user
+ systemctl restart pas-daemon
+ systemctl restart node-startup-controller
+ persadmin_tool install /Data/Data.tar.gz
+ /opt/tests/persistence-administrator/pers_admin_test_framework
+}
diff --git a/meta-ivi-test/recipes-extended/persistence-administrator/persistence-administrator_%.bbappend b/meta-ivi-test/recipes-extended/persistence-administrator/persistence-administrator_%.bbappend
index e0026d4..13bcb3d 100644
--- a/meta-ivi-test/recipes-extended/persistence-administrator/persistence-administrator_%.bbappend
+++ b/meta-ivi-test/recipes-extended/persistence-administrator/persistence-administrator_%.bbappend
@@ -1,6 +1,10 @@
#
# test
#
+FILESEXTRAPATHS_append := ":${THISDIR}/${PN}"
+SRC_URI_append += " file://${BPN}_t.inc \
+ "
+
do_install_append() {
install -d ${D}/opt/tests/${PN}
mv ${S}/test/pers_svc_test/.libs/pers_admin_test_framework \
@@ -13,15 +17,12 @@ do_install_append() {
touch ${D}/Data/mnt-wt/README.wt
install -d ${D}/Data/mnt-c/
touch ${D}/Data/mnt-wt/README.c
+
+ 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}/* \
- /Data/* \
- "
+FILES_${PN}-dbg += "/opt/tests/${PN}/.debug/* "
+FILES_${PN}-test = "/opt/tests/${PN}/ /Data/* "
diff --git a/meta-ivi-test/recipes-extended/persistence-client-library/persistence-client-library/persistence-client-library_t.inc b/meta-ivi-test/recipes-extended/persistence-client-library/persistence-client-library/persistence-client-library_t.inc
new file mode 100644
index 0000000..7fbec91
--- /dev/null
+++ b/meta-ivi-test/recipes-extended/persistence-client-library/persistence-client-library/persistence-client-library_t.inc
@@ -0,0 +1,17 @@
+#!/bin/sh
+get_list() {
+ return 1
+}
+
+get_title() {
+ echo "persisitence-client-library"
+}
+
+run_1() {
+ systemctl restart dlt-dbus
+ systemctl restart dlt-example-user
+ systemctl restart pas-daemon
+ systemctl restart node-startup-controller
+ persadmin_tool install /Data/Data.tar.gz
+ /opt/tests/persistence-client-library/persistence_client_library_test
+}
diff --git a/meta-ivi-test/recipes-extended/persistence-client-library/persistence-client-library_%.bbappend b/meta-ivi-test/recipes-extended/persistence-client-library/persistence-client-library_%.bbappend
index fac9d12..963f5fc 100644
--- a/meta-ivi-test/recipes-extended/persistence-client-library/persistence-client-library_%.bbappend
+++ b/meta-ivi-test/recipes-extended/persistence-client-library/persistence-client-library_%.bbappend
@@ -1,6 +1,10 @@
#
# for test
#
+FILESEXTRAPATHS_append := ":${THISDIR}/${PN}"
+SRC_URI_append += " file://${BPN}_t.inc \
+ "
+
EXTRA_OECONF += "--enable-tests"
do_install_append() {
@@ -12,16 +16,12 @@ do_install_append() {
${D}/Data/Data.tar.gz
install -d ${D}/Data/mnt-c/lt-persistence_client_library_test
touch ${D}/Data/mnt-c/lt-persistence_client_library_test/BLANK
+
+ 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}/persistence_client_library_test \
- /Data/Data.tar.gz \
- /Data/mnt-c/lt-persistence_client_library_test/BLANK \
- "
+FILES_${PN}-dbg += "/opt/tests/${PN}/.debug/* "
+FILES_${PN}-test = "/opt/tests/${PN}/ /Data/* "
diff --git a/meta-ivi-test/recipes-extended/persistence-common-object/persistence-common-object/persistence-common-object_t.inc b/meta-ivi-test/recipes-extended/persistence-common-object/persistence-common-object/persistence-common-object_t.inc
new file mode 100644
index 0000000..c113bd3
--- /dev/null
+++ b/meta-ivi-test/recipes-extended/persistence-common-object/persistence-common-object/persistence-common-object_t.inc
@@ -0,0 +1,12 @@
+#!/bin/sh
+get_list() {
+ return 1
+}
+
+get_title() {
+ echo "persisitence-common-object"
+}
+
+run_1() {
+ /opt/tests/persistence-common-object/test_pco_key_value_store
+}
diff --git a/meta-ivi-test/recipes-extended/persistence-common-object/persistence-common-object_%.bbappend b/meta-ivi-test/recipes-extended/persistence-common-object/persistence-common-object_%.bbappend
index 6dc26d4..dbc65bb 100644
--- a/meta-ivi-test/recipes-extended/persistence-common-object/persistence-common-object_%.bbappend
+++ b/meta-ivi-test/recipes-extended/persistence-common-object/persistence-common-object_%.bbappend
@@ -1,21 +1,22 @@
#
# for test
#
+FILESEXTRAPATHS_append := ":${THISDIR}/${PN}"
+SRC_URI_append += " file://${BPN}_t.inc \
+ "
+
EXTRA_OECONF += "--enable-tests"
do_install_append() {
install -d ${D}/opt/tests/${PN}
install -m 0755 ${S}/test/.libs/test_pco_key_value_store \
${D}/opt/tests/${PN}
+
+ install -m 0755 ${WORKDIR}/${BPN}_t.inc ${D}/opt/tests/${PN}
}
PACKAGES += "${PN}-test"
RDEPENDS_${PN}-test += " libcheck"
-FILES_${PN}-dbg += " \
- /opt/tests/${PN}/.debug/* \
- "
-
-FILES_${PN}-test = " \
- /opt/tests/${PN}/test_pco_key_value_store \
- "
+FILES_${PN}-dbg += "/opt/tests/${PN}/.debug/* "
+FILES_${PN}-test = "/opt/tests/${PN}/ "