diff --git a/features/support/data.rb b/features/support/data.rb index bf916b4fe..8dd6aab69 100644 --- a/features/support/data.rb +++ b/features/support/data.rb @@ -177,7 +177,10 @@ def convert_osm_to_pbf log_preprocess_info log "== Converting #{@osm_file}.osm to protobuffer format...", :preprocess unless system "osmosis --read-xml #{@osm_file}.osm --write-pbf #{@osm_file}.osm.pbf omitmetadata=true 1>>#{PREPROCESS_LOG_FILE} 2>>#{PREPROCESS_LOG_FILE}" - raise "Failed to convert to proto buffer format. Please see #{hash}.log for more info." + log_path = 'preprocessing.log' + log_lines = 30 + tail = log_tail log_path,log_lines + raise OSRMError.new 'osmosis', $?.exitstatus, "*** Failed to convert .oms to .pbf. osmosis exited with code #{$?.exitstatus}. Last #{log_lines} lines from #{log_path}:\n#{tail}\n" end log '', :preprocess end diff --git a/features/support/launch.rb b/features/support/launch.rb index 596822f28..0b07b87e4 100644 --- a/features/support/launch.rb +++ b/features/support/launch.rb @@ -24,7 +24,10 @@ class OSRMLauncher wait_for_connection end rescue Timeout::Error - raise "*** Launching osrm-routed timed out." + log_path = 'osrm-routed.log' + log_lines = 3 + tail = log_tail log_path,log_lines + raise OSRMError.new 'osrm-routed', nil, "*** Launching osrm-routed timed out. Last #{log_lines} lines from #{log_path}:\n#{tail}\n" end def shutdown @@ -33,7 +36,10 @@ class OSRMLauncher end rescue Timeout::Error kill - raise "*** Shutting down osrm-routed timed out." + log_path = 'osrm-routed.log' + log_lines = 3 + tail = log_tail log_path,log_lines + raise OSRMError.new 'osrm-routed', nil, "*** Shutting down osrm-routed timed out. Last #{log_lines} lines from #{log_path}:\n#{tail}\n" end diff --git a/features/support/route.rb b/features/support/route.rb index 856282a44..8be4e9219 100644 --- a/features/support/route.rb +++ b/features/support/route.rb @@ -7,7 +7,6 @@ DESTINATION_REACHED = 15 #OSRM instruction code def request_path path @query = path - log path uri = URI.parse "#{HOST}/#{path}" Timeout.timeout(REQUEST_TIMEOUT) do Net::HTTP.get_response uri