Code review updates.

This commit is contained in:
Daniel Patterson
2016-03-03 13:25:01 -08:00
parent 49441fe204
commit 017ff53702
10 changed files with 105 additions and 168 deletions
+1 -1
View File
@@ -34,7 +34,7 @@ Feature: Traffic - speeds
Scenario: Weighting not based on raster sources
Given the profile "testbot"
Given the extract extra arguments "--generate-edge-lookup"
Given the prepare extra arguments "--segment-speed-file speeds.csv"
Given the contract extra arguments "--segment-speed-file speeds.csv"
And I route I should get
| from | to | route | speed |
| a | b | ab | 27 km/h |
+2 -2
View File
@@ -10,8 +10,8 @@ Given /^the extract extra arguments "(.*?)"$/ do |args|
set_extract_args args
end
Given /^the prepare extra arguments "(.*?)"$/ do |args|
set_prepare_args args
Given /^the contract extra arguments "(.*?)"$/ do |args|
set_contract_args args
end
Given /^a grid size of (\d+) meters$/ do |meters|
+2 -2
View File
@@ -15,6 +15,6 @@ def set_extract_args args
@extract_args = args
end
def set_prepare_args args
@prepare_args = args
def set_contract_args args
@contract_args = args
end
+2 -2
View File
@@ -288,8 +288,8 @@ def prepare_data
Dir.chdir TEST_FOLDER do
log_preprocess_info
log "== Preparing #{extracted_file}.osm...", :preprocess
log "#{LOAD_LIBRARIES}#{BIN_PATH}/osrm-contract #{@prepare_args} #{extracted_file}.osrm >>#{PREPROCESS_LOG_FILE} 2>&1"
unless system "#{LOAD_LIBRARIES}#{BIN_PATH}/osrm-contract #{@prepare_args} #{extracted_file}.osrm >>#{PREPROCESS_LOG_FILE} 2>&1"
log "#{LOAD_LIBRARIES}#{BIN_PATH}/osrm-contract #{@contract_args} #{extracted_file}.osrm >>#{PREPROCESS_LOG_FILE} 2>&1"
unless system "#{LOAD_LIBRARIES}#{BIN_PATH}/osrm-contract #{@contract_args} #{extracted_file}.osrm >>#{PREPROCESS_LOG_FILE} 2>&1"
log "*** Exited with code #{$?.exitstatus}.", :preprocess
raise PrepareError.new $?.exitstatus, "osrm-contract exited with code #{$?.exitstatus}."
end