aboutsummaryrefslogtreecommitdiffstats
path: root/meta-ivi-test
diff options
context:
space:
mode:
authorYong-iL Joh <yong-il.joh@windriver.com>2017-02-08 07:24:59 +0900
committerYong-iL Joh <yong-il.joh@windriver.com>2017-02-08 16:49:08 +0900
commit1207963595d4c85b626b20b6a88cc7c3321facc9 (patch)
tree08b494b1a87e903ecb23f83ac59e0252811e9f37 /meta-ivi-test
parent8a3ffa132bdc4cb482c58888871dd8291479164b (diff)
downloadmeta-ivi-1207963595d4c85b626b20b6a88cc7c3321facc9.tar.gz
meta-ivi-1207963595d4c85b626b20b6a88cc7c3321facc9.tar.bz2
meta-ivi-1207963595d4c85b626b20b6a88cc7c3321facc9.zip
persistence-client-library: add more tests
Signed-off-by: Yong-iL Joh <yong-il.joh@windriver.com>
Diffstat (limited to 'meta-ivi-test')
-rwxr-xr-x[-rw-r--r--]meta-ivi-test/recipes-extended/persistence-client-library/persistence-client-library/persistence-client-library_t.inc46
-rw-r--r--meta-ivi-test/recipes-extended/persistence-client-library/persistence-client-library_%.bbappend10
2 files changed, 45 insertions, 11 deletions
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
index d39149c..9307de8 100644..100755
--- 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
@@ -1,6 +1,6 @@
#!/bin/sh
get_list() {
- return 1
+ return 3
}
get_title() {
@@ -8,10 +8,6 @@ get_title() {
}
_run_dir=/opt/tests/persistence-client-library
-_run_1() {
- persadmin_tool install /Data/Data.tar.gz > /tmp/t
- ${_run_dir}/persistence_client_library_test
-}
_setup_env() {
_p=`pidof NodeStateManager`
@@ -23,14 +19,18 @@ _setup_env() {
kill -9 ${_p} >& /dev/null
fi
+ if [ ! -e /Data/mnt-c/lt-persistence_client_library_test/ ]; then
+ persadmin_tool install /Data/Data_benchmark.tar.gz > /tmp/t
+ fi
systemctl restart pas-daemon
+ systemctl restart nodestatemanager-daemon
}
-run_1() {
+_run() {
_setup_env
- if [ "x${1}" != "x" ]; then
- _run_1 > /tmp/t
+ if [ "x${2}" != "x" ]; then
+ ${_run_dir}/$1 > /tmp/t
_c1=`cat /tmp/t | grep :P: | wc -l`
_c2=`cat /tmp/t | grep :F: | wc -l`
if [ "x${_c1}" = "x0" ]; then
@@ -41,6 +41,34 @@ run_1() {
echo " ${_c1} PASSED, ${_c2} FAILED"
fi
else
- _run_1
+ ${_run_dir}/$1
fi
}
+
+_run_2() {
+ _setup_env
+
+ if [ "x${2}" != "x" ]; then
+ yes | ${_run_dir}/$1 > /tmp/t
+ _c1=`cat /tmp/t | grep "Press enter to end" | wc -l`
+ if [ "x${_c1}" = "x0" ]; then
+ echo "[ FAILED ]"
+ else
+ echo "[ PASSED ]"
+ fi
+ else
+ yes | ${_run_dir}/$1
+ fi
+}
+
+run_1() {
+ _run persistence_client_library_test $*
+}
+
+run_2() {
+ _run persistence_client_library_test_file $*
+}
+
+run_3() {
+ _run_2 persistence_client_library_dbus_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 979280d..db168c8 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
@@ -9,13 +9,19 @@ EXTRA_OECONF += " --enable-tests "
do_install_append() {
install -d ${D}/opt/tests/${PN}
+ install -m 0755 ${S}/test/.libs/persistence_client_library_dbus_test \
+ ${D}/opt/tests/${PN}
install -m 0755 ${S}/test/.libs/persistence_client_library_test \
${D}/opt/tests/${PN}
+ install -m 0755 ${S}/test/.libs/persistence_client_library_test_file \
+ ${D}/opt/tests/${PN}
install -d ${D}/Data
install -m 0644 ${S}/test/data/PAS_data.tar.gz \
${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 0644 ${S}/test/data/PAS_data_benchmark.tar.gz \
+ ${D}/Data/Data_benchmark.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}
}