summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorasanoaozora <fifitaneki@hotmail.com>2016-05-24 14:57:42 +0200
committerasanoaozora <fifitaneki@hotmail.com>2016-05-24 14:57:42 +0200
commit5c53c08a85ac2f953f986cf21023a938fb77c385 (patch)
treeca70b8a3aa0d234dacaa68f5a1b59d79050f09ce /test
parent9633477ee8cbd4ad9c44b892ec4789ff61a3c4ce (diff)
downloadnavigation-5c53c08a85ac2f953f986cf21023a938fb77c385.tar.gz
some updates of README, scripts and fix minor bugs
Diffstat (limited to 'test')
-rwxr-xr-xtest/README.md (renamed from test/script/README)66
-rw-r--r--test/html-based-panel/README.md41
-rwxr-xr-xtest/script/set-vehicle-info.py2
3 files changed, 47 insertions, 62 deletions
diff --git a/test/script/README b/test/README.md
index a98c653..e014297 100755
--- a/test/script/README
+++ b/test/README.md
@@ -1,35 +1,44 @@
-Release date of the file: 07-11-2014
-Status: to be completed
+# Test files for Navigation application (including Fuel Stop Advisor)
+## Synopsis
+These folders contain several files that allow to test the FSA.
+- Under ./script
+Python scripts to proceed some unitary tests and to simulate the data for FSA
+A bash script to monitor some DBus frames
+- Under html-based-panel
+A nodejs based stuff to simulate the data for FSA (prototype version)
+##Tested targets
+Desktop: Tested under Ubuntu 16.04 LTS 64 bits
+## Python scripts
This test bench requires Python version >= 3.4 and uses pygame.
-
-How to get pygame (for Ubuntu 14.04 LTS)
-(extract of http://www.pygame.org/wiki/CompileUbuntu)
-#install dependencies
-sudo apt-get install mercurial python3-dev python3-numpy libav-tools \
- libsdl-image1.2-dev libsdl-mixer1.2-dev libsdl-ttf2.0-dev libsmpeg-dev \
- libsdl1.2-dev libportmidi-dev libswscale-dev libavformat-dev libavcodec-dev
-
-# Grab source
+It's necessary to build it for Python3
+###Get pygame for Python3
+(Thanks to http://www.pygame.org/wiki/CompileUbuntu)
+1. install dependencies
+sudo apt-get install mercurial python3-dev python3-numpy libav-tools libsdl-image1.2-dev libsdl-mixer1.2-dev libsdl-ttf2.0-dev libsmpeg-dev libsdl1.2-dev libportmidi-dev libswscale-dev libavformat-dev libavcodec-dev
+2. Grab source
hg clone https://bitbucket.org/pygame/pygame
-
-# Finally build and install
+3.Finally build and install
cd pygame
python3 setup.py build
+sudo python3 setup.py install
+### List of scripts
+./script/set-position.py
+Set a predefined position (from the ./resource/test-positioning.log)
+./script/set-vehicle-info.py
+Set predefined vehicle data (from the ./resource/test-vehicle-info.log)
+./script/simulation-dashboard.py
+The main test panel for FSA (see below)
-To test:
-
-Launch the application without the logreplayer:
-./run -r
+## How to test the FSA with Python
+NB: The test script is using the logreplayer to simulate position and vehicle data, so it's needed to launch the application without the logreplayer
+NB: Before launching the application, assume no ./ambd/ambd process is running (kill -9 if necessary)
+Launch the FSA:
+./src/run -r
Launch the test dashboard (keyboard interface)
-(the test dashboard calls the logreplayer and uses test log files)
-For Ubuntu 14.04 LTS
python3 simulation-dashboard.py
-For Ubuntu 15.10
-python simulation-dashboard.py
-
NB: To launch it remotely, you can set the host address, for instance: python3 simulation-dashboard.py -r 192.168.1.202
Steps:
@@ -39,14 +48,9 @@ Steps:
'l' launches low-tank-level.log
'x' exits the dashboard (or close the window)
-Test scenario:
+###Test scenario:
-Before launching the application, assume no ./ambd/ambd process is running (kill -9 if necessary)
-Launch the application without the log replayer
-./run -r
The main HMI of FSA is displayed
-Launch the test panel
-python simulation-dashboard.py
The test panel is displayed, with Lat 46.202 Lon 6.147 (Geneva area)
Click on trip computer button
@@ -92,9 +96,3 @@ Select a full station
The info about the station are displayed
Click on REROUTE
-Known issues:
-
-ambd process sometimes not killed when the application exits, 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/html-based-panel/README.md b/test/html-based-panel/README.md
index 6cdac84..47eecfc 100644
--- a/test/html-based-panel/README.md
+++ b/test/html-based-panel/README.md
@@ -1,41 +1,28 @@
-Preliminary code for testing the implementation of a set of navigation Web API based on GENIVI API
-Technology used: nodejs
+# HTML based interface to test the FSA
-To get a given version of nodejs (e.g. 0.12):
-curl -sL https://deb.nodesource.com/setup_0.12 | sudo -E bash
-sudo apt-get install -y nodejs
-NB: not supported by my trusty :-(
+## Synopsis
+This folder contains the HTML version of the test panel
-For the time being, version is v0.10.25:
-sudo apt-get install nodejs npm
-npm install -g node-gyp
+##Tested targets
+Desktop: Tested under Ubuntu 16.04 LTS 64 bits
+## Prerequisites
+nodejs version is v4.2.6
+
+Some additional modules are required for nodejs:
+npm install http url fs path socket.io gcontext python-shell enum
+
+## How to build
To build the c++ add-on in C++ and install the module localy for nodejs:
cd ./node-cpp-lbs-modules
-npm build .
-npm pack
+make
cd ..
npm install node-cpp-lbs-modules/node-cpp-lbs-modules-0.1.0.tgz
-To test:
-Intall additional modules for nodejs:
-npm install http url fs path socket.io gcontext python-shell enum
-
+## How to test
Run the server:
nodejs server.js
In your browser open the file ./index.html
-Annex:
-To debug the C++ add-on:
-cd ./node-cpp-lbs-modules
-node-gyp configure --debug
-node-gyp build --debug
-npm pack
-cd ..
-npm install node-cpp-lbs-modules/node-cpp-lbs-modules-0.1.0.tgz
-To see where the issue is in the js file:
-nodejs debug server.js
-To debug the c++ addon:
-gdb --args /usr/bin/nodejs server.js
diff --git a/test/script/set-vehicle-info.py b/test/script/set-vehicle-info.py
index 95ad5ff..fdd7f15 100755
--- a/test/script/set-vehicle-info.py
+++ b/test/script/set-vehicle-info.py
@@ -38,7 +38,7 @@ class Step(IntEnum):
END = 4
# Define some constants
-KEYBOARD_PERIODICITY = 1000 #in ms
+KEYBOARD_PERIODICITY = 200 #in ms
LOCAL_HOST = '127.0.0.1'
def getKeyboard():