diff --git a/.travis.yml b/.travis.yml index 38ded4a6b..062284b6a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -195,13 +195,11 @@ install: script: - if [[ $TARGET_ARCH == armhf ]] ; then echo "Skip tests for $TARGET_ARCH" && exit 0 ; fi - - echo "travis_fold:start:BENCHMARK" - make -C test/data benchmark - - echo "travis_fold:end:BENCHMARK" - ./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 ../test/data/monaco.osrm + - ./unit_tests/library-tests - ./unit_tests/extractor-tests - ./unit_tests/engine-tests - ./unit_tests/util-tests diff --git a/test/data/Makefile b/test/data/Makefile index ebd8ff5ef..d078fc562 100755 --- a/test/data/Makefile +++ b/test/data/Makefile @@ -13,40 +13,59 @@ MD5SUM:=$(SCRIPT_ROOT)/md5sum.js TIMER:=$(SCRIPT_ROOT)/timer.sh PROFILE:=$(PROFILE_ROOT)/car.lua -all: $(DATA_NAME).osrm.hsgr $(DATA_NAME).osrm.partition +all: data + +data: $(DATA_NAME)_CH.osrm.hsgr $(DATA_NAME)_CoreCH.osrm.hsgr $(DATA_NAME)_MLD.osrm.partition clean: -rm $(DATA_NAME).* + -rm $(DATA_NAME)_* $(DATA_NAME).osm.pbf: wget $(DATA_URL) -O $(DATA_NAME).osm.pbf +$(DATA_NAME)_%.osm.pbf: $(DATA_NAME).osm.pbf + cp $< $@ + $(DATA_NAME).poly: wget $(DATA_POLY_URL) -O $(DATA_NAME).poly -$(DATA_NAME).osrm: $(DATA_NAME).osm.pbf $(DATA_NAME).poly $(PROFILE) $(OSRM_EXTRACT) +$(DATA_NAME)_%.osrm: $(DATA_NAME)_%.osm.pbf $(DATA_NAME).poly $(PROFILE) $(OSRM_EXTRACT) @echo "Verifiyng data file integrity..." $(MD5SUM) -c data.md5sum @echo "Running osrm-extract..." - $(TIMER) "osrm-extract" $(OSRM_EXTRACT) $(DATA_NAME).osm.pbf -p $(PROFILE) + $(TIMER) "osrm-extract" $(OSRM_EXTRACT) $< -p $(PROFILE) -$(DATA_NAME).osrm.hsgr: $(DATA_NAME).osrm $(PROFILE) $(OSRM_CONTRACT) +$(DATA_NAME)_CH.osrm.hsgr: $(DATA_NAME)_CH.osrm $(PROFILE) $(OSRM_CONTRACT) @echo "Running osrm-contract..." - $(TIMER) "osrm-contract" $(OSRM_CONTRACT) $(DATA_NAME).osrm + $(TIMER) "osrm-contract" $(OSRM_CONTRACT) $< -$(DATA_NAME).osrm.partition: $(DATA_NAME).osrm $(PROFILE) $(OSRM_PARTITION) +$(DATA_NAME)_CoreCH.osrm.hsgr: $(DATA_NAME)_CoreCH.osrm $(PROFILE) $(OSRM_CONTRACT) + @echo "Running osrm-contract..." + $(TIMER) "osrm-contract" $(OSRM_CONTRACT) --core=0.95 $< + +$(DATA_NAME)_MLD.osrm.partition: $(DATA_NAME)_MLD.osrm $(PROFILE) $(OSRM_PARTITION) @echo "Running osrm-partition..." - $(TIMER) "osrm-partition" $(OSRM_PARTITION) $(DATA_NAME).osrm + $(TIMER) "osrm-contract" $(OSRM_CONTRACT) $< + $(TIMER) "osrm-partition" $(OSRM_PARTITION) $< $(DATA_NAME).requests: $(DATA_NAME).poly $(POLY2REQ) $(DATA_NAME).poly > $(DATA_NAME).requests -osrm-routed.pid: $(DATA_NAME).osrm.hsgr - @/bin/sh -c '$(OSRM_ROUTED) $(DATA_NAME).osrm& echo "$$!" > osrm-routed.pid' - sleep 1 - -benchmark: $(DATA_NAME).requests osrm-routed.pid +benchmark: data $(DATA_NAME).requests @echo "Running benchmark..." + @/bin/sh -c '$(OSRM_ROUTED) --algorithm=CH $(DATA_NAME)_CH.osrm& echo "$$!" > osrm-routed.pid' + @sleep 1 + $(TIMER) "queries" "cat $(DATA_NAME).requests | xargs curl &> /dev/null" + @cat osrm-routed.pid | xargs kill + @rm osrm-routed.pid + @/bin/sh -c '$(OSRM_ROUTED) --algorithm=CoreCH $(DATA_NAME)_CoreCH.osrm& echo "$$!" > osrm-routed.pid' + @sleep 1 + $(TIMER) "queries" "cat $(DATA_NAME).requests | xargs curl &> /dev/null" + @cat osrm-routed.pid | xargs kill + @rm osrm-routed.pid + @/bin/sh -c '$(OSRM_ROUTED) --algorithm=MLD $(DATA_NAME)_MLD.osrm& echo "$$!" > osrm-routed.pid' + @sleep 1 $(TIMER) "queries" "cat $(DATA_NAME).requests | xargs curl &> /dev/null" @cat osrm-routed.pid | xargs kill @rm osrm-routed.pid diff --git a/unit_tests/CMakeLists.txt b/unit_tests/CMakeLists.txt index 9231331c9..d51980977 100644 --- a/unit_tests/CMakeLists.txt +++ b/unit_tests/CMakeLists.txt @@ -22,7 +22,6 @@ file(GLOB UtilTestsSources util_tests.cpp util/*.cpp) - add_executable(engine-tests EXCLUDE_FROM_ALL ${EngineTestsSources} @@ -57,14 +56,18 @@ if(NOT WIN32 AND NOT Boost_USE_STATIC_LIBS) add_definitions(-DBOOST_TEST_DYN_LINK) endif() +set(TEST_DATA_DIR "${CMAKE_SOURCE_DIR}/test/data") +add_dependencies(library-tests osrm-extract osrm-contract osrm-partition) +add_custom_command(TARGET library-tests POST_BUILD COMMAND make -C ${TEST_DATA_DIR}) + target_compile_definitions(extractor-tests PRIVATE COMPILE_DEFINITIONS OSRM_FIXTURES_DIR="${CMAKE_SOURCE_DIR}/unit_tests/fixtures") +target_compile_definitions(library-tests PRIVATE COMPILE_DEFINITIONS OSRM_TEST_DATA_DIR="${TEST_DATA_DIR}") target_include_directories(engine-tests PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) target_include_directories(library-tests PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) target_include_directories(util-tests PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) target_include_directories(partition-tests PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) - target_link_libraries(engine-tests ${ENGINE_LIBRARIES} ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY}) target_link_libraries(extractor-tests ${EXTRACTOR_LIBRARIES} ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY}) target_link_libraries(partition-tests ${PARTITIONER_LIBRARIES} ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY}) @@ -72,7 +75,5 @@ target_link_libraries(library-tests osrm ${ENGINE_LIBRARIES} ${Boost_UNIT_TEST_F target_link_libraries(server-tests osrm ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY}) target_link_libraries(util-tests ${UTIL_LIBRARIES} ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY}) - add_custom_target(tests - DEPENDS - engine-tests extractor-tests partition-tests library-tests server-tests util-tests) + DEPENDS engine-tests extractor-tests partition-tests library-tests server-tests util-tests) diff --git a/unit_tests/library/args.hpp b/unit_tests/library/args.hpp deleted file mode 100644 index 5cf0d53fc..000000000 --- a/unit_tests/library/args.hpp +++ /dev/null @@ -1,32 +0,0 @@ -#ifndef OSRM_UNIT_TEST_ARGS -#define OSRM_UNIT_TEST_ARGS - -#include "util/log.hpp" -#include -#include -#include -#include -#include - -inline std::vector get_args() -{ - osrm::util::LogPolicy::GetInstance().Unmute(); - if ((boost::unit_test::framework::master_test_suite().argc != 2) || - (!boost::filesystem::is_regular_file( - boost::unit_test::framework::master_test_suite().argv[1]))) - { - osrm::util::Log(logERROR) << "Please provide valid input osrm file"; - osrm::util::Log(logERROR) << "Usage: " - << boost::unit_test::framework::master_test_suite().argv[0] - << " /path/to/input_osrm_file" << std::endl; - std::exit(EXIT_FAILURE); - } - - // Split off argv[0], store actual positional arguments in args - const auto argc = boost::unit_test::framework::master_test_suite().argc - 1; - const auto argv = boost::unit_test::framework::master_test_suite().argv + 1; - - return {argv, argv + argc}; -} - -#endif diff --git a/unit_tests/library/limits.cpp b/unit_tests/library/limits.cpp index ebcb97a3b..912c89cbc 100644 --- a/unit_tests/library/limits.cpp +++ b/unit_tests/library/limits.cpp @@ -1,8 +1,6 @@ #include #include -#include "args.hpp" - #include "osrm/match_parameters.hpp" #include "osrm/nearest_parameters.hpp" #include "osrm/route_parameters.hpp" @@ -27,13 +25,10 @@ BOOST_AUTO_TEST_SUITE(limits) BOOST_AUTO_TEST_CASE(test_trip_limits) { - const auto args = get_args(); - BOOST_REQUIRE_EQUAL(args.size(), 1); - using namespace osrm; EngineConfig config; - config.storage_config = {args[0]}; + config.storage_config = {OSRM_TEST_DATA_DIR "/monaco_CH.osrm"}; config.use_shared_memory = false; config.max_locations_trip = 2; @@ -57,13 +52,10 @@ BOOST_AUTO_TEST_CASE(test_trip_limits) BOOST_AUTO_TEST_CASE(test_route_limits) { - const auto args = get_args(); - BOOST_REQUIRE_EQUAL(args.size(), 1); - using namespace osrm; EngineConfig config; - config.storage_config = {args[0]}; + config.storage_config = {OSRM_TEST_DATA_DIR "/monaco_CH.osrm"}; config.use_shared_memory = false; config.max_locations_viaroute = 2; @@ -87,13 +79,10 @@ BOOST_AUTO_TEST_CASE(test_route_limits) BOOST_AUTO_TEST_CASE(test_table_limits) { - const auto args = get_args(); - BOOST_REQUIRE_EQUAL(args.size(), 1); - using namespace osrm; EngineConfig config; - config.storage_config = {args[0]}; + config.storage_config = {OSRM_TEST_DATA_DIR "/monaco_CH.osrm"}; config.use_shared_memory = false; config.max_locations_distance_table = 2; @@ -117,13 +106,10 @@ BOOST_AUTO_TEST_CASE(test_table_limits) BOOST_AUTO_TEST_CASE(test_match_limits) { - const auto args = get_args(); - BOOST_REQUIRE_EQUAL(args.size(), 1); - using namespace osrm; EngineConfig config; - config.storage_config = {args[0]}; + config.storage_config = {OSRM_TEST_DATA_DIR "/monaco_CH.osrm"}; config.use_shared_memory = false; config.max_locations_map_matching = 2; @@ -147,13 +133,10 @@ BOOST_AUTO_TEST_CASE(test_match_limits) BOOST_AUTO_TEST_CASE(test_nearest_limits) { - const auto args = get_args(); - BOOST_REQUIRE_EQUAL(args.size(), 1); - using namespace osrm; EngineConfig config; - config.storage_config = {args[0]}; + config.storage_config = {OSRM_TEST_DATA_DIR "/monaco_CH.osrm"}; config.use_shared_memory = false; config.max_results_nearest = 2; diff --git a/unit_tests/library/match.cpp b/unit_tests/library/match.cpp index 528c95c32..60fedb0c1 100644 --- a/unit_tests/library/match.cpp +++ b/unit_tests/library/match.cpp @@ -1,7 +1,6 @@ #include #include -#include "args.hpp" #include "coordinates.hpp" #include "fixture.hpp" #include "waypoint_check.hpp" @@ -18,12 +17,9 @@ BOOST_AUTO_TEST_SUITE(match) BOOST_AUTO_TEST_CASE(test_match) { - const auto args = get_args(); - BOOST_REQUIRE_EQUAL(args.size(), 1); - using namespace osrm; - auto osrm = getOSRM(args[0]); + auto osrm = getOSRM(OSRM_TEST_DATA_DIR "/monaco_CH.osrm"); MatchParameters params; params.coordinates.push_back(get_dummy_location()); diff --git a/unit_tests/library/nearest.cpp b/unit_tests/library/nearest.cpp index fe512822f..6f8a25d2c 100644 --- a/unit_tests/library/nearest.cpp +++ b/unit_tests/library/nearest.cpp @@ -1,7 +1,6 @@ #include #include -#include "args.hpp" #include "coordinates.hpp" #include "fixture.hpp" @@ -17,8 +16,7 @@ BOOST_AUTO_TEST_SUITE(nearest) BOOST_AUTO_TEST_CASE(test_nearest_response) { - const auto args = get_args(); - auto osrm = getOSRM(args.at(0)); + auto osrm = getOSRM(OSRM_TEST_DATA_DIR "/monaco_CH.osrm"); using namespace osrm; @@ -45,8 +43,7 @@ BOOST_AUTO_TEST_CASE(test_nearest_response) BOOST_AUTO_TEST_CASE(test_nearest_response_no_coordinates) { - const auto args = get_args(); - auto osrm = getOSRM(args.at(0)); + auto osrm = getOSRM(OSRM_TEST_DATA_DIR "/monaco_CH.osrm"); using namespace osrm; @@ -62,8 +59,7 @@ BOOST_AUTO_TEST_CASE(test_nearest_response_no_coordinates) BOOST_AUTO_TEST_CASE(test_nearest_response_multiple_coordinates) { - const auto args = get_args(); - auto osrm = getOSRM(args.at(0)); + auto osrm = getOSRM(OSRM_TEST_DATA_DIR "/monaco_CH.osrm"); using namespace osrm; @@ -81,8 +77,7 @@ BOOST_AUTO_TEST_CASE(test_nearest_response_multiple_coordinates) BOOST_AUTO_TEST_CASE(test_nearest_response_for_location_in_small_component) { - const auto args = get_args(); - auto osrm = getOSRM(args.at(0)); + auto osrm = getOSRM(OSRM_TEST_DATA_DIR "/monaco_CH.osrm"); using namespace osrm; diff --git a/unit_tests/library/options.cpp b/unit_tests/library/options.cpp index 1383c9488..e03ae8a64 100644 --- a/unit_tests/library/options.cpp +++ b/unit_tests/library/options.cpp @@ -1,7 +1,6 @@ #include #include -#include "args.hpp" #include "coordinates.hpp" #include "equal_json.hpp" #include "fixture.hpp" @@ -12,33 +11,30 @@ BOOST_AUTO_TEST_SUITE(options) BOOST_AUTO_TEST_CASE(test_ch) { - const auto args = get_args(); - using namespace osrm; EngineConfig config; - config.storage_config = storage::StorageConfig(args.at(0)); + config.use_shared_memory = false; + config.storage_config = storage::StorageConfig(OSRM_TEST_DATA_DIR "/monaco_CH.osrm"); config.algorithm = EngineConfig::Algorithm::CH; OSRM osrm{config}; } BOOST_AUTO_TEST_CASE(test_corech) { - const auto args = get_args(); - using namespace osrm; EngineConfig config; - config.storage_config = storage::StorageConfig(args.at(0)); + config.use_shared_memory = false; + config.storage_config = storage::StorageConfig(OSRM_TEST_DATA_DIR "/monaco_CoreCH.osrm"); config.algorithm = EngineConfig::Algorithm::CoreCH; OSRM osrm{config}; } BOOST_AUTO_TEST_CASE(test_mld) { - const auto args = get_args(); - using namespace osrm; EngineConfig config; - config.storage_config = storage::StorageConfig(args.at(0)); + config.use_shared_memory = false; + config.storage_config = storage::StorageConfig(OSRM_TEST_DATA_DIR "/monaco_CoreCH.osrm"); config.algorithm = EngineConfig::Algorithm::MLD; OSRM osrm{config}; } diff --git a/unit_tests/library/route.cpp b/unit_tests/library/route.cpp index ecf3bf3eb..ed7a42d16 100644 --- a/unit_tests/library/route.cpp +++ b/unit_tests/library/route.cpp @@ -1,7 +1,6 @@ #include #include -#include "args.hpp" #include "coordinates.hpp" #include "equal_json.hpp" #include "fixture.hpp" @@ -18,8 +17,7 @@ BOOST_AUTO_TEST_SUITE(route) BOOST_AUTO_TEST_CASE(test_route_same_coordinates_fixture) { - const auto args = get_args(); - auto osrm = getOSRM(args.at(0)); + auto osrm = getOSRM(OSRM_TEST_DATA_DIR "/monaco_CH.osrm"); using namespace osrm; @@ -105,8 +103,7 @@ BOOST_AUTO_TEST_CASE(test_route_same_coordinates_fixture) BOOST_AUTO_TEST_CASE(test_route_same_coordinates) { - const auto args = get_args(); - auto osrm = getOSRM(args.at(0)); + auto osrm = getOSRM(OSRM_TEST_DATA_DIR "/monaco_CH.osrm"); using namespace osrm; @@ -258,8 +255,7 @@ BOOST_AUTO_TEST_CASE(test_route_same_coordinates) BOOST_AUTO_TEST_CASE(test_route_response_for_locations_in_small_component) { - const auto args = get_args(); - auto osrm = getOSRM(args.at(0)); + auto osrm = getOSRM(OSRM_TEST_DATA_DIR "/monaco_CH.osrm"); using namespace osrm; @@ -294,8 +290,7 @@ BOOST_AUTO_TEST_CASE(test_route_response_for_locations_in_small_component) BOOST_AUTO_TEST_CASE(test_route_response_for_locations_in_big_component) { - const auto args = get_args(); - auto osrm = getOSRM(args.at(0)); + auto osrm = getOSRM(OSRM_TEST_DATA_DIR "/monaco_CH.osrm"); using namespace osrm; @@ -330,8 +325,7 @@ BOOST_AUTO_TEST_CASE(test_route_response_for_locations_in_big_component) BOOST_AUTO_TEST_CASE(test_route_response_for_locations_across_components) { - const auto args = get_args(); - auto osrm = getOSRM(args.at(0)); + auto osrm = getOSRM(OSRM_TEST_DATA_DIR "/monaco_CH.osrm"); using namespace osrm; @@ -368,8 +362,7 @@ BOOST_AUTO_TEST_CASE(test_route_response_for_locations_across_components) BOOST_AUTO_TEST_CASE(test_route_user_disables_generating_hints) { - const auto args = get_args(); - auto osrm = getOSRM(args.at(0)); + auto osrm = getOSRM(OSRM_TEST_DATA_DIR "/monaco_CH.osrm"); using namespace osrm; @@ -389,8 +382,7 @@ BOOST_AUTO_TEST_CASE(test_route_user_disables_generating_hints) BOOST_AUTO_TEST_CASE(speed_annotation_matches_duration_and_distance) { - const auto args = get_args(); - auto osrm = getOSRM(args.at(0)); + auto osrm = getOSRM(OSRM_TEST_DATA_DIR "/monaco_CH.osrm"); using namespace osrm; @@ -424,8 +416,7 @@ BOOST_AUTO_TEST_CASE(speed_annotation_matches_duration_and_distance) BOOST_AUTO_TEST_CASE(test_manual_setting_of_annotations_property) { - const auto args = get_args(); - auto osrm = getOSRM(args.at(0)); + auto osrm = getOSRM(OSRM_TEST_DATA_DIR "/monaco_CH.osrm"); using namespace osrm; diff --git a/unit_tests/library/table.cpp b/unit_tests/library/table.cpp index 5d2d946a2..928f3d3d2 100644 --- a/unit_tests/library/table.cpp +++ b/unit_tests/library/table.cpp @@ -1,7 +1,6 @@ #include #include -#include "args.hpp" #include "coordinates.hpp" #include "fixture.hpp" #include "waypoint_check.hpp" @@ -18,12 +17,9 @@ BOOST_AUTO_TEST_SUITE(table) BOOST_AUTO_TEST_CASE(test_table_three_coords_one_source_one_dest_matrix) { - const auto args = get_args(); - BOOST_REQUIRE_EQUAL(args.size(), 1); - using namespace osrm; - auto osrm = getOSRM(args[0]); + auto osrm = getOSRM(OSRM_TEST_DATA_DIR "/monaco_CH.osrm"); TableParameters params; params.coordinates.push_back(get_dummy_location()); @@ -68,12 +64,9 @@ BOOST_AUTO_TEST_CASE(test_table_three_coords_one_source_one_dest_matrix) BOOST_AUTO_TEST_CASE(test_table_three_coords_one_source_matrix) { - const auto args = get_args(); - BOOST_REQUIRE_EQUAL(args.size(), 1); - using namespace osrm; - auto osrm = getOSRM(args[0]); + auto osrm = getOSRM(OSRM_TEST_DATA_DIR "/monaco_CH.osrm"); TableParameters params; params.coordinates.push_back(get_dummy_location()); @@ -118,12 +111,9 @@ BOOST_AUTO_TEST_CASE(test_table_three_coords_one_source_matrix) BOOST_AUTO_TEST_CASE(test_table_three_coordinates_matrix) { - const auto args = get_args(); - BOOST_REQUIRE_EQUAL(args.size(), 1); - using namespace osrm; - auto osrm = getOSRM(args[0]); + auto osrm = getOSRM(OSRM_TEST_DATA_DIR "/monaco_CH.osrm"); TableParameters params; params.coordinates.push_back(get_dummy_location()); diff --git a/unit_tests/library/tile.cpp b/unit_tests/library/tile.cpp index cf3f04e5c..d2e7e1cb8 100644 --- a/unit_tests/library/tile.cpp +++ b/unit_tests/library/tile.cpp @@ -1,7 +1,6 @@ #include #include -#include "args.hpp" #include "fixture.hpp" #include "osrm/tile_parameters.hpp" @@ -23,11 +22,10 @@ BOOST_AUTO_TEST_SUITE(tile) BOOST_AUTO_TEST_CASE(test_tile) { - const auto args = get_args(); - auto osrm = getOSRM(args.at(0)); - using namespace osrm; + auto osrm = getOSRM(OSRM_TEST_DATA_DIR "/monaco_CH.osrm"); + // This tile should contain most of monaco TileParameters params{17059, 11948, 15}; @@ -213,11 +211,9 @@ BOOST_AUTO_TEST_CASE(test_tile) BOOST_AUTO_TEST_CASE(test_tile_turns) { - const auto args = get_args(); - auto osrm = getOSRM(args.at(0)); - using namespace osrm; + auto osrm = getOSRM(OSRM_TEST_DATA_DIR "/monaco_CH.osrm"); // Small tile where we can test all the values TileParameters params{272953, 191177, 19}; @@ -363,11 +359,10 @@ BOOST_AUTO_TEST_CASE(test_tile_turns) BOOST_AUTO_TEST_CASE(test_tile_speeds) { - const auto args = get_args(); - auto osrm = getOSRM(args.at(0)); - using namespace osrm; + auto osrm = getOSRM(OSRM_TEST_DATA_DIR "/monaco_CH.osrm"); + // Small tile so we can test all the values // TileParameters params{272953, 191177, 19}; TileParameters params{136477, 95580, 18}; diff --git a/unit_tests/library/trip.cpp b/unit_tests/library/trip.cpp index 31cc11929..f3509c6b4 100644 --- a/unit_tests/library/trip.cpp +++ b/unit_tests/library/trip.cpp @@ -1,7 +1,6 @@ #include #include -#include "args.hpp" #include "coordinates.hpp" #include "fixture.hpp" @@ -17,11 +16,9 @@ BOOST_AUTO_TEST_SUITE(trip) BOOST_AUTO_TEST_CASE(test_roundtrip_response_for_locations_in_small_component) { - const auto args = get_args(); - auto osrm = getOSRM(args.at(0)); - using namespace osrm; + auto osrm = getOSRM(OSRM_TEST_DATA_DIR "/monaco_CH.osrm"); const auto locations = get_locations_in_small_component(); TripParameters params; @@ -61,11 +58,9 @@ BOOST_AUTO_TEST_CASE(test_roundtrip_response_for_locations_in_small_component) BOOST_AUTO_TEST_CASE(test_roundtrip_response_for_locations_in_big_component) { - const auto args = get_args(); - auto osrm = getOSRM(args.at(0)); - using namespace osrm; + auto osrm = getOSRM(OSRM_TEST_DATA_DIR "/monaco_CH.osrm"); const auto locations = get_locations_in_big_component(); TripParameters params; @@ -105,11 +100,9 @@ BOOST_AUTO_TEST_CASE(test_roundtrip_response_for_locations_in_big_component) BOOST_AUTO_TEST_CASE(test_roundtrip_response_for_locations_across_components) { - const auto args = get_args(); - auto osrm = getOSRM(args.at(0)); - using namespace osrm; + auto osrm = getOSRM(OSRM_TEST_DATA_DIR "/monaco_CH.osrm"); const auto small = get_locations_in_small_component(); const auto big = get_locations_in_big_component(); @@ -153,11 +146,9 @@ BOOST_AUTO_TEST_CASE(test_roundtrip_response_for_locations_across_components) BOOST_AUTO_TEST_CASE(test_tfse_1) { - const auto args = get_args(); - auto osrm = getOSRM(args.at(0)); - using namespace osrm; + auto osrm = getOSRM(OSRM_TEST_DATA_DIR "/monaco_CH.osrm"); const auto locations = get_locations_in_small_component(); TripParameters params; @@ -201,11 +192,9 @@ BOOST_AUTO_TEST_CASE(test_tfse_1) BOOST_AUTO_TEST_CASE(test_tfse_2) { - const auto args = get_args(); - auto osrm = getOSRM(args.at(0)); - using namespace osrm; + auto osrm = getOSRM(OSRM_TEST_DATA_DIR "/monaco_CH.osrm"); const auto locations = get_locations_in_big_component(); TripParameters params; @@ -274,10 +263,9 @@ void CheckOk(const osrm::OSRM &osrm, osrm::TripParameters ¶ms) BOOST_AUTO_TEST_CASE(test_tfse_illegal_parameters) { - const auto args = get_args(); - auto osrm = getOSRM(args.at(0)); using namespace osrm; + auto osrm = getOSRM(OSRM_TEST_DATA_DIR "/monaco_CH.osrm"); const auto locations = get_locations_in_big_component(); auto params = osrm::TripParameters(); @@ -326,9 +314,8 @@ BOOST_AUTO_TEST_CASE(test_tfse_illegal_parameters) BOOST_AUTO_TEST_CASE(test_tfse_legal_parameters) { - const auto args = get_args(); - auto osrm = getOSRM(args.at(0)); using namespace osrm; + auto osrm = getOSRM(OSRM_TEST_DATA_DIR "/monaco_CH.osrm"); const auto locations = get_locations_in_big_component(); json::Object result; TripParameters params;