diff options
author | <philippe colliot> | 2016-04-15 16:38:01 +0200 |
---|---|---|
committer | <philippe colliot> | 2016-04-15 16:38:01 +0200 |
commit | 1526511f11177d444e6fc6678616bd4a9243d1d2 (patch) | |
tree | af53d430801ce17777a6768d34d062a0fc4e4c44 /src | |
parent | 4f56cbf7fa12eb061e4a8a428d3412bc1c220752 (diff) | |
download | navigation-1526511f11177d444e6fc6678616bd4a9243d1d2.tar.gz |
Some minor changes for the test scripts
Diffstat (limited to 'src')
-rwxr-xr-x | src/step | 33 | ||||
-rwxr-xr-x | src/step6 | 15 | ||||
-rwxr-xr-x | src/step7 | 15 | ||||
-rwxr-xr-x | src/stop | 16 |
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 + @@ -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 @@ -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 @@ -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 |