diff options
author | <philippe colliot> | 2016-01-15 09:48:17 +0100 |
---|---|---|
committer | <philippe colliot> | 2016-01-15 09:48:17 +0100 |
commit | 9be8508170ae34680ab8107f04a6398db373ecc2 (patch) | |
tree | 70e45b11d9be7e1edb8baa1d327a89b605c289cf /test/poi-service | |
parent | 8226583ad533da922ae41eafcf184cb3ee362640 (diff) | |
download | poi-service-9be8508170ae34680ab8107f04a6398db373ecc2.tar.gz |
Some improvements of scripts and README
Diffstat (limited to 'test/poi-service')
-rw-r--r-- | test/poi-service/README | 72 | ||||
-rwxr-xr-x | test/poi-service/rebuild_all.sh | 66 | ||||
-rwxr-xr-x | test/poi-service/run_capi | 44 |
3 files changed, 148 insertions, 34 deletions
diff --git a/test/poi-service/README b/test/poi-service/README index 4342517..46e5b6b 100644 --- a/test/poi-service/README +++ b/test/poi-service/README @@ -1,4 +1,4 @@ -Release date of the file: 24-11-2015 +Release date of the file: 15-01-2016 Status: OK Project: @@ -15,7 +15,7 @@ See also other navigation projects like navigation or proof of concepts implemen What is in: This folder contains scripts for building poi-supplier, poi-contentaccess-module and poi-client, generating the databases and launching the whole stuff (build poi-server if necessary) -FYI: poi-server is located under src/poi-service +FYI: poi-server is located under ../../src/poi-service Author: Philippe Colliot philippe.colliot@mpsa.com @@ -56,30 +56,34 @@ cd positioning git checkout <current version of positioning> cd ../ -=============================== -How To Build -=============================== +============================================================================================= +How to for the proof of concept +============================================================================================= (you're supposed to have got additional code before) -Create and enter the build folder: +========================================== +All-in-one script (for paris area) +========================================== +./rebuild_all.sh + +========================================== +How-to step by step, with explanations +========================================== +---Create and enter the build folder--- mkdir ./build cd build - -Build: cmake ../ make cd .. -=============================== -How To Prepare the database and the configuration for a country -=============================== +---Prepare the database and the configuration for a country--- NB: You need to build the poi-supplier first: cd build cmake -DWITH_DATABASE_SUPPLIER=ON ../ make cd .. -To launch the stuff for Paris: +---To generate the database for Paris--- ./prepare -c paris NB: @@ -106,15 +110,42 @@ You need to fix it by: sudo su dbus-uuidgen > /etc/machine-id -=============================== +========================================== How To Run -=============================== - +========================================== ./run -=============================== -How To Build poi-common-manager-client (experimental) -=============================== +---Test sequence can be--- +On main panel: +CREATE + +On additional panel: +REGISTER +ADDandREG + +On main panel +Categories +all categories with Radius set to 2000 +bicycle with Radius set to 5000 +replace 'enter text to search' with 'Saint' +SEARCH +You see FINISHED with 32 records +Result list +TOP/PREV/NEXT to watch the result +For a new search, click on CANCEL first + +============================================================================================= +How to for the common api based proof of concept (for testing add/remove stuff into a database) +============================================================================================= + +========================================== +All-in-one script +========================================== +./rebuil_all.sh -f + +========================================== +How-to step by step, with explanations +========================================== First you need to build the poi-manager-server, see the README in ../../src/poi-service cd build @@ -129,6 +160,8 @@ make =============================== How To Run =============================== +./run_capi +NB: the configuration file ./resource/commonapi-dbus.ini is copied into $HOME Launch the server (into ../../src/poi-service) @@ -144,7 +177,8 @@ Launch the client ./bin/poi-manager-client -t poi manager client started -What is logged (no DLT started): +---Test sequence can be--- +NB: no DLT started DLT| WARNING: Loging disabled, FIFO /tmp/dlt cannot be opened with open()! [CAPI][INFO] Using default binding 'dbus' diff --git a/test/poi-service/rebuild_all.sh b/test/poi-service/rebuild_all.sh index ac20e38..acf09ae 100755 --- a/test/poi-service/rebuild_all.sh +++ b/test/poi-service/rebuild_all.sh @@ -1,22 +1,51 @@ #!/bin/bash -if [ ! $COMMONAPI_TOOL_DIR ] -then - echo 'Set the dir of the common api tools' - echo 'export COMMONAPI_TOOL_DIR=<path>' - exit 1 -fi +debug="OFF" +franca="OFF" +dbus="ON" +commonapi_tools_option="" + +while getopts df opt +do + case $opt in + d) + debug="ON" + ;; + f) + franca="ON" + dbus="OFF" + ;; + \?) + echo "Usage:" + echo "$0 [-df]" + echo "-d: Enable the debug messages" + echo "-f: Build using the Franca interfaces" + exit 1 + esac +done +set -e + +if [ $franca="ON" ] +then + if [ ! $COMMONAPI_TOOL_DIR ] + then + echo 'Set the dir of the common api tools' + echo 'export COMMONAPI_TOOL_DIR=<path>' + exit 1 + fi -if [ ! $COMMONAPI_DBUS_TOOL_DIR ] -then - echo 'Set the dir of the common api dbus tools' - echo 'export COMMONAPI_DBUS_TOOL_DIR=<path>' - exit 1 + if [ ! $COMMONAPI_DBUS_TOOL_DIR ] + then + echo 'Set the dir of the common api dbus tools' + echo 'export COMMONAPI_DBUS_TOOL_DIR=<path>' + exit 1 + fi + commonapi_tools_option="-DCOMMONAPI_DBUS_TOOL_DIR="$COMMONAPI_DBUS_TOOL_DIR" -DCOMMONAPI_TOOL_DIR="$COMMONAPI_TOOL_DIR fi echo 'build the poi server' cd ../../src/poi-service -./rebuild_all.sh +./rebuild_all.sh "$@" cd ../../test/poi-service echo 'build the poi client' @@ -27,8 +56,15 @@ rm -rf build mkdir build cd build -echo 'build with CommonAPI' -cmake -DWITH_FRANCA_DBUS_INTERFACE=ON -DWITH_DATABASE_SUPPLIER=ON -DCOMMONAPI_DBUS_TOOL_DIR=$COMMONAPI_DBUS_TOOL_DIR -DCOMMONAPI_TOOL_DIR=$COMMONAPI_TOOL_DIR -DWITH_DEBUG=ON . ../ - +echo 'build poi-client' +# Important notice: for the time being, it's just poi manager client that can be built against common api, +# so it's needed to set WITH_DBUS_INTERFACE=ON for positioning +cmake -DWITH_DATABASE_SUPPLIER=ON -DWITH_FRANCA_DBUS_INTERFACE=$franca -DWITH_DBUS_INTERFACE=ON $commonapi_tools_option -DWITH_DEBUG=$debug ../ make +cd .. + +echo 'populate the database with POIs of Paris' +./prepare -c paris + + diff --git a/test/poi-service/run_capi b/test/poi-service/run_capi new file mode 100755 index 0000000..944d2ef --- /dev/null +++ b/test/poi-service/run_capi @@ -0,0 +1,44 @@ +#!/bin/sh + +# @licence app begin@ +# SPDX-License-Identifier: MPL-2.0 +# +# \copyright Copyright (C) 2013-2014, PCA Peugeot Citroen +# +# \file run +# +# \brief This file is part of the Build System. +# +# \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: +# +# <date>, <name>, <description of change> +# +# @licence end@ + +CURDIR=$PWD + +POI_CLIENT_DIR=$CURDIR +POI_CLIENT_BIN_DIR=$POI_CLIENT_DIR/bin +POI_SERVER_DIR=$CURDIR/../../src/poi-service +POI_SERVER_BIN_DIR=$POI_SERVER_DIR/bin + +cp $POI_CLIENT_DIR/resource/commonapi-dbus.ini $HOME +export COMMONAPI_DBUS_DEFAULT_CONFIG=$HOME/commonapi-dbus.ini +cp $POI_SERVER_DIR/resource/poi-database-managed.db $POI_SERVER_BIN_DIR/bin + +echo '------------------------start the proof of concept------------------------' +$POI_SERVER_BIN_DIR/poi-manager-server -f $POI_SERVER_BIN_DIR/poi-database-managed.db & +$POI_CLIENT_BIN_DIR/poi-manager-client -t & + + |