improve cuke process management, support OSRM_PORT

This commit is contained in:
Emil Tin
2012-12-15 12:34:53 +01:00
parent 29344f55ae
commit ae106a3a90
9 changed files with 122 additions and 57 deletions
-1
View File
@@ -1,7 +1,6 @@
When /^I preprocess data$/ do
begin
osrm_kill
reprocess
rescue OSRMError => e
@process_error = e
-1
View File
@@ -1,5 +1,4 @@
When /^I request \/(.*)$/ do |path|
osrm_kill
reprocess
OSRMLauncher.new do
@response = request_path path
+8 -2
View File
@@ -134,7 +134,6 @@ Then /^"([^"]*)" should be returned$/ do |route|
end
Then /^routability should be$/ do |table|
osrm_kill
build_ways_from_table table
reprocess
actual = []
@@ -176,7 +175,6 @@ Then /^routability should be$/ do |table|
end
When /^I route I should get$/ do |table|
osrm_kill
reprocess
actual = []
OSRMLauncher.new do
@@ -265,3 +263,11 @@ When /^I route I should get$/ do |table|
end
table.routing_diff! actual
end
When /^I route (\d+) times I should get$/ do |n,table|
ok = true
n.to_i.times do
ok = false unless step "I route I should get", table
end
ok
end