make cuke use bins in build/

This commit is contained in:
Emil Tin 2013-04-26 10:22:23 +02:00
parent dad4981a57
commit 36f3c0f77a
3 changed files with 7 additions and 6 deletions

View File

@ -14,6 +14,7 @@ DEFAULT_SPEEDPROFILE = 'bicycle'
WAY_SPACING = 100
DEFAULT_GRID_SIZE = 100 #meters
PROFILES_PATH = '../profiles'
BIN_PATH = '../build'
ORIGIN = [1,1]
@ -249,7 +250,7 @@ def reprocess
unless extracted?
log_preprocess_info
log "== Extracting #{@osm_file}.osm...", :preprocess
unless system "../osrm-extract #{@osm_file}.osm#{'.pbf' if use_pbf} 1>>#{PREPROCESS_LOG_FILE} 2>>#{PREPROCESS_LOG_FILE} #{PROFILES_PATH}/#{@profile}.lua"
unless system "#{BIN_PATH}/osrm-extract #{@osm_file}.osm#{'.pbf' if use_pbf} 1>>#{PREPROCESS_LOG_FILE} 2>>#{PREPROCESS_LOG_FILE} #{PROFILES_PATH}/#{@profile}.lua"
log "*** Exited with code #{$?.exitstatus}.", :preprocess
raise ExtractError.new $?.exitstatus, "osrm-extract exited with code #{$?.exitstatus}."
end
@ -258,7 +259,7 @@ def reprocess
unless prepared?
log_preprocess_info
log "== Preparing #{@osm_file}.osm...", :preprocess
unless system "../osrm-prepare #{@osm_file}.osrm #{@osm_file}.osrm.restrictions 1>>#{PREPROCESS_LOG_FILE} 2>>#{PREPROCESS_LOG_FILE} #{PROFILES_PATH}/#{@profile}.lua"
unless system "#{BIN_PATH}/osrm-prepare #{@osm_file}.osrm #{@osm_file}.osrm.restrictions 1>>#{PREPROCESS_LOG_FILE} 2>>#{PREPROCESS_LOG_FILE} #{PROFILES_PATH}/#{@profile}.lua"
log "*** Exited with code #{$?.exitstatus}.", :preprocess
raise PrepareError.new $?.exitstatus, "osrm-prepare exited with code #{$?.exitstatus}."
end

View File

@ -29,15 +29,15 @@ def lua_lib_hash
end
def bin_extract_hash
@@bin_extract_hash ||= hash_of_files '../osrm-extract'
@@bin_extract_hash ||= hash_of_files "#{BIN_PATH}/osrm-extract"
end
def bin_prepare_hash
@@bin_prepare_hash ||= hash_of_files '../osrm-prepare'
@@bin_prepare_hash ||= hash_of_files "#{BIN_PATH}/osrm-prepare"
end
def bin_routed_hash
@@bin_routed_hash ||= hash_of_files '../osrm-routed'
@@bin_routed_hash ||= hash_of_files "#{BIN_PATH}/osrm-routed"
end
#combine state of data, profile and binaries into a hash that identifies the exact test scenario

View File

@ -48,7 +48,7 @@ class OSRMLauncher
def osrm_up
return if osrm_up?
@pid = Process.spawn(['../osrm-routed',''],:out=>OSRM_ROUTED_LOG_FILE, :err=>OSRM_ROUTED_LOG_FILE)
@pid = Process.spawn(["#{BIN_PATH}/osrm-routed",''],:out=>OSRM_ROUTED_LOG_FILE, :err=>OSRM_ROUTED_LOG_FILE)
end
def osrm_down