diff options
-rw-r--r-- | .gitignore | 1 | ||||
-rwxr-xr-x | src/script/run | 38 | ||||
-rw-r--r-- | test/script/README | 56 | ||||
-rw-r--r-- | test/script/simulation-dashboard.py | 2 |
4 files changed, 82 insertions, 15 deletions
@@ -3,6 +3,7 @@ *-release/ /.project bin/ +build*/ #files *~ diff --git a/src/script/run b/src/script/run index 00c3967..c5f842e 100755 --- a/src/script/run +++ b/src/script/run @@ -95,15 +95,17 @@ CUR_DIR=$PWD BIN_DIR=$PWD/../../bin SRC_DIR=$PWD/.. gdb=0 -lm=0 -multi=0 xterm=0 log=0 +enhpos=1 +lm=0 +prototyping=0 replayer=1 wm="" app=$SRC_DIR/hmi/qml/application.qml +popup=$SRC_DIR/hmi/qml/pop-up.qml -while getopts a:c:glNnopRx opt +while getopts a:c:glnoprx opt do case $opt in a) @@ -119,14 +121,18 @@ do l) lm=1 ;; - N|n) + n) + enhpos=0 plugin_args="$plugin_args -$opt" ;; o) plugin_args="$plugin_args -$opt" log=1 ;; - R) + p) + prototyping=1 + ;; + r) replayer=0 ;; x) @@ -135,14 +141,15 @@ do ;; \?) echo "Usage:" - echo "$0 [-a application][-c center][-lnx]" + echo "$0 [-a application][-c center][-glnoprx]" echo "-a: Set application (default application.qml)" echo "-c: Set center (supported values: paris,tokyo,longitude latitude). Default is geneve" echo "-g: Run subprocesses within gdb (only with -x)" echo "-l: Use layermanager" - echo "-N: Don't start enhanced positioning service" + echo "-n: Don't start enhanced positioning service" echo "-o: Create log file of subprocess output" - echo "-R: Don't start replayer" + echo "-p: Prototyping" + echo "-r: Don't start replayer" echo "-x: Run subprocesses in own xterm to get separated log messages (doesn't make sense with -l)" exit 1 esac @@ -178,14 +185,18 @@ then fi export | egrep " LM_PLUGIN_PATH=|LM_USE_SESSION_BUS=| DBUS_SESSION_BUS_ADDRESS=| LD_LIBRARY_PATH=| PATH=| DISPLAY=" >env.sh trap "terminate" EXIT INT +set -e cd $BIN_DIR/automotive-message-broker run "Automotive Message Broker" ./ambd/ambd --config $SRC_DIR/genivilogreplayer/logreplayerconfig -if [ "$replayer" = 1 ] +if [ "$enhpos" = 1 ] then - cd $BIN_DIR/log-replayer - run "Log Replayer" ./log-replayer $SRC_DIR/positioning_*/log-replayer/logs/geneve-cologny.log + if [ "$replayer" = 1 ] + then + cd $BIN_DIR/log-replayer + run "Log Replayer" ./log-replayer $SRC_DIR/positioning_*/log-replayer/logs/geneve-cologny.log + fi fi cd $BIN_DIR/poi-service @@ -212,6 +223,11 @@ if [ "$lm" = 1 ] then lmqmlviewer $app else +if [ "$prototyping" = 1 ] +then + ./hmi-launcher $app $popup +else ./hmi-launcher $app fi +fi diff --git a/test/script/README b/test/script/README index 3f25deb..eb9efb2 100644 --- a/test/script/README +++ b/test/script/README @@ -1,4 +1,4 @@ -Release date of the file: 18-07-2014 +Release date of the file: 29-07-2014 Status: to be completed This test bench is based on Python pygame and use python enum class. @@ -8,10 +8,11 @@ sudo pip install enum To test: -Launch the application without the log replayer: -./run -R +Launch the application without the logreplayer: +./run -r Launch the test dashboard (keyboard interface) +(the test dashboard calls the logreplayer and uses test log files) python simulation-dashboard.py Steps: @@ -21,9 +22,58 @@ Steps: 'l' launches low-tank-level.log 'x' exits the dashboard (or close the window) +Test scenario: + +Assume no ./ambd/ambd process is still running (kill -9 if necessary) +Assume application launched (./run -r) and test panel launched (python simulation-dashboard.py) successfully. +The main HMI of FSA is displayed, and the test panel too, with right values displayed (Lat 46.202 Lon 6.147) + +Click on trip computer button +(nothing is activated) +Into the test panel, enter 'i' +Into the test panel, enter 'h' +Fuel level is 30 l, trip values are displayed after 400 m +Only tank distance is available (no guidance active) + +Click on BACK button +Go to enter a destination +Go to enter a destination per address +Click on city button +Enter zuri.. +Select Zürich into the list +Click on street button +Enter lamp.. +Select In Lampitzäcken into the list +Click on OK button +Click on set as destination +(the GO TO button is activated) +Click on GO TO button +Route is calculated, DISTANCE = 286 km, TIME = 2:39:46 +Click on ON button (to activate the guidance) +The map is displayed +To activate the simulation: +Click on Menu button +Click on settings button +(simulation panel) +Click on ON button to start the simulation +Simulation is started +Click on BACK button + +Click on trip computer button +Enhanced tank distance is lower than tank distance but > 286 km (route total distance) +Into the test panel, enter 'l' +Fuel level is 15 l, Enhanced tank distance is lower than 286 km ! +Click on BACK button +Click on map +A F is diplayed, click on it +Into the poi menu, click on SEARCH +Select a full station +The info about the station are displayed +Click on REROUTE Known issues: ambd process sometimes not killed, so check it ./kill_all to kill all the process but still issue with ambd ? +so you need to do kill -9 of the amb process diff --git a/test/script/simulation-dashboard.py b/test/script/simulation-dashboard.py index b010b68..e79dab4 100644 --- a/test/script/simulation-dashboard.py +++ b/test/script/simulation-dashboard.py @@ -213,7 +213,7 @@ ambOdometerInterface = dbus.Interface(ambOdometer, "org.automotive.Odometer") # Enhanced position -enhancedPositionObject = dbusConnectionBus.get_object("org.genivi.positioning.EnhancedPosition", "/position") +enhancedPositionObject = dbusConnectionBus.get_object("org.genivi.positioning.EnhancedPosition", "/org/genivi/positioning/EnhancedPosition") enhancedPositionInterface = dbus.Interface(enhancedPositionObject, "org.genivi.positioning.EnhancedPosition") displayStatus( 'Start simulation' ) |