Skip to content

Commit

Permalink
Back to Monaco for examples and benchmarks
Browse files Browse the repository at this point in the history
  • Loading branch information
daniel-j-h committed Mar 21, 2017
1 parent 74df7ad commit cfa4e5f
Show file tree
Hide file tree
Showing 7 changed files with 120 additions and 75 deletions.
6 changes: 2 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,7 @@ matrix:
apt:
sources: ['ubuntu-toolchain-r-test']
packages: ['g++-6', 'libbz2-dev', 'libstxxl-dev', 'libstxxl1', 'libxml2-dev', 'libzip-dev', 'lua5.1', 'liblua5.1-0-dev', 'libtbb-dev', 'libgdal-dev', 'libluabind-dev', 'libboost-all-dev']
# Disabled sanitizer since the build was too slow. We need to downgrade our tets dataset from Berlin to Monaco again.
#env: CCOMPILER='gcc-6' CXXCOMPILER='g++-6' BUILD_TYPE='Debug' TARGET_ARCH='x86_64-asan' ENABLE_COVERAGE=ON ENABLE_SANITIZER=ON
env: CCOMPILER='gcc-6' CXXCOMPILER='g++-6' BUILD_TYPE='Debug' TARGET_ARCH='x86_64-asan' ENABLE_COVERAGE=ON ENABLE_SANITIZER=OFF
env: CCOMPILER='gcc-6' CXXCOMPILER='g++-6' BUILD_TYPE='Debug' TARGET_ARCH='x86_64-asan' ENABLE_COVERAGE=ON ENABLE_SANITIZER=ON

- os: linux
compiler: "clang-4.0-debug"
Expand Down Expand Up @@ -197,7 +195,7 @@ install:
script:
- if [[ $TARGET_ARCH == armhf ]] ; then echo "Skip tests for $TARGET_ARCH" && exit 0 ; fi
- make -C test/data benchmark
- ./example/build/osrm-example test/data/ch/berlin.osrm
- ./example/build/osrm-example test/data/monaco.osrm
# All tests assume to be run from the build directory
- pushd ${OSRM_BUILD_DIR}
- ./unit_tests/library-tests
Expand Down
10 changes: 5 additions & 5 deletions appveyor-build.bat
Original file line number Diff line number Diff line change
Expand Up @@ -133,12 +133,12 @@ unit_tests\%Configuration%\server-tests.exe
IF %ERRORLEVEL% NEQ 0 GOTO ERROR

ECHO running library-tests.exe ...
SET test_region=berlin
SET test_region_ch=ch\berlin
SET test_region_corech=corech\berlin
SET test_region_mld=mld\berlin
SET test_region=monaco
SET test_region_ch=ch\monaco
SET test_region_corech=corech\monaco
SET test_region_mld=mld\monaco
SET test_osm=%test_region%.osm.pbf
IF NOT EXIST %test_osm% powershell Invoke-WebRequest https://s3.amazonaws.com/mapbox/osrm/testing/berlin.osm.pbf -OutFile %test_osm%
IF NOT EXIST %test_osm% powershell Invoke-WebRequest https://s3.amazonaws.com/mapbox/osrm/testing/monaco.osm.pbf -OutFile %test_osm%
%Configuration%\osrm-extract.exe -p ../profiles/car.lua %test_osm%
MKDIR ch
XCOPY %test_region%.osrm %test_region%.osrm.* ch\
Expand Down
File renamed without changes.
File renamed without changes.
8 changes: 4 additions & 4 deletions example/example.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ int main(int argc, const char *argv[])
// The following shows how to use the Route service; configure this service
RouteParameters params;

// Route in Berlin: Alexanderplatz to Hackescher Markt
params.coordinates.push_back({util::FloatLongitude{13.414307}, util::FloatLatitude{52.521835}});
params.coordinates.push_back({util::FloatLongitude{13.402290}, util::FloatLatitude{52.523728}});
// Route in monaco
params.coordinates.push_back({util::FloatLongitude{7.419758}, util::FloatLatitude{43.731142}});
params.coordinates.push_back({util::FloatLongitude{7.419505}, util::FloatLatitude{43.736825}});

// Response is in JSON format
json::Object result;
Expand All @@ -58,7 +58,7 @@ int main(int argc, const char *argv[])
const auto distance = route.values["distance"].get<json::Number>().value;
const auto duration = route.values["duration"].get<json::Number>().value;

// Warn users if extract does not contain the default Berlin coordinates from above
// Warn users if extract does not contain the default coordinates from above
if (distance == 0 || duration == 0)
{
std::cout << "Note: distance or duration is zero. ";
Expand Down
2 changes: 1 addition & 1 deletion example/example.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ var OSRM = require('..');
var path = require('path');

var app = express();
var osrm = new OSRM(path.join(__dirname,"../test/data/berlin_CH.osrm"));
var osrm = new OSRM(path.join(__dirname,"../test/data/ch/monaco.osrm"));

// Accepts a query like:
// http://localhost:8888?start=13.414307,52.521835&end=13.402290,52.523728
Expand Down
Loading

0 comments on commit cfa4e5f

Please sign in to comment.