adjust datastore testing
This commit is contained in:
parent
7ba8e51fa9
commit
db06cdb4ce
@ -21,7 +21,7 @@ def input_format
|
||||
end
|
||||
|
||||
def sanitized_scenario_title
|
||||
@sanitized_scenario_title ||= @scenario_title.gsub /[^0-9A-Za-z.\-]/, '_'
|
||||
@sanitized_scenario_title ||= @scenario_title.to_s.gsub /[^0-9A-Za-z.\-]/, '_'
|
||||
end
|
||||
|
||||
def set_grid_size meters
|
||||
|
@ -23,9 +23,7 @@ class OSRMLoader
|
||||
end
|
||||
|
||||
def self.load_data
|
||||
puts "=== loading data with osrm-datastore"
|
||||
log_time_and_run "#{BIN_PATH}/osrm-datastore --springclean"
|
||||
log_time_and_run "#{BIN_PATH}/osrm-datastore #{@input_file}"
|
||||
run_bin "osrm-datastore", @input_file
|
||||
end
|
||||
|
||||
def self.launch
|
||||
@ -50,7 +48,6 @@ class OSRMLoader
|
||||
if @@pid
|
||||
s = `ps -o state -p #{@@pid}`.split[1].to_s.strip
|
||||
up = (s =~ /^[DRST]/) != nil
|
||||
# puts "=== osrm-routed, status pid #{@@pid}: #{s} (#{up ? 'up' : 'down'})"
|
||||
up
|
||||
else
|
||||
false
|
||||
@ -59,15 +56,11 @@ class OSRMLoader
|
||||
|
||||
def self.osrm_up
|
||||
return if self.osrm_up?
|
||||
puts "=== launching osrm-routed"
|
||||
log %[Process.spawn("#{BIN_PATH}/osrm-routed --sharedmemory=1 --port #{OSRM_PORT}",:out=>'#{OSRM_ROUTED_LOG_FILE}', :err=>'#{OSRM_ROUTED_LOG_FILE}')]
|
||||
@@pid = Process.spawn("#{BIN_PATH}/osrm-routed --sharedmemory=1 --port #{OSRM_PORT}",:out=>OSRM_ROUTED_LOG_FILE, :err=>OSRM_ROUTED_LOG_FILE)
|
||||
end
|
||||
|
||||
def self.osrm_down
|
||||
if @@pid
|
||||
puts '=== shutting down osrm'
|
||||
log_time "Process.kill 'TERM', #{@@pid}"
|
||||
Process.kill 'TERM', @@pid
|
||||
self.wait_for_shutdown
|
||||
end
|
||||
@ -75,8 +68,6 @@ class OSRMLoader
|
||||
|
||||
def self.kill
|
||||
if @@pid
|
||||
puts '=== killing osrm'
|
||||
log_time "Process.kill 'KILL', @@pid"
|
||||
Process.kill 'KILL', @@pid
|
||||
end
|
||||
end
|
||||
@ -84,7 +75,6 @@ class OSRMLoader
|
||||
def self.wait_for_connection
|
||||
while true
|
||||
begin
|
||||
log_time "TCPSocket.new('127.0.0.1', OSRM_PORT)"
|
||||
socket = TCPSocket.new('127.0.0.1', OSRM_PORT)
|
||||
return
|
||||
rescue Errno::ECONNREFUSED
|
||||
|
@ -18,7 +18,6 @@ def request_path path, waypoints=[], options={}
|
||||
uri = URI.parse ["#{HOST}/#{path}", params].compact.join('?')
|
||||
@query = uri.to_s
|
||||
Timeout.timeout(OSRM_TIMEOUT) do
|
||||
log_time "Net::HTTP.get_response #{uri}"
|
||||
Net::HTTP.get_response uri
|
||||
end
|
||||
rescue Errno::ECONNREFUSED => e
|
||||
@ -31,7 +30,6 @@ def request_url path
|
||||
uri = URI.parse"#{HOST}/#{path}"
|
||||
@query = uri.to_s
|
||||
Timeout.timeout(OSRM_TIMEOUT) do
|
||||
log_time "Net::HTTP.get_response #{uri}"
|
||||
Net::HTTP.get_response uri
|
||||
end
|
||||
rescue Errno::ECONNREFUSED => e
|
||||
|
@ -11,7 +11,8 @@ def run_bin bin, options
|
||||
opt.gsub! "{profile}", "#{PROFILES_PATH}/#{@profile}.lua"
|
||||
end
|
||||
|
||||
@stdout = `#{QQ}#{BIN_PATH}/#{bin}#{EXE}#{QQ} #{opt} 2>error.log`
|
||||
cmd = "#{QQ}#{BIN_PATH}/#{bin}#{EXE}#{QQ} #{opt} 2>error.log"
|
||||
@stdout = `#{cmd}`
|
||||
@stderr = File.read 'error.log'
|
||||
@exit_code = $?.exitstatus
|
||||
end
|
||||
|
@ -1,4 +1,4 @@
|
||||
@routing @bad
|
||||
@routing @bad @testbot
|
||||
Feature: Handle bad data in a graceful manner
|
||||
|
||||
Background:
|
||||
|
@ -1,4 +1,4 @@
|
||||
@routing @basic
|
||||
@routing @basic @testbot
|
||||
Feature: Basic Routing
|
||||
|
||||
Background:
|
||||
|
@ -1,4 +1,4 @@
|
||||
@routing @bearing
|
||||
@routing @bearing @testbot
|
||||
Feature: Compass bearing
|
||||
|
||||
Background:
|
||||
|
@ -1,4 +1,4 @@
|
||||
@routing @bearing_param @todo
|
||||
@routing @bearing_param @todo @testbot
|
||||
Feature: Bearing parameter
|
||||
|
||||
Background:
|
||||
|
@ -1,4 +1,4 @@
|
||||
@routing @graph
|
||||
@routing @graph @testbot
|
||||
Feature: Geometry Compression
|
||||
|
||||
Background:
|
||||
|
@ -1,4 +1,4 @@
|
||||
@routing @datastore
|
||||
@routing @datastore @testbot
|
||||
Feature: Temporary tests related to osrm-datastore
|
||||
|
||||
Background:
|
||||
|
@ -1,4 +1,4 @@
|
||||
@routing @distance
|
||||
@routing @distance @testbot
|
||||
Feature: Distance calculation
|
||||
|
||||
Background:
|
||||
|
@ -1,4 +1,4 @@
|
||||
@routing @fastest
|
||||
@routing @fastest @testbot
|
||||
Feature: Choosing fastest route
|
||||
|
||||
Background:
|
||||
|
@ -1,4 +1,4 @@
|
||||
@routing
|
||||
@routing @testbot
|
||||
Feature: Retrieve geometry
|
||||
|
||||
Background: Use some profile
|
||||
|
@ -1,4 +1,4 @@
|
||||
@routing @graph
|
||||
@routing @graph @testbot
|
||||
Feature: Basic Routing
|
||||
#Test the input data descibed on https://github.com/DennisOSRM/Project-OSRM/wiki/Graph-representation
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
@routing @726
|
||||
@routing @726 @testbot
|
||||
Feature: Avoid weird loops caused by rounding errors
|
||||
|
||||
Background:
|
||||
|
@ -1,4 +1,4 @@
|
||||
@routing @origin
|
||||
@routing @origin @testbot
|
||||
Feature: Routing close to the [0,0] origin
|
||||
|
||||
Background:
|
||||
|
@ -1,4 +1,4 @@
|
||||
@routing @penalty @signal
|
||||
@routing @penalty @signal @testbot
|
||||
Feature: Penalties
|
||||
# Testbot uses a signal penalty of 7s.
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
@routing @planetary
|
||||
@routing @planetary @testbot
|
||||
Feature: Distance calculation
|
||||
|
||||
Scenario: Approximated Longitudinal distances at equator
|
||||
|
@ -1,4 +1,4 @@
|
||||
@routing @projection
|
||||
@routing @projection @testbot
|
||||
Feature: Projection to nearest point on road
|
||||
# Waypoints are projected perpendiculary onto the closest road
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
@routing @pbf
|
||||
@routing @pbf @testbot
|
||||
Feature: Importing protobuffer (.pbf) format
|
||||
# Test normally read .osm, which is faster than .pbf files,
|
||||
# since we don't need to use osmosis to first convert to .pbf
|
||||
|
@ -1,4 +1,4 @@
|
||||
@routing @snap
|
||||
@routing @snap @testbot
|
||||
Feature: Snap start/end point to the nearest way
|
||||
|
||||
Background:
|
||||
|
@ -1,4 +1,4 @@
|
||||
@routing @status
|
||||
@routing @status @testbot
|
||||
Feature: Status messages
|
||||
|
||||
Background:
|
||||
|
@ -1,4 +1,4 @@
|
||||
@routing @time
|
||||
@routing @time @testbot
|
||||
Feature: Estimation of travel time
|
||||
# Testbot speeds:
|
||||
# Primary road: 36km/h = 36000m/3600s = 100m/10s
|
||||
|
@ -1,4 +1,4 @@
|
||||
@routing @turns
|
||||
@routing @turns @testbot
|
||||
Feature: Turn directions/codes
|
||||
|
||||
Background:
|
||||
|
@ -1,4 +1,4 @@
|
||||
@routing @utf
|
||||
@routing @utf @testbot
|
||||
Feature: Handling of UTF characters
|
||||
|
||||
Background:
|
||||
|
@ -1,4 +1,4 @@
|
||||
@routing @uturn @via
|
||||
@routing @uturn @via @testbot
|
||||
Feature: U-turns at via points
|
||||
|
||||
Background:
|
||||
|
Loading…
Reference in New Issue
Block a user