summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
author <philippe colliot>2016-04-15 16:38:01 +0200
committer <philippe colliot>2016-04-15 16:38:01 +0200
commit1526511f11177d444e6fc6678616bd4a9243d1d2 (patch)
treeaf53d430801ce17777a6768d34d062a0fc4e4c44 /src
parent4f56cbf7fa12eb061e4a8a428d3412bc1c220752 (diff)
downloadnavigation-1526511f11177d444e6fc6678616bd4a9243d1d2.tar.gz
Some minor changes for the test scripts
Diffstat (limited to 'src')
-rwxr-xr-xsrc/step33
-rwxr-xr-xsrc/step615
-rwxr-xr-xsrc/step715
-rwxr-xr-xsrc/stop16
4 files changed, 43 insertions, 36 deletions
diff --git a/src/step b/src/step
new file mode 100755
index 0000000..cd9679e
--- /dev/null
+++ b/src/step
@@ -0,0 +1,33 @@
+#! /bin/bash
+###########################################################################
+# @licence app begin@
+# SPDX-License-Identifier: MPL-2.0
+#
+# \copyright Copyright (C) 2016, PCA Peugeot Citroen
+#
+# \file step: step given step numbers
+#
+# \brief This file is part of the Build System.
+#
+# \author # Author: Philippe COLLIOT <philippe.colliot@mpsa.com>
+#
+# \version 1.0
+#
+# This Source Code Form is subject to the terms of the
+# Mozilla Public License (MPL), v. 2.0.
+# If a copy of the MPL was not distributed with this file,
+# You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+# For further information see http://www.genivi.org/.
+#
+# List of changes:
+#
+#
+# @licence end@
+###########################################################################
+
+for param in "$@"
+do
+ ./step$param &
+done
+
diff --git a/src/step6 b/src/step6
index 6c5f2b9..4bc9c89 100755
--- a/src/step6
+++ b/src/step6
@@ -35,20 +35,7 @@ FUEL_STOP_ADVISOR=fuel-stop-advisor
FUEL_STOP_ADVISOR_SRC_DIR=$SRC_DIR/$FUEL_STOP_ADVISOR
FUEL_STOP_ADVISOR_BIN_DIR=$BIN_DIR/$FUEL_STOP_ADVISOR
-# function to wait for the dbus service to be started, exit if too long
-function wait_for_service
-{
- for i in $(seq 1 50)
- do
- if dbus-send --dest=$1 $2 org.freedesktop.DBus.Introspectable.Introspect
- then
- return
- fi
- echo "Waiting for $1"
- sleep 0.1
- done
- exit 1
-}
+sleep 3 # need a sleep here (to be improved)
# start the fuel stop advisor application
$FUEL_STOP_ADVISOR_BIN_DIR/$FUEL_STOP_ADVISOR
diff --git a/src/step7 b/src/step7
index 02df55c..2ad28ac 100755
--- a/src/step7
+++ b/src/step7
@@ -39,21 +39,6 @@ HMI_QML_DIR=$SRC_DIR/hmi/qml
app=$HMI_QML_DIR/application.qml # hmi panel launched by default
STYLE_SHEETS_GENERATED_INDICATOR=$HMI_QML_DIR/Core/style-sheets/the-style-sheets-have-been-generated-css.js
-# function to wait for the dbus service to be started, exit if too long
-function wait_for_service
-{
- for i in $(seq 1 50)
- do
- if dbus-send --dest=$1 $2 org.freedesktop.DBus.Introspectable.Introspect
- then
- return
- fi
- echo "Waiting for $1"
- sleep 0.1
- done
- exit 1
-}
-
# check if style sheets have been generated
if [ ! -f $STYLE_SHEETS_GENERATED_INDICATOR ]
then
diff --git a/src/stop b/src/stop
index d26a1e7..9a093b8 100755
--- a/src/stop
+++ b/src/stop
@@ -1,10 +1,12 @@
#!/bin/sh
echo 'kill all remaining process created by step*'
-kill -TERM -$(pgrep -o step1)
-kill -TERM -$(pgrep -o step2)
-kill -TERM -$(pgrep -o step3)
-kill -TERM -$(pgrep -o step4)
-kill -TERM -$(pgrep -o step5)
-kill -TERM -$(pgrep -o step6)
-kill -TERM -$(pgrep -o step7)
+for i in 1 2 3 4 5 6 7
+do
+STEP=$(pgrep -f step$i)
+echo $STEP
+if [ -n "$STEP" ]; then
+ kill -TERM $(pgrep -P $(pgrep -o step$i))
+ kill -TERM $(pgrep -o step$i)
+fi
+done