summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorasanoaozora <fifitaneki@hotmail.com>2017-05-23 18:06:26 +0200
committerasanoaozora <fifitaneki@hotmail.com>2017-05-23 18:06:26 +0200
commitd74c02eaf2edf2a9911e641ab39b57f196c11fdc (patch)
tree40742d8fe588141741a06d3025a08db933147112
parent312fedf2360633e7d76f9a70a17c5d4961964e34 (diff)
downloadpoi-service-d74c02eaf2edf2a9911e641ab39b57f196c11fdc.tar.gz
refine organization of test scripts
-rwxr-xr-xsrc/navigation/clone_and_build.sh2
-rwxr-xr-xsrc/navigation/update_navit.sh22
-rw-r--r--test/navigation/Makefile53
-rw-r--r--test/navigation/README.md11
-rw-r--r--test/navigation/bustle.mk57
-rw-r--r--test/navigation/log/guidance.pdf (renamed from test/navigation/guidance.pdf)bin28432 -> 28432 bytes
-rw-r--r--test/navigation/log/location-input.pdf (renamed from test/navigation/location-input.pdf)bin204661 -> 204661 bytes
-rw-r--r--test/navigation/log/map-viewer-control.pdf (renamed from test/navigation/map-viewer-control.pdf)bin51211 -> 51211 bytes
-rw-r--r--test/navigation/log/route-calculation.pdf (renamed from test/navigation/route-calculation.pdf)bin30751 -> 30751 bytes
-rw-r--r--test/navigation/patches/bustle_filter.patch138
-rw-r--r--test/navigation/resource/location.xml (renamed from test/navigation/location.xml)0
-rw-r--r--test/navigation/resource/location_tokyo.xml (renamed from test/navigation/location_tokyo.xml)0
-rw-r--r--test/navigation/resource/locations.xml (renamed from test/navigation/locations.xml)0
-rw-r--r--test/navigation/resource/route.xml (renamed from test/navigation/route.xml)0
-rw-r--r--test/navigation/resource/route_tokyo.xml (renamed from test/navigation/route_tokyo.xml)0
-rw-r--r--test/navigation/resource/routes.xml (renamed from test/navigation/routes.xml)0
-rwxr-xr-xtest/navigation/run_bustle58
-rw-r--r--test/navigation/script-capi/dltTrigger.py (renamed from test/navigation/dltTrigger.py)2
-rw-r--r--test/navigation/script-capi/lbs-api-test-capi.e4p42
-rwxr-xr-xtest/navigation/script-capi/test-address-input-capi.py (renamed from test/navigation/test-address-input-capi.py)0
-rwxr-xr-xtest/navigation/script-capi/test-all-capi12
-rwxr-xr-xtest/navigation/script-capi/test-guidance-capi.py (renamed from test/navigation/test-guidance-capi.py)0
-rwxr-xr-xtest/navigation/script-capi/test-location-input-capi.py (renamed from test/navigation/test-location-input-capi.py)0
-rwxr-xr-xtest/navigation/script-capi/test-map-viewer-control-capi.py (renamed from test/navigation/test-map-viewer-control-capi.py)0
-rwxr-xr-xtest/navigation/script-capi/test-route-calculation-capi.py (renamed from test/navigation/test-route-calculation-capi.py)0
-rw-r--r--test/navigation/script/dltTrigger.py42
-rw-r--r--test/navigation/script/lbs-api-test.e4p45
-rwxr-xr-xtest/navigation/script/test-address-input.py (renamed from test/navigation/test-address-input.py)35
-rwxr-xr-xtest/navigation/script/test-all11
-rwxr-xr-xtest/navigation/script/test-all_tokyo11
-rwxr-xr-xtest/navigation/script/test-guidance.py (renamed from test/navigation/test-guidance.py)0
-rwxr-xr-xtest/navigation/script/test-location-input.py (renamed from test/navigation/test-location-input.py)0
-rwxr-xr-xtest/navigation/script/test-map-viewer-control-single.py193
-rwxr-xr-xtest/navigation/script/test-map-viewer-control.py (renamed from test/navigation/test-map-viewer-control.py)102
-rwxr-xr-xtest/navigation/script/test-poi.py (renamed from test/navigation/test-poi.py)0
-rwxr-xr-xtest/navigation/script/test-route-calculation.py (renamed from test/navigation/test-route-calculation.py)0
-rwxr-xr-xtest/navigation/test-all11
-rwxr-xr-xtest/navigation/test-all-capi12
-rwxr-xr-xtest/navigation/test-all_tokyo11
39 files changed, 471 insertions, 399 deletions
diff --git a/src/navigation/clone_and_build.sh b/src/navigation/clone_and_build.sh
index 95ac4b3..49ed34e 100755
--- a/src/navigation/clone_and_build.sh
+++ b/src/navigation/clone_and_build.sh
@@ -2,7 +2,7 @@
build_option=""
positioning_version='9725fe1f553197042d6445997690d452a73490c0'
-navit_version='658060b86596efb270cfcd21e118a9071f5d5092'
+navit_version='1e71b5fd4c0bf5ac96e5207c51db7d17057ed798'
echo "version of positioning is: $positioning_version"
echo "version of navit is: $navit_version"
diff --git a/src/navigation/update_navit.sh b/src/navigation/update_navit.sh
new file mode 100755
index 0000000..615fb40
--- /dev/null
+++ b/src/navigation/update_navit.sh
@@ -0,0 +1,22 @@
+#!/bin/bash
+
+if [ $# -eq 0 ]
+ then
+ echo "Need navit commit version"
+ exit
+fi
+
+navit_version=$1
+
+
+rm -rf build/navit
+rm -rf navit
+
+git clone https://github.com/navit-gps/navit.git
+cd navit
+git checkout $navit_version
+patch -p0 -i ../patches/search_list_get_unique.diff
+patch -p0 -i ../patches/fsa_issue_padding.diff
+cd ../
+
+
diff --git a/test/navigation/Makefile b/test/navigation/Makefile
deleted file mode 100644
index 8297454..0000000
--- a/test/navigation/Makefile
+++ /dev/null
@@ -1,53 +0,0 @@
-# @licence app begin@
-# SPDX-License-Identifier: MPL-2.0
-#
-# \copyright Copyright (C) 2013-2014, PCA Peugeot Citroen
-#
-# \file Makefile
-#
-# \brief This file is part of the Build System.
-#
-# \author Philippe Colliot <philippe.colliot@mpsa.com>
-#
-# \version 1.
-#
-# 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:
-#
-# 19/8/2014, Philippe Colliot, creation
-#
-# @licence end@
-
-SRC_DIR=$(CURDIR)/src
-PATCH_DIR=$(CURDIR)/patches
-BIN_DIR=$(CURDIR)/bin
-
-default: help
-
-help::
- @echo "The following targets exist"
- @echo "all: Build $(ALL)"
- @echo "all2: Install all necessary dependencies and build all"
- @echo "clean: Clean up build dir"
- @echo "src-clean: Clean up all checked out sources"
-
-
-include *.mk
-
-all: $(ALL)
-
-src-clean: $(SRC_CLEAN)
-
-deps::
- sudo apt-get install $(DEPS)
-
-all2: deps all
-
-clean:
- rm -rf $(BIN_DIR)
diff --git a/test/navigation/README.md b/test/navigation/README.md
index c43cbac..d32bfe4 100644
--- a/test/navigation/README.md
+++ b/test/navigation/README.md
@@ -1,16 +1,22 @@
# Test files for Navigation
## Synopsis
These folders contain several files that allow to test the navigation.
-Some are for the GlibDBus version:
+
+The folder ./script contains the ones for the GlibDBus version:
test-location-input.py
test-address-input.py
test-map-viewer-control.py
test-guidance.py
test-route-calculation.py
test-all
-and others (*-capi.py) are for the CommonAPI version
+
+The folder ./script-capi contains the ones for the CommonAPI version
NB: For the time being, only the GlibDBus version of navigation runs well
+The folder ./resource contains the resource files (e.g. the address) used as input by the script
+
+The folder ./log contains the generated sequence charts (see below)
+
There's a mechanism to trig with DLT, so it's necessary to build some stuff before.
##How to build the trigger
@@ -30,6 +36,7 @@ First, open a new terminal and launch the navigation by entering:
./run -r
```
Unitary tests:
+(under ./script folder)
```
./test-location-input.py -l locations.xml
./test-route-calculation.py -r routes.xml
diff --git a/test/navigation/bustle.mk b/test/navigation/bustle.mk
deleted file mode 100644
index 605eac1..0000000
--- a/test/navigation/bustle.mk
+++ /dev/null
@@ -1,57 +0,0 @@
-# @licence app begin@
-# SPDX-License-Identifier: MPL-2.0
-#
-# \copyright Copyright (C) 2013-2014, PCA Peugeot Citroen
-#
-# \file bustle.mk
-#
-# \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@
-bustle_URL="https://github.com/wjt/bustle.git"
-bustle_VERSION=0a426c396ee890bbde67791dbf8d2c21b9cc6a3c
-bustle_SRC=$(SRC_DIR)/bustle
-bustle_BIN=$(BIN_DIR)/bustle
-bustle_DEPS+= gtk2.0-dev haskell-platform libghc-gtk-dev libpcap-dev language-pack-de language-pack-fr gtk2hs-buildtools libdbus-1-dev
-
-DEPS+=$(bustle_DEPS)
-ALL+=bustle
-SRC_CLEAN+=clean-bustle_SRC
-
-help::
- @echo "bustle: Build bustle with patches"
-
-clean-bustle_SRC::
- rm -rf $(SRC_DIR)/bustle_*
-
-$(bustle_SRC)/Makefile:
- git clone $(bustle_URL) $(bustle_SRC)
- cd $(bustle_SRC) && git checkout $(bustle_VERSION)
-
-$(bustle_SRC)/.patched: $(bustle_SRC)/Makefile
- patch -d $(bustle_SRC) -p1 -s <$(PATCH_DIR)/bustle_filter.patch
- touch $(bustle_SRC)/.patched
-
-$(HOME)/.cabal/packages/hackage.haskell.org/00-index.tar:
- cabal update
-
-$(bustle_BIN)/bustle: $(bustle_SRC)/.patched $(HOME)/.cabal/packages/hackage.haskell.org/00-index.tar
- cd $(bustle_SRC) && cabal install --builddir=$(bustle_BIN) && cabal build --builddir=$(bustle_BIN)
-
-bustle: $(bustle_BIN)/bustle
-
diff --git a/test/navigation/guidance.pdf b/test/navigation/log/guidance.pdf
index e846ea7..e846ea7 100644
--- a/test/navigation/guidance.pdf
+++ b/test/navigation/log/guidance.pdf
Binary files differ
diff --git a/test/navigation/location-input.pdf b/test/navigation/log/location-input.pdf
index 8dafd63..8dafd63 100644
--- a/test/navigation/location-input.pdf
+++ b/test/navigation/log/location-input.pdf
Binary files differ
diff --git a/test/navigation/map-viewer-control.pdf b/test/navigation/log/map-viewer-control.pdf
index 3576c1f..3576c1f 100644
--- a/test/navigation/map-viewer-control.pdf
+++ b/test/navigation/log/map-viewer-control.pdf
Binary files differ
diff --git a/test/navigation/route-calculation.pdf b/test/navigation/log/route-calculation.pdf
index 120c51a..120c51a 100644
--- a/test/navigation/route-calculation.pdf
+++ b/test/navigation/log/route-calculation.pdf
Binary files differ
diff --git a/test/navigation/patches/bustle_filter.patch b/test/navigation/patches/bustle_filter.patch
deleted file mode 100644
index 9208abe..0000000
--- a/test/navigation/patches/bustle_filter.patch
+++ /dev/null
@@ -1,138 +0,0 @@
-diff -cr bustle-0.4.0/c-sources/pcap-monitor.c bustle-0.4.0.work/c-sources/pcap-monitor.c
-*** bustle-0.4.0/c-sources/pcap-monitor.c Wed Jan 18 11:32:49 2012
---- bustle-0.4.0.work/c-sources/pcap-monitor.c Thu Apr 19 13:59:23 2012
-***************
-*** 20,27 ****
---- 20,31 ----
- #include "pcap-monitor.h"
-
- #include <string.h>
-+ #include <stdlib.h>
- #include <pcap/pcap.h>
-
-+ const char *filter_str;
-+ GHashTable *filter_hash;
-+
- typedef struct {
- struct timeval ts;
- GByteArray *blob;
-***************
-*** 230,235 ****
---- 234,240 ----
-
- /* The cast is necessary because libpcap is weird. */
- pcap_dump ((u_char *) td->dumper, &hdr, message->blob->data);
-+ pcap_dump_flush(td->dumper);
- g_byte_array_unref (message->blob);
- g_slice_free (Message, message);
- }
-***************
-*** 260,266 ****
- }
-
- GDBusMessage *
-! filter (
- GDBusConnection *connection,
- GDBusMessage *message,
- gboolean is_incoming,
---- 265,271 ----
- }
-
- GDBusMessage *
-! filter_ok (
- GDBusConnection *connection,
- GDBusMessage *message,
- gboolean is_incoming,
-***************
-*** 318,323 ****
---- 323,399 ----
- }
- }
-
-+ gboolean
-+ filter_match(GDBusMessage *message)
-+ {
-+ const char *method=g_strdup_printf("%s.%s",g_dbus_message_get_interface(message),g_dbus_message_get_member(message));
-+ const char *filter=filter_str;
-+ gboolean match=FALSE;
-+ while (*filter) {
-+ int flen;
-+ gboolean part_match=TRUE;
-+ if (*filter=='-') {
-+ filter++;
-+ part_match=FALSE;
-+ }
-+ flen=strcspn(filter,",");
-+ if (!strncmp(method, filter, flen))
-+ match=part_match;
-+ filter+=flen;
-+ if (*filter==',')
-+ filter++;
-+ }
-+ g_free((gpointer)method);
-+ return match;
-+ }
-+
-+ GDBusMessage *
-+ filter(
-+ GDBusConnection *connection,
-+ GDBusMessage *message,
-+ gboolean is_incoming,
-+ gpointer user_data)
-+ {
-+ char *id, *reply_id, *found;
-+ const gchar *dest;
-+ if (!filter_str)
-+ return filter_ok(connection, message, is_incoming, user_data);
-+ dest = g_dbus_message_get_destination (message);
-+ if (!is_incoming || g_strcmp0 (dest, g_dbus_connection_get_unique_name (connection)) == 0)
-+ return message;
-+ switch(g_dbus_message_get_message_type(message)) {
-+ case G_DBUS_MESSAGE_TYPE_METHOD_CALL:
-+ if (!filter_match(message)) {
-+ g_clear_object (&message);
-+ return NULL;
-+ }
-+ id=g_strdup_printf("%s:%u",g_dbus_message_get_sender(message), g_dbus_message_get_serial(message));
-+ g_hash_table_insert(filter_hash, id, id);
-+ return filter_ok(connection, message, is_incoming, user_data);
-+ case G_DBUS_MESSAGE_TYPE_SIGNAL:
-+ if (!filter_match(message)) {
-+ g_clear_object (&message);
-+ return NULL;
-+ }
-+ case G_DBUS_MESSAGE_TYPE_INVALID:
-+ return filter_ok(connection, message, is_incoming, user_data);
-+ case G_DBUS_MESSAGE_TYPE_METHOD_RETURN:
-+ case G_DBUS_MESSAGE_TYPE_ERROR:
-+ reply_id=g_strdup_printf("%s:%u",g_dbus_message_get_destination(message), g_dbus_message_get_reply_serial(message));
-+ found=g_hash_table_lookup(filter_hash, reply_id);
-+ g_free(reply_id);
-+ if (found) {
-+ g_hash_table_remove(filter_hash, found);
-+ g_free(found);
-+ return filter_ok(connection, message, is_incoming, user_data);
-+ }
-+ g_clear_object (&message);
-+ return NULL;
-+ }
-+ g_clear_object (&message);
-+ return NULL;
-+ }
-+
- static gboolean
- match_everything (
- GDBusProxy *bus,
-***************
-*** 565,570 ****
---- 641,649 ----
- const gchar *filename,
- GError **error)
- {
-+ filter_str=getenv("BUSTLE_FILTER");
-+ if (!filter_hash)
-+ filter_hash=g_hash_table_new(g_str_hash, g_str_equal);
- return g_initable_new (
- BUSTLE_TYPE_PCAP_MONITOR, NULL, error,
- "bus-type", bus_type,
-Only in bustle-0.4.0.work: dist
diff --git a/test/navigation/location.xml b/test/navigation/resource/location.xml
index 6baddc7..6baddc7 100644
--- a/test/navigation/location.xml
+++ b/test/navigation/resource/location.xml
diff --git a/test/navigation/location_tokyo.xml b/test/navigation/resource/location_tokyo.xml
index 8718582..8718582 100644
--- a/test/navigation/location_tokyo.xml
+++ b/test/navigation/resource/location_tokyo.xml
diff --git a/test/navigation/locations.xml b/test/navigation/resource/locations.xml
index d86e5fc..d86e5fc 100644
--- a/test/navigation/locations.xml
+++ b/test/navigation/resource/locations.xml
diff --git a/test/navigation/route.xml b/test/navigation/resource/route.xml
index eecf596..eecf596 100644
--- a/test/navigation/route.xml
+++ b/test/navigation/resource/route.xml
diff --git a/test/navigation/route_tokyo.xml b/test/navigation/resource/route_tokyo.xml
index 439c2bc..439c2bc 100644
--- a/test/navigation/route_tokyo.xml
+++ b/test/navigation/resource/route_tokyo.xml
diff --git a/test/navigation/routes.xml b/test/navigation/resource/routes.xml
index aceb343..aceb343 100644
--- a/test/navigation/routes.xml
+++ b/test/navigation/resource/routes.xml
diff --git a/test/navigation/run_bustle b/test/navigation/run_bustle
deleted file mode 100755
index 155f0ff..0000000
--- a/test/navigation/run_bustle
+++ /dev/null
@@ -1,58 +0,0 @@
-#! /bin/sh
-
-# @licence app begin@
-# SPDX-License-Identifier: MPL-2.0
-#
-# \copyright Copyright (C) 2013-2014, PCA Peugeot Citroen
-#
-# \file run-bustle
-#
-# \brief This file is part of the test tool.
-#
-# \author Martin Schaller <martin.schaller@it-schaller.de>
-#
-# \version 1.1
-#
-# 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:
-#
-# 19/8/2014, Philippe Colliot, update for the OSS migration
-#
-# @licence end@
-
-if [ -z "$1" ]
-then
- cat <<EOT >&2
-Usage:
- $0 filter_expr
-
- filter_expr is a comma separated list of methods/signals to filter, with a prefix of '-' to exclude a method/signal
-Examples:
- # Only get methods/signals starting with org.genivi.
- $0 org.genivi.
-
- # Like above, but exclude positioning
- $0 org.genivi.,-org.genivi.positioning
-
- # Like above, but exclude positioning and mapmatching
- $0 org.genivi.,-org.genivi.positioning.,-org.genivi.navigationcore.MapMatchedPosition.
-
- #Like above, but include GetPosition of mapmatching
- $0 org.genivi.,-org.genivi.positioning.,-org.genivi.navigationcore.MapMatchedPosition.,org.genivi.navigationcore.MapMatchedPosition.GetPosition
-
-EOT
- exit 1
-fi
-
-if [ ! -f ./bin/bustle/build/bustle/bustle ]
-then
- echo "Build bustle first: make bustle"
-fi
-export BUSTLE_FILTER=$1
-exec ./bin/bustle/build/bustle/bustle \ No newline at end of file
diff --git a/test/navigation/dltTrigger.py b/test/navigation/script-capi/dltTrigger.py
index 4a11cd8..efba2d7 100644
--- a/test/navigation/dltTrigger.py
+++ b/test/navigation/script-capi/dltTrigger.py
@@ -28,7 +28,7 @@
import subprocess,os
from subprocess import call
-PATH_TEST_TRIGGER='./dlt-triggers/bin/'
+PATH_TEST_TRIGGER='../dlt-triggers/bin/'
def startTrigger(name):
FNULL = open(os.devnull,'w')
diff --git a/test/navigation/script-capi/lbs-api-test-capi.e4p b/test/navigation/script-capi/lbs-api-test-capi.e4p
new file mode 100644
index 0000000..8c4ecbe
--- /dev/null
+++ b/test/navigation/script-capi/lbs-api-test-capi.e4p
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE Project SYSTEM "Project-5.1.dtd">
+<!-- eric project file for project lbs-api-test-capi -->
+<!-- Saved: 2017-05-23, 16:26:37 -->
+<!-- Copyright (C) 2017 asanoaozora, -->
+<Project version="5.1">
+ <Language>en_US</Language>
+ <Hash>e44c04c1fa99fe4793858e9c2686862186b21e94</Hash>
+ <ProgLanguage mixed="0">Python3</ProgLanguage>
+ <ProjectType>PyQt5</ProjectType>
+ <Description></Description>
+ <Version>0.1</Version>
+ <Author>asanoaozora</Author>
+ <Email></Email>
+ <Sources>
+ <Source>test-guidance-capi.py</Source>
+ <Source>test-map-viewer-control-capi.py</Source>
+ <Source>test-address-input-capi.py</Source>
+ <Source>test-location-input-capi.py</Source>
+ <Source>test-route-calculation-capi.py</Source>
+ <Source>__init__.py</Source>
+ </Sources>
+ <Forms/>
+ <Translations/>
+ <Resources/>
+ <Interfaces/>
+ <Others/>
+ <Vcs>
+ <VcsType>None</VcsType>
+ </Vcs>
+ <FiletypeAssociations>
+ <FiletypeAssociation pattern="*.idl" type="INTERFACES"/>
+ <FiletypeAssociation pattern="*.py" type="SOURCES"/>
+ <FiletypeAssociation pattern="*.py3" type="SOURCES"/>
+ <FiletypeAssociation pattern="*.pyw" type="SOURCES"/>
+ <FiletypeAssociation pattern="*.pyw3" type="SOURCES"/>
+ <FiletypeAssociation pattern="*.qm" type="TRANSLATIONS"/>
+ <FiletypeAssociation pattern="*.qrc" type="RESOURCES"/>
+ <FiletypeAssociation pattern="*.ts" type="TRANSLATIONS"/>
+ <FiletypeAssociation pattern="*.ui" type="FORMS"/>
+ </FiletypeAssociations>
+</Project>
diff --git a/test/navigation/test-address-input-capi.py b/test/navigation/script-capi/test-address-input-capi.py
index 0d538e6..0d538e6 100755
--- a/test/navigation/test-address-input-capi.py
+++ b/test/navigation/script-capi/test-address-input-capi.py
diff --git a/test/navigation/script-capi/test-all-capi b/test/navigation/script-capi/test-all-capi
new file mode 100755
index 0000000..b464713
--- /dev/null
+++ b/test/navigation/script-capi/test-all-capi
@@ -0,0 +1,12 @@
+#!/bin/bash
+
+./test-location-input-capi.py -l ../resource/locations.xml
+sleep 2
+./test-route-calculation-capi.py -r ../resource/routes.xml
+sleep 2
+./test-address-input-capi.py -l ../resource/location.xml
+sleep 2
+./test-guidance-capi.py -r ../resource/route.xml
+sleep 2
+./test-map-viewer-control-capi.py ../resource/location.xml
+
diff --git a/test/navigation/test-guidance-capi.py b/test/navigation/script-capi/test-guidance-capi.py
index 3e10065..3e10065 100755
--- a/test/navigation/test-guidance-capi.py
+++ b/test/navigation/script-capi/test-guidance-capi.py
diff --git a/test/navigation/test-location-input-capi.py b/test/navigation/script-capi/test-location-input-capi.py
index 74fd841..74fd841 100755
--- a/test/navigation/test-location-input-capi.py
+++ b/test/navigation/script-capi/test-location-input-capi.py
diff --git a/test/navigation/test-map-viewer-control-capi.py b/test/navigation/script-capi/test-map-viewer-control-capi.py
index 47da06d..47da06d 100755
--- a/test/navigation/test-map-viewer-control-capi.py
+++ b/test/navigation/script-capi/test-map-viewer-control-capi.py
diff --git a/test/navigation/test-route-calculation-capi.py b/test/navigation/script-capi/test-route-calculation-capi.py
index 1c44d10..1c44d10 100755
--- a/test/navigation/test-route-calculation-capi.py
+++ b/test/navigation/script-capi/test-route-calculation-capi.py
diff --git a/test/navigation/script/dltTrigger.py b/test/navigation/script/dltTrigger.py
new file mode 100644
index 0000000..efba2d7
--- /dev/null
+++ b/test/navigation/script/dltTrigger.py
@@ -0,0 +1,42 @@
+#!/usr/bin/python
+
+"""
+**************************************************************************
+* @licence app begin@
+* SPDX-License-Identifier: MPL-2.0
+*
+* \copyright Copyright (C) 201, PSA GROUPE
+*
+* \file dlt-trigger.py
+*
+* \brief This script is part of the FSA scenario.
+*
+* \author Philippe Colliot <philippe.colliot@mpsa.com>
+*
+* \version 1.0
+*
+* This Source Code Form is subject to the terms of the
+* Mozilla Public License, 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/.
+
+* List of changes:
+*
+* @licence end@
+
+**************************************************************************
+"""
+import subprocess,os
+from subprocess import call
+
+PATH_TEST_TRIGGER='../dlt-triggers/bin/'
+
+def startTrigger(name):
+ FNULL = open(os.devnull,'w')
+ test_trigger=PATH_TEST_TRIGGER + 'test-trigger'
+ call([test_trigger, "1", name])
+
+def stopTrigger(name):
+ FNULL = open(os.devnull,'w')
+ test_trigger=PATH_TEST_TRIGGER + 'test-trigger'
+ call([test_trigger, "0", name])
+
diff --git a/test/navigation/script/lbs-api-test.e4p b/test/navigation/script/lbs-api-test.e4p
new file mode 100644
index 0000000..d909056
--- /dev/null
+++ b/test/navigation/script/lbs-api-test.e4p
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE Project SYSTEM "Project-5.1.dtd">
+<!-- eric project file for project lbs-api-test -->
+<!-- Saved: 2017-05-23, 15:56:05 -->
+<!-- Copyright (C) 2017 asanoaozora, -->
+<Project version="5.1">
+ <Language>en_US</Language>
+ <Hash>7f8a1c646125ed1d62f8723612a19e7cdc944025</Hash>
+ <ProgLanguage mixed="0">Python3</ProgLanguage>
+ <ProjectType>PyQt5</ProjectType>
+ <Description></Description>
+ <Version>0.1</Version>
+ <Author>asanoaozora</Author>
+ <Email></Email>
+ <Sources>
+ <Source>__init__.py</Source>
+ <Source>dltTrigger.py</Source>
+ <Source>test-poi.py</Source>
+ <Source>test-guidance.py</Source>
+ <Source>test-address-input.py</Source>
+ <Source>test-map-viewer-control.py</Source>
+ <Source>test-location-input.py</Source>
+ <Source>test-map-viewer-control-single.py</Source>
+ <Source>test-route-calculation.py</Source>
+ </Sources>
+ <Forms/>
+ <Translations/>
+ <Resources/>
+ <Interfaces/>
+ <Others/>
+ <Vcs>
+ <VcsType>None</VcsType>
+ </Vcs>
+ <FiletypeAssociations>
+ <FiletypeAssociation pattern="*.idl" type="INTERFACES"/>
+ <FiletypeAssociation pattern="*.py" type="SOURCES"/>
+ <FiletypeAssociation pattern="*.py3" type="SOURCES"/>
+ <FiletypeAssociation pattern="*.pyw" type="SOURCES"/>
+ <FiletypeAssociation pattern="*.pyw3" type="SOURCES"/>
+ <FiletypeAssociation pattern="*.qm" type="TRANSLATIONS"/>
+ <FiletypeAssociation pattern="*.qrc" type="RESOURCES"/>
+ <FiletypeAssociation pattern="*.ts" type="TRANSLATIONS"/>
+ <FiletypeAssociation pattern="*.ui" type="FORMS"/>
+ </FiletypeAssociations>
+</Project>
diff --git a/test/navigation/test-address-input.py b/test/navigation/script/test-address-input.py
index e9ab02a..a9b6ce6 100755
--- a/test/navigation/test-address-input.py
+++ b/test/navigation/script/test-address-input.py
@@ -69,9 +69,9 @@ HOUSE_NUMBER_STRING = list()
# Default size of the list
WINDOW_SIZE = 20
-print '\n--------------------------\n' + \
+print('\n--------------------------\n' + \
'LocationInput Test' + \
- '\n--------------------------\n'
+ '\n--------------------------\n')
parser = argparse.ArgumentParser(description='Location input Test for navigation PoC and FSA.')
parser.add_argument('-l','--loc',action='store', dest='locations', help='List of locations in xml format')
@@ -213,39 +213,39 @@ def full_string_search(handle, search_string):
def evaluate_address(address, guidable):
test_passed = 0
- print '\nAddress complete!\nEvaluating...'
+ print('\nAddress complete!\nEvaluating...')
if COUNTRY_STRING[current_address_index] == '':
test_passed = 1
elif address[COUNTRY][1] == COUNTRY_STRING[current_address_index]:
- print 'Country\t\t\t-> ok (' + address[COUNTRY][1] + ')'
+ print ('Country\t\t\t-> ok (' + address[COUNTRY][1] + ')')
if CITY_STRING[current_address_index] == '':
test_passed = 1
elif address[CITY][1] == CITY_STRING[current_address_index]:
- print 'City\t\t\t-> ok (' + address[CITY][1] + ')'
+ print ('City\t\t\t-> ok (' + address[CITY][1] + ')')
if STREET_STRING[current_address_index] == '':
test_passed = 1
elif address[STREET][1] == STREET_STRING[current_address_index]:
- print 'Street\t\t\t-> ok (' + address[STREET][1] + ')'
+ print ('Street\t\t\t-> ok (' + address[STREET][1] + ')')
if HOUSE_NUMBER_STRING[current_address_index] == '':
test_passed = 1
elif address[HOUSE_NUMBER][1] == HOUSE_NUMBER_STRING[current_address_index]:
- print 'House number\t-> ok (' + address[HOUSE_NUMBER][1] + ')'
+ print ('House number\t-> ok (' + address[HOUSE_NUMBER][1] + ')')
test_passed = 1
if guidable == 1:
if test_passed == 1:
- print 'TEST PASSED'
+ print ('TEST PASSED')
else:
- print 'TEST FAILED (wrong address)'
+ print('TEST FAILED (wrong address)')
exit()
else:
- print 'TEST FAILED (non-guidable address)'
+ print ('TEST FAILED (non-guidable address)')
exit()
address_index = current_address_index + 1
if address_index < len(COUNTRY_STRING):
startSearch(address_index)
else:
- print 'END OF THE TEST'
+ print ('END OF THE TEST')
exit()
@@ -321,7 +321,7 @@ def search_result_list_handler(handle, total_size, window_offset, window_size, r
'\' (Session '+str(int(session_handle)) + ' LocationInputHandle ' + str(int(handle))+')')
location_input_interface.SelectEntry(dbus.UInt32(session_handle), dbus.UInt32(handle), dbus.UInt16(0))
else:
- print '\nTEST FAILED (Unexpected single result list)'
+ print ('\nTEST FAILED (Unexpected single result list)')
exit()
elif spell_next_character == 1:
spell_next_character = 0
@@ -344,8 +344,8 @@ bus.add_signal_receiver(content_updated_handler,
# Timeout
def timeout():
- print 'Timeout Expired'
- print '\nTEST FAILED\n'
+ print ('Timeout Expired')
+ print ('\nTEST FAILED\n')
exit()
# Exit
@@ -363,6 +363,7 @@ def startSearch(address_index):
global available_characters
global target_search_string
global current_address_index
+ global entered_search_string
current_address_index = address_index
entered_search_string = ''
found_exact_match = 0
@@ -380,7 +381,7 @@ session_interface = dbus.Interface(session, dbus_interface='org.genivi.navigatio
# Get SessionHandle
ret = session_interface.CreateSession(dbus.String('test location input'))
session_handle=ret[1]
-print 'Session handle = ' + str(session_handle)
+print ('Session handle = ' + str(session_handle))
location_input_obj = bus.get_object('org.genivi.navigation.navigationcore.LocationInput', '/org/genivi/navigationcore')
location_input_interface = dbus.Interface(location_input_obj, dbus_interface='org.genivi.navigation.navigationcore.LocationInput')
@@ -388,10 +389,10 @@ location_input_interface = dbus.Interface(location_input_obj, dbus_interface='or
# Get LocationInputHandle
ret = location_input_interface.CreateLocationInput(dbus.UInt32(session_handle))
location_input_handle = ret[1]
-print 'LocationInput handle = ' + str(location_input_handle)
+print ('LocationInput handle = ' + str(location_input_handle))
attributes = location_input_interface.GetSupportedAddressAttributes()
-print 'Initially supported address attributes = ' + selection_criteria_array_to_string(attributes)
+print ('Initially supported address attributes = ' + selection_criteria_array_to_string(attributes))
# Configuration
current_address_index = 0
diff --git a/test/navigation/script/test-all b/test/navigation/script/test-all
new file mode 100755
index 0000000..f2c8dfa
--- /dev/null
+++ b/test/navigation/script/test-all
@@ -0,0 +1,11 @@
+#!/bin/bash
+
+./test-location-input.py -l ../resource/locations.xml
+sleep 2
+./test-route-calculation.py -r ../resource/routes.xml
+sleep 2
+./test-address-input.py -l ../resource/location.xml
+sleep 2
+./test-guidance.py -r ../resource/route.xml
+sleep 2
+./test-map-viewer-control.py -l ../resource/location.xml
diff --git a/test/navigation/script/test-all_tokyo b/test/navigation/script/test-all_tokyo
new file mode 100755
index 0000000..d66e5a7
--- /dev/null
+++ b/test/navigation/script/test-all_tokyo
@@ -0,0 +1,11 @@
+#!/bin/bash
+
+./test-location-input.py -l ../resource/location_tokyo.xml
+sleep 2
+./test-route-calculation.py -r ../resource/route_tokyo.xml
+sleep 2
+./test-address-input.py -l ../resource/location_tokyo.xml
+sleep 2
+./test-guidance.py -r ../resource/route_tokyo.xml
+sleep 2
+./test-map-viewer-control.py -l ../resource/location_tokyo.xml
diff --git a/test/navigation/test-guidance.py b/test/navigation/script/test-guidance.py
index be44295..be44295 100755
--- a/test/navigation/test-guidance.py
+++ b/test/navigation/script/test-guidance.py
diff --git a/test/navigation/test-location-input.py b/test/navigation/script/test-location-input.py
index 935c1f9..935c1f9 100755
--- a/test/navigation/test-location-input.py
+++ b/test/navigation/script/test-location-input.py
diff --git a/test/navigation/script/test-map-viewer-control-single.py b/test/navigation/script/test-map-viewer-control-single.py
new file mode 100755
index 0000000..e7975d6
--- /dev/null
+++ b/test/navigation/script/test-map-viewer-control-single.py
@@ -0,0 +1,193 @@
+#!/usr/bin/python
+
+"""
+**************************************************************************
+* @licence app begin@
+* SPDX-License-Identifier: MPL-2.0
+*
+* \copyright Copyright (C) 2015, Mentor Graphics
+*
+* \file test-map-viewer-control.py
+*
+* \brief This simple test shows how the mapviewer
+* could be easily tested using a python script
+*
+* \author Marco Residori <marco.residori@mentor_graphics.com>
+* \author Philippe Colliot <philippe.colliot@mpsa.com>
+*
+* \version 1.1
+*
+* This Source Code Form is subject to the terms of the
+* Mozilla Public License, 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/.
+* List of changes:
+* 04-02-2016, Philippe Colliot, Update to the new API ('i' for enumerations and 'yv' for variants), add some methods
+*
+* @licence end@
+**************************************************************************
+"""
+
+import dbus
+import gobject
+import dbus.mainloop.glib
+import time
+from dltTrigger import *
+#import pdb; pdb.set_trace()
+
+#name of the test
+test_name = "map viewer"
+
+#constants as defined in the Navigation API
+LATITUDE = 0x00a0
+LONGITUDE = 0x00a1
+
+MAIN_MAP = 0x0010
+SPLIT_SCREEN = 0x0011
+
+#constants used by the script
+HORIZONTAL_SIZE = 800
+VERTICAL_SIZE = 480
+TIME_OUT = 20000
+MIN_SCALE = 0
+MAX_SCALE = 21
+
+def mapviewer_mapViewScaleChanged_handler(mapViewInstanceHandle,scale,isMinMax):
+ global g_scale
+ new_scale=int(scale)
+ print("Scale: "+str(new_scale))
+ print('Is min max: '+str(int(isMinMax)))
+ time.sleep(0.25)
+ if g_scale > new_scale and new_scale !=MIN_SCALE:
+ print("Zoom in")
+ g_scale=new_scale
+ MapViewerControl_interface.SetMapViewScaleByDelta( \
+ dbus.UInt32(sessionhandle), \
+ dbus.UInt32(mapviewerhandle), \
+ dbus.Int16(1))
+ else:
+ if new_scale < MAX_SCALE:
+ print("Zoom out")
+ g_scale=new_scale
+ MapViewerControl_interface.SetMapViewScaleByDelta( \
+ dbus.UInt32(sessionhandle), \
+ dbus.UInt32(mapviewerhandle), \
+ dbus.Int16(-1))
+ else:
+ print 'Test PASSED'
+ MapViewerControl_interface.ReleaseMapViewInstance( \
+ dbus.UInt32(sessionhandle), \
+ dbus.UInt32(mapviewerhandle))
+ session_interface.DeleteSession(sessionhandle)
+ exit()
+
+#timeout
+def timeout():
+ print 'Timeout Expired'
+ print '\nTest FAILED'
+ exit()
+
+def exit():
+ stopTrigger(test_name)
+ loop.quit()
+
+print '\n--------------------------'
+print 'MapViewerControl Test'
+print '--------------------------\n'
+
+if __name__ == '__main__':
+ dbus.mainloop.glib.DBusGMainLoop(set_as_default=True)
+
+
+#connect to session bus
+bus = dbus.SessionBus()
+
+bus.add_signal_receiver(mapviewer_mapViewScaleChanged_handler, \
+ dbus_interface = "org.genivi.navigation.mapviewer.MapViewerControl", \
+ signal_name = "MapViewScaleChanged")
+
+
+startTrigger(test_name)
+
+session = bus.get_object('org.genivi.navigation.mapviewer.Session','/org/genivi/mapviewer')
+session_interface = dbus.Interface(session, dbus_interface='org.genivi.navigation.mapviewer.Session')
+
+#get session handle
+ret = session_interface.CreateSession(dbus.String("test mapviewer"))
+sessionhandle=ret[1]
+print 'Session handle: ' + str(sessionhandle)
+
+sessionstatus = session_interface.GetSessionStatus(dbus.UInt32(sessionhandle));
+print 'Session status: ' + str(sessionstatus)
+
+sessionlist = session_interface.GetAllSessions();
+print 'Active sessions = ' + str(len(sessionlist))
+
+MapViewerControl_obj = bus.get_object('org.genivi.navigation.mapviewer.MapViewerControl','/org/genivi/mapviewer')
+MapViewerControl_interface = dbus.Interface(MapViewerControl_obj, dbus_interface='org.genivi.navigation.mapviewer.MapViewerControl')
+
+#get mapviewer handle
+ret = MapViewerControl_interface.CreateMapViewInstance( \
+ dbus.UInt32(sessionhandle), \
+ dbus.Struct((dbus.UInt16(HORIZONTAL_SIZE),dbus.UInt16(VERTICAL_SIZE))), \
+ dbus.Int32(MAIN_MAP))
+mapviewerhandle=ret[1]
+
+print 'MapView handle: ' + str(mapviewerhandle)
+
+# Tokyo
+lat1 = 35.70
+lon1 = 139.74
+alt1 = 0
+
+time.sleep(2)
+
+print 'Stop following the car position'
+MapViewerControl_interface.SetFollowCarMode( \
+ dbus.UInt32(sessionhandle), \
+ dbus.UInt32(mapviewerhandle), \
+ dbus.Boolean(False))
+
+print 'Set center in Tokyo(' + str(lat1) + ',' + str(lon1) + ')'
+MapViewerControl_interface.SetTargetPoint( \
+ dbus.UInt32(sessionhandle), \
+ dbus.UInt32(mapviewerhandle), \
+ dbus.Struct((dbus.Double(lat1),dbus.Double(lon1),dbus.Double(alt1))))
+
+# Get current position
+targetPoint = MapViewerControl_interface.GetTargetPoint( \
+ dbus.UInt32(mapviewerhandle) )
+
+lat2 = targetPoint[0]
+lon2 = targetPoint[1]
+alt2 = targetPoint[2]
+
+print 'Get center -> (' + str(lat2) + ',' + str(lon2) + ')'
+
+if round(lat1,4) != round(lat2,4) :
+ print '\nTest Failed:' + str(round(lat1,4)) + '!=' + str(round(lat2,4)) + '\n'
+
+if round(lon1,4) != round(lon2,4) :
+ print '\nTest Failed:' + str(round(lon1,4)) + '!=' + str(round(lon2,4)) + '\n'
+
+if round(alt1,4) != round(alt2,4) :
+ print '\nTest Failed:' + str(round(alt1,4)) + '!=' + str(round(alt2,4)) + '\n'
+
+ret=MapViewerControl_interface.GetMapViewScale(dbus.UInt32(mapviewerhandle))
+print('Scale: '+str(int(ret[0])))
+print('Is min max: '+str(int(ret[1])))
+
+g_scale=int(ret[0])
+
+print 'Zoom in'
+MapViewerControl_interface.SetMapViewScaleByDelta( \
+ dbus.UInt32(sessionhandle), \
+ dbus.UInt32(mapviewerhandle), \
+ dbus.Int16(1))
+
+exit()
+
+#main loop
+gobject.timeout_add(TIME_OUT, timeout)
+loop = gobject.MainLoop()
+loop.run()
+
diff --git a/test/navigation/test-map-viewer-control.py b/test/navigation/script/test-map-viewer-control.py
index 253b2f4..5cc5515 100755
--- a/test/navigation/test-map-viewer-control.py
+++ b/test/navigation/script/test-map-viewer-control.py
@@ -55,6 +55,10 @@ SPLIT_SCREEN = 0x0011
HORIZONTAL_SIZE = 800
VERTICAL_SIZE = 480
TIME_OUT = 20000
+INIT_SCALE=2
+TEST_STEP_START=0
+TEST_STEP_SCALE=1
+TEST_STEP_ROTATE=2
# List of coordinates
LATITUDE = list()
@@ -67,46 +71,71 @@ HOUSE_NUMBER_STRING = list()
def mapviewer_mapViewScaleChanged_handler(mapViewInstanceHandle,scale,isMinMax):
global g_scale
+ global step
new_scale=int(scale)
print("Scale: "+str(new_scale))
print('Is min max: '+str(int(isMinMax)))
- time.sleep(0.25)
- if g_scale > new_scale and isMinMax !=MAPVIEWER_MIN:
- print("Zoom in")
- g_scale=new_scale
- MapViewerControl_interface.SetMapViewScaleByDelta( \
- dbus.UInt32(sessionhandle), \
- dbus.UInt32(mapviewerhandle), \
- dbus.Int16(-1))
- else:
- if isMinMax !=MAPVIEWER_MAX:
- print("Zoom out")
+ if step ==TEST_STEP_SCALE:
+ time.sleep(0.25)
+ if g_scale > new_scale and isMinMax !=MAPVIEWER_MIN:
+ print("Zoom in")
g_scale=new_scale
MapViewerControl_interface.SetMapViewScaleByDelta( \
dbus.UInt32(sessionhandle), \
dbus.UInt32(mapviewerhandle), \
- dbus.Int16(1))
+ dbus.Int16(-1))
else:
- print 'Test PASSED'
- MapViewerControl_interface.ReleaseMapViewInstance( \
- dbus.UInt32(sessionhandle), \
- dbus.UInt32(mapviewerhandle))
- session_interface.DeleteSession(sessionhandle)
- exit()
+ if isMinMax !=MAPVIEWER_MAX:
+ print("Zoom out")
+ g_scale=new_scale
+ MapViewerControl_interface.SetMapViewScaleByDelta( \
+ dbus.UInt32(sessionhandle), \
+ dbus.UInt32(mapviewerhandle), \
+ dbus.Int16(1))
+ else:
+ print('Test scale PASSED')
+ next_step()
#timeout
def timeout():
- print 'Timeout Expired'
- print '\nTest FAILED'
+ print('Timeout Expired')
+ print ('\nTest FAILED')
exit()
+
def exit():
+ MapViewerControl_interface.ReleaseMapViewInstance( \
+ dbus.UInt32(sessionhandle), \
+ dbus.UInt32(mapviewerhandle))
+ session_interface.DeleteSession(sessionhandle)
stopTrigger(test_name)
loop.quit()
-print '\n--------------------------'
-print 'MapViewerControl Test'
-print '--------------------------\n'
+def next_step():
+ global step
+ if step == TEST_STEP_START:
+ step=TEST_STEP_SCALE
+ print ('Test scale')
+ MapViewerControl_interface.SetMapViewScale( \
+ dbus.UInt32(sessionhandle), \
+ dbus.UInt32(mapviewerhandle), \
+ dbus.UInt16(INIT_SCALE))
+ else:
+ if step ==TEST_STEP_SCALE:
+ step=TEST_STEP_ROTATE
+ print ('Test rotate')
+ MapViewerControl_interface.SetMapViewScale( \
+ dbus.UInt32(sessionhandle), \
+ dbus.UInt32(mapviewerhandle), \
+ dbus.UInt16(INIT_SCALE))
+ exit()
+ else:
+ if step ==TEST_STEP_ROTATE:
+ exit()
+
+print('\n--------------------------')
+print('MapViewerControl Test')
+print('--------------------------\n')
parser = argparse.ArgumentParser(description='Map Viewer Test for navigation PoC and FSA.')
parser.add_argument('-l','--loc',action='store', dest='locations', help='List of locations in xml format')
@@ -158,13 +187,13 @@ session_interface = dbus.Interface(session, dbus_interface='org.genivi.navigatio
#get session handle
ret = session_interface.CreateSession(dbus.String("test mapviewer"))
sessionhandle=ret[1]
-print 'Session handle: ' + str(sessionhandle)
+print('Session handle: ' + str(sessionhandle))
sessionstatus = session_interface.GetSessionStatus(dbus.UInt32(sessionhandle));
-print 'Session status: ' + str(sessionstatus)
+print ('Session status: ' + str(sessionstatus))
sessionlist = session_interface.GetAllSessions();
-print 'Active sessions = ' + str(len(sessionlist))
+print( 'Active sessions = ' + str(len(sessionlist)))
MapViewerControl_obj = bus.get_object('org.genivi.navigation.mapviewer.MapViewerControl','/org/genivi/mapviewer')
MapViewerControl_interface = dbus.Interface(MapViewerControl_obj, dbus_interface='org.genivi.navigation.mapviewer.MapViewerControl')
@@ -176,7 +205,7 @@ ret = MapViewerControl_interface.CreateMapViewInstance( \
dbus.Int32(MAIN_MAP))
mapviewerhandle=ret[1]
-print 'MapView handle: ' + str(mapviewerhandle)
+print('MapView handle: ' + str(mapviewerhandle))
index=0
@@ -186,13 +215,13 @@ alt1 = ALTITUDE[index]
time.sleep(2)
-print 'Stop following the car position'
+print ('Stop following the car position')
MapViewerControl_interface.SetFollowCarMode( \
dbus.UInt32(sessionhandle), \
dbus.UInt32(mapviewerhandle), \
dbus.Boolean(False))
-print 'Set center in '+ CITY_STRING[index]+ ' (' + str(lat1) + ',' + str(lon1) + ')'
+print('Set center in '+ CITY_STRING[index]+ ' (' + str(lat1) + ',' + str(lon1) + ')')
MapViewerControl_interface.SetTargetPoint( \
dbus.UInt32(sessionhandle), \
dbus.UInt32(mapviewerhandle), \
@@ -206,16 +235,16 @@ lat2 = targetPoint[0]
lon2 = targetPoint[1]
alt2 = targetPoint[2]
-print 'Get center -> (' + str(lat2) + ',' + str(lon2) + ')'
+print ('Get center -> (' + str(lat2) + ',' + str(lon2) + ')' )
if round(float(lat1),4) != round(float(lat2),4) :
- print '\nTest Failed:' + str(round(float(lat1),4)) + '!=' + str(round(float(lat2),4)) + '\n'
+ print ('\nTest Failed:' + str(round(float(lat1),4)) + '!=' + str(round(float(lat2),4)) + '\n' )
if round(float(lon1),4) != round(float(lon2),4) :
- print '\nTest Failed:' + str(round(float(lon1),4)) + '!=' + str(round(float(lon2),4)) + '\n'
+ print('\nTest Failed:' + str(round(float(lon1),4)) + '!=' + str(round(float(lon2),4)) + '\n' )
if round(float(alt1),4) != round(float(alt2),4) :
- print '\nTest Failed:' + str(round(float(alt1),4)) + '!=' + str(round(float(alt2),4)) + '\n'
+ print('\nTest Failed:' + str(round(float(alt1),4)) + '!=' + str(round(float(alt2),4)) + '\n')
ret=MapViewerControl_interface.GetMapViewScale(dbus.UInt32(mapviewerhandle))
print('Scale: '+str(int(ret[0])))
@@ -223,11 +252,8 @@ print('Is min max: '+str(int(ret[1])))
g_scale=int(ret[0])
-print 'Zoom in'
-MapViewerControl_interface.SetMapViewScaleByDelta( \
- dbus.UInt32(sessionhandle), \
- dbus.UInt32(mapviewerhandle), \
- dbus.Int16(-1))
+step=TEST_STEP_START
+next_step()
#main loop
gobject.timeout_add(TIME_OUT, timeout)
diff --git a/test/navigation/test-poi.py b/test/navigation/script/test-poi.py
index a4b48c7..a4b48c7 100755
--- a/test/navigation/test-poi.py
+++ b/test/navigation/script/test-poi.py
diff --git a/test/navigation/test-route-calculation.py b/test/navigation/script/test-route-calculation.py
index f0a5221..f0a5221 100755
--- a/test/navigation/test-route-calculation.py
+++ b/test/navigation/script/test-route-calculation.py
diff --git a/test/navigation/test-all b/test/navigation/test-all
deleted file mode 100755
index d2810d7..0000000
--- a/test/navigation/test-all
+++ /dev/null
@@ -1,11 +0,0 @@
-#!/bin/bash
-
-./test-location-input.py -l locations.xml
-sleep 2
-./test-route-calculation.py -r routes.xml
-sleep 2
-./test-address-input.py -l location.xml
-sleep 2
-./test-guidance.py -r route.xml
-sleep 2
-./test-map-viewer-control.py -l location.xml
diff --git a/test/navigation/test-all-capi b/test/navigation/test-all-capi
deleted file mode 100755
index 3e021c8..0000000
--- a/test/navigation/test-all-capi
+++ /dev/null
@@ -1,12 +0,0 @@
-#!/bin/bash
-
-./test-location-input-capi.py -l locations.xml
-sleep 2
-./test-route-calculation-capi.py -r routes.xml
-sleep 2
-./test-address-input-capi.py -l location.xml
-sleep 2
-./test-guidance-capi.py -r route.xml
-sleep 2
-./test-map-viewer-control-capi.py
-
diff --git a/test/navigation/test-all_tokyo b/test/navigation/test-all_tokyo
deleted file mode 100755
index 1dce7b4..0000000
--- a/test/navigation/test-all_tokyo
+++ /dev/null
@@ -1,11 +0,0 @@
-#!/bin/bash
-
-./test-location-input.py -l location_tokyo.xml
-sleep 2
-./test-route-calculation.py -r route_tokyo.xml
-sleep 2
-./test-address-input.py -l location_tokyo.xml
-sleep 2
-./test-guidance.py -r route_tokyo.xml
-sleep 2
-./test-map-viewer-control.py -l location_tokyo.xml