osrm-prepare -> osrm-contract

This commit is contained in:
Patrick Niklaus
2016-02-14 19:35:37 +01:00
committed by Daniel J. Hofmann
parent 96a5e594b3
commit 085bab749f
12 changed files with 41 additions and 52 deletions
@@ -1,5 +1,5 @@
@prepare @options @files
Feature: osrm-prepare command line options: files
Feature: osrm-contract command line options: files
# expansions:
# {extracted_base} => path to current extracted input file
# {profile} => path to current profile script
@@ -13,18 +13,13 @@ Feature: osrm-prepare command line options: files
| ab |
And the data has been extracted
Scenario: osrm-prepare - Passing base file
When I run "osrm-prepare {extracted_base}.osrm --profile {profile}"
Scenario: osrm-contract - Passing base file
When I run "osrm-contract {extracted_base}.osrm"
Then stderr should be empty
And it should exit with code 0
Scenario: osrm-prepare - Order of options should not matter
When I run "osrm-prepare --profile {profile} {extracted_base}.osrm"
Then stderr should be empty
And it should exit with code 0
Scenario: osrm-prepare - Missing input file
When I run "osrm-prepare over-the-rainbow.osrm --profile {profile}"
Scenario: osrm-contract - Missing input file
When I run "osrm-contract over-the-rainbow.osrm"
And stderr should contain "over-the-rainbow.osrm"
And stderr should contain "not found"
And it should exit with code 1
@@ -1,53 +1,47 @@
@prepare @options @help
Feature: osrm-prepare command line options: help
Feature: osrm-contract command line options: help
Background:
Given the profile "testbot"
Scenario: osrm-prepare - Help should be shown when no options are passed
When I run "osrm-prepare"
Scenario: osrm-contract - Help should be shown when no options are passed
When I run "osrm-contract"
Then stderr should be empty
And stdout should contain "osrm-prepare <input.osrm> [options]:"
And stdout should contain "osrm-contract <input.osrm> [options]:"
And stdout should contain "Options:"
And stdout should contain "--version"
And stdout should contain "--help"
And stdout should contain "Configuration:"
And stdout should contain "--profile"
And stdout should contain "--threads"
And stdout should contain "--core"
And stdout should contain "--level-cache"
And stdout should contain "--segment-speed-file"
And stdout should contain 18 lines
And stdout should contain 17 lines
And it should exit with code 1
Scenario: osrm-prepare - Help, short
When I run "osrm-prepare -h"
Scenario: osrm-contract - Help, short
When I run "osrm-contract -h"
Then stderr should be empty
And stdout should contain "osrm-prepare <input.osrm> [options]:"
And stdout should contain "osrm-contract <input.osrm> [options]:"
And stdout should contain "Options:"
And stdout should contain "--version"
And stdout should contain "--help"
And stdout should contain "Configuration:"
And stdout should contain "--profile"
And stdout should contain "--threads"
And stdout should contain "--core"
And stdout should contain "--level-cache"
And stdout should contain "--segment-speed-file"
And stdout should contain 18 lines
And stdout should contain 17 lines
And it should exit with code 0
Scenario: osrm-prepare - Help, long
When I run "osrm-prepare --help"
Scenario: osrm-contract - Help, long
When I run "osrm-contract --help"
Then stderr should be empty
And stdout should contain "osrm-prepare <input.osrm> [options]:"
And stdout should contain "osrm-contract <input.osrm> [options]:"
And stdout should contain "Options:"
And stdout should contain "--version"
And stdout should contain "--help"
And stdout should contain "Configuration:"
And stdout should contain "--profile"
And stdout should contain "--threads"
And stdout should contain "--core"
And stdout should contain "--level-cache"
And stdout should contain "--segment-speed-file"
And stdout should contain 18 lines
And stdout should contain 17 lines
And it should exit with code 0
@@ -1,11 +1,11 @@
@prepare @options @invalid
Feature: osrm-prepare command line options: invalid options
Feature: osrm-contract command line options: invalid options
Background:
Given the profile "testbot"
Scenario: osrm-prepare - Non-existing option
When I run "osrm-prepare --fly-me-to-the-moon"
Scenario: osrm-contract - Non-existing option
When I run "osrm-contract --fly-me-to-the-moon"
Then stdout should be empty
And stderr should contain "option"
And stderr should contain "fly-me-to-the-moon"
@@ -1,5 +1,5 @@
@prepare @options @version
Feature: osrm-prepare command line options: version
Feature: osrm-contract command line options: version
# the regex will match these two formats:
# v0.3.7.0 # this is the normal format when you build from a git clone
# -128-NOTFOUND # if you build from a shallow clone (used on Travis)
@@ -7,15 +7,15 @@ Feature: osrm-prepare command line options: version
Background:
Given the profile "testbot"
Scenario: osrm-prepare - Version, short
When I run "osrm-prepare --v"
Scenario: osrm-contract - Version, short
When I run "osrm-contract --v"
Then stderr should be empty
And stdout should contain 1 line
And stdout should contain /(v\d{1,2}\.\d{1,2}\.\d{1,2}|\w*-\d+-\w+)/
And it should exit with code 0
Scenario: osrm-prepare - Version, long
When I run "osrm-prepare --version"
Scenario: osrm-contract - Version, long
When I run "osrm-contract --version"
Then stderr should be empty
And stdout should contain 1 line
And stdout should contain /(v\d{1,2}\.\d{1,2}\.\d{1,2}|\w*-\d+-\w+)/