From 9341d7b926e6833b8bbd113664582edb2d08f283 Mon Sep 17 00:00:00 2001 From: Lev Dragunov Date: Wed, 1 Apr 2015 17:34:47 +0300 Subject: [PATCH] routing index mapping in test bugfix + script to clean temporary routing indexes --- routing/routing_tests/osrm_router_test.cpp | 1 + tools/unix/clean_indexes.sh | 14 ++++++++++++++ 2 files changed, 15 insertions(+) create mode 100755 tools/unix/clean_indexes.sh diff --git a/routing/routing_tests/osrm_router_test.cpp b/routing/routing_tests/osrm_router_test.cpp index 27ee8b7ed6..5bb0d0ab14 100644 --- a/routing/routing_tests/osrm_router_test.cpp +++ b/routing/routing_tests/osrm_router_test.cpp @@ -96,6 +96,7 @@ void TestMapping(InputDataT const & data, FilesMappingContainer cont(ftSegsPath); OsrmFtSegMapping mapping; mapping.Load(cont); + mapping.Map(cont); TestNodeId(mapping, nodeIds); TestSegmentRange(mapping, ranges); diff --git a/tools/unix/clean_indexes.sh b/tools/unix/clean_indexes.sh new file mode 100755 index 0000000000..16a1bff1a2 --- /dev/null +++ b/tools/unix/clean_indexes.sh @@ -0,0 +1,14 @@ +#!/bin/bash + +set -u -x +BASE_PATH=$(pwd) +DATA_PATH=$BASE_PATH/../../../data + +COUNTRY_LIST=${COUNTRY_LIST-$(ls -1 $DATA_PATH/*.mwm)} + +if [ "$COUNTRY_LIST" ] +then + echo "$COUNTRY_LIST" | while read file ; do + rm -rf ${file%.mwm}/ + done +fi