aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYong-iL Joh <yong-il.joh@windriver.com>2016-09-23 10:14:14 +0900
committerYong-iL Joh <yong-il.joh@windriver.com>2016-09-23 10:14:14 +0900
commit472bc942730fed17d4996365c4be50717f130aa3 (patch)
treef684df954ebce113cf507f666f2fa44518e5c133
parent16c78f7c57f2dd6e15c517233bd6a042ca58ef0b (diff)
downloadmeta-ivi-472bc942730fed17d4996365c4be50717f130aa3.tar.gz
meta-ivi-472bc942730fed17d4996365c4be50717f130aa3.tar.bz2
meta-ivi-472bc942730fed17d4996365c4be50717f130aa3.zip
node-state-manager: fix test script
Signed-off-by: Yong-iL Joh <yong-il.joh@windriver.com>
-rw-r--r--meta-ivi-test/recipes-extended/node-state-manager/node-state-manager/node-state-manager_t.inc30
1 files changed, 19 insertions, 11 deletions
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
index f68b454..8de5959 100644
--- 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
@@ -12,7 +12,21 @@ _run_1() {
${_run_dir}/NodeStateTest
}
+_setup_env() {
+ systemctl stop node-startup-controller
+
+ _p=`pidof NodeStateManager`
+ if [ "x${_p}" != "x" ]; then
+ kill -9 ${_p} >& /dev/null
+ fi
+ _p=`pidof nsm-dummy`
+ if [ "x${_p}" != "x" ]; then
+ kill -9 ${_p} >& /dev/null
+ fi
+}
+
_lib=/usr/lib/libNodeStateMachineStub.so
+_lib_2=/usr/lib/libNodeStateMachineTest.so
_lib_t=${_run_dir}/lib/libNodeStateMachineTest.so
_lib_bak=${_run_dir}/lib/libNodeStateMachineStub.so
run_1() {
@@ -23,7 +37,9 @@ run_1() {
ldconfig
sleep 1
- systemctl start node-startup-controller
+ _setup_env
+ /usr/bin/NodeStateManager >& /dev/null &
+ sleep 2
if [ "x${1}" != "x" ]; then
_run_1 > /tmp/t 2> /tmp/t.err
@@ -40,17 +56,9 @@ run_1() {
_run_1 2> /tmp/t.err
fi
- systemctl stop node-startup-controller
- _p=`pidof NodeStateManager`
- if [ "x${_p}" != "x" ]; then
- kill -9 ${_p} >& /dev/null
- fi
- _p=`pidof nsm-dummy`
- if [ "x${_p}" != "x" ]; then
- kill -9 ${_p} >& /dev/null
- fi
+ _setup_env
- rm -f ${_lib}
+ rm -f ${_lib} ${_lib_2}
cp ${_lib_bak} ${_lib}
ldconfig
}