Expose component size variable as command-line option (this allows testing of big/small components in cucumber tests).

Add ability to pass extra parameters to  during tests.
Limit distance table search so that it doesn't return any big components if they're beyond max_distance.
This commit is contained in:
Daniel Patterson
2015-12-01 17:46:29 -08:00
committed by Patrick Niklaus
parent f3f153cb38
commit 4ddbd2efb6
7 changed files with 43 additions and 3 deletions
+4
View File
@@ -10,3 +10,7 @@ end
def set_profile profile
@profile = profile
end
def set_extract_args args
@extract_args = args
end
+1 -1
View File
@@ -274,7 +274,7 @@ def extract_data
Dir.chdir TEST_FOLDER do
log_preprocess_info
log "== Extracting #{osm_file}.osm...", :preprocess
unless system "#{BIN_PATH}/osrm-extract #{osm_file}.osm#{'.pbf' if pbf?} --profile #{PROFILES_PATH}/#{@profile}.lua >>#{PREPROCESS_LOG_FILE} 2>&1"
unless system "#{BIN_PATH}/osrm-extract #{osm_file}.osm#{'.pbf' if pbf?} #{@extract_args} --profile #{PROFILES_PATH}/#{@profile}.lua >>#{PREPROCESS_LOG_FILE} 2>&1"
log "*** Exited with code #{$?.exitstatus}.", :preprocess
raise ExtractError.new $?.exitstatus, "osrm-extract exited with code #{$?.exitstatus}."
end