From 41f083cded88b558d0ba687c6dee19d0d5cc4be2 Mon Sep 17 00:00:00 2001 From: Dane Springmeyer Date: Wed, 9 Nov 2016 11:08:16 -0800 Subject: [PATCH] test customized build directory, make test/data/Makefile customizable --- .travis.yml | 5 +++-- test/data/Makefile | 8 ++++---- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/.travis.yml b/.travis.yml index a391baf1c..851e4a436 100644 --- a/.travis.yml +++ b/.travis.yml @@ -137,7 +137,8 @@ install: if [[ "${TRAVIS_OS_NAME}" == "linux" ]]; then ./scripts/check_taginfo.py taginfo.json profiles/car.lua fi - - mkdir build && pushd build + - export OSRM_BUILD_DIR="$(pwd)/build-osrm" + - mkdir ${OSRM_BUILD_DIR} && pushd ${OSRM_BUILD_DIR} - export CC=${CCOMPILER} CXX=${CXXCOMPILER} - cmake .. -DCMAKE_BUILD_TYPE=${BUILD_TYPE} -DENABLE_MASON=${ENABLE_MASON:-OFF} -DBUILD_SHARED_LIBS=${BUILD_SHARED_LIBS:-OFF} -DENABLE_COVERAGE=${ENABLE_COVERAGE:-OFF} -DENABLE_SANITIZER=${ENABLE_SANITIZER:-OFF} -DBUILD_TOOLS=ON -DBUILD_COMPONENTS=${BUILD_COMPONENTS:-OFF} -DENABLE_CCACHE=ON - echo "travis_fold:start:MAKE" @@ -172,7 +173,7 @@ script: - echo "travis_fold:end:BENCHMARK" - ./example/build/osrm-example test/data/monaco.osrm # All tests assume to be run from the build directory - - pushd build + - pushd ${OSRM_BUILD_DIR} - ./unit_tests/library-tests ../test/data/monaco.osrm - ./unit_tests/extractor-tests - ./unit_tests/engine-tests diff --git a/test/data/Makefile b/test/data/Makefile index 8684bc885..c63680322 100755 --- a/test/data/Makefile +++ b/test/data/Makefile @@ -1,12 +1,12 @@ DATA_NAME:=monaco DATA_URL:=https://s3.amazonaws.com/mapbox/osrm/testing/$(DATA_NAME).osm.pbf DATA_POLY_URL:=https://s3.amazonaws.com/mapbox/osrm/testing/$(DATA_NAME).poly -TOOL_ROOT:=../../build +OSRM_BUILD_DIR?=../../build PROFILE_ROOT:=../../profiles SCRIPT_ROOT:=../../scripts -OSRM_EXTRACT:=$(TOOL_ROOT)/osrm-extract -OSRM_CONTRACT:=$(TOOL_ROOT)/osrm-contract -OSRM_ROUTED:=$(TOOL_ROOT)/osrm-routed +OSRM_EXTRACT:=$(OSRM_BUILD_DIR)/osrm-extract +OSRM_CONTRACT:=$(OSRM_BUILD_DIR)/osrm-contract +OSRM_ROUTED:=$(OSRM_BUILD_DIR)/osrm-routed POLY2REQ:=$(SCRIPT_ROOT)/poly2req.js TIMER:=$(SCRIPT_ROOT)/timer.sh PROFILE:=$(PROFILE_ROOT)/car.lua