MLD regression tests

This commit is contained in:
Michael Krasnyk 2017-03-12 19:19:57 +01:00
parent 97c442482d
commit 20c6b4682f
No known key found for this signature in database
GPG Key ID: 49C12AD0F43D2108
2 changed files with 134 additions and 2 deletions

View File

@ -52,8 +52,9 @@ module.exports = function () {
assert.ok(this.exitCode !== 0 || this.termSignal);
});
this.Then(/^stdout should contain "(.*?)"$/, (str) => {
assert.ok(this.stdout.indexOf(str) > -1);
this.Then(/^stdout should( not)? contain "(.*?)"$/, (not, str) => {
const contains = this.stdout.indexOf(str) > -1;
assert.ok(typeof not === 'undefined' ? contains : !contains);
});
this.Then(/^stderr should( not)? contain "(.*?)"$/, (not, str) => {

View File

@ -0,0 +1,131 @@
@routing @testbot @mld
Feature: Multi level routing
Background:
Given the profile "testbot"
And the partition extra arguments "--min-cell-size 4 --small-component-size 1"
Scenario: Testbot - Multi level routing check partition
Given the node map
"""
abef
dc hg
ij mn
lkpo
"""
And the ways
| nodes | highway |
| abcda | primary |
| efghe | primary |
| ijkli | primary |
| nmop | primary |
| cm | primary |
| hj | primary |
| kp | primary |
| be | primary |
And the data has been extracted
When I run "osrm-partition --min-cell-size 4 --small-component-size 1 {processed_file}"
Then it should exit successfully
And stdout should not contain "level 1 #cells 1 bit size 1"
Scenario: Testbot - Multi level routing
Given the node map
"""
ab ef
dc hg
ij mn
lkpo
"""
And the ways
| nodes | highway |
| abcda | primary |
| efghe | primary |
| ijkli | primary |
| nmop | primary |
| cm | primary |
| hj | primary |
| kp | primary |
And the partition extra arguments "--min-cell-size 4 --small-component-size 1"
When I route I should get
| from | to | route | time |
| a | b | abcda,abcda | 20s |
| a | f | abcda,cm,nmop,kp,ijkli,hj,efghe,efghe | 257.7s |
| c | m | cm,cm | 44.7s |
Scenario: Testbot - Multi level routing: horizontal road
Given the node map
"""
ab ef
dc hg
ijkl
mn qr
pots
"""
And the ways
| nodes | highway |
| abcda | primary |
| efghe | primary |
| mnopm | primary |
| qrstq | primary |
| ijkl | primary |
| dim | primary |
| glr | primary |
| ot | secondary |
And the partition extra arguments "--min-cell-size 4 --small-component-size 1"
When I route I should get
| from | to | route | time |
| a | b | abcda,abcda | 20s |
| a | d | abcda,abcda | 20s |
| a | l | abcda,dim,ijkl,ijkl | 100s |
| a | p | abcda,dim,mnopm,mnopm | 80s |
| a | o | abcda,dim,mnopm,mnopm | 100s |
| a | t | abcda,dim,mnopm,ot,ot | 140s |
| a | s | abcda,dim,ijkl,glr,qrstq,qrstq | 140s |
| a | f | abcda,dim,ijkl,glr,efghe,efghe | 140s |
Scenario: Testbot - Multi level routing: route over internal cell edge hf
Given the node map
"""
ab
dcef
hgij
lk
"""
And the ways
| nodes | maxspeed |
| abcda | 5 |
| efghe | 5 |
| ijkli | 5 |
| eg | 10 |
| ce | 15 |
| ch | 15 |
| fi | 15 |
| gi | 15 |
| hf | 100 |
And the partition extra arguments "--min-cell-size 4 --small-component-size 1"
When I route I should get
| from | to | route | time |
| a | k | abcda,ch,hf,fi,ijkli,ijkli | 724.3s |