cuke: test file options
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
@routing @options @files
|
||||
Feature: Command line options: files
|
||||
Normally when launching osrm-routed, it will keep running as a server until it's shut down.
|
||||
For testing program options, the --trial option is used, which causes osrm-routed to quit
|
||||
immediately after initialization. This makes testing easier and faster.
|
||||
|
||||
The {base} part of the options to osrm-routed will be expanded to the actual base path of
|
||||
the preprocessed file.
|
||||
|
||||
Background:
|
||||
Given the profile "testbot"
|
||||
And the node map
|
||||
| a | b |
|
||||
And the ways
|
||||
| nodes |
|
||||
| ab |
|
||||
And I preprocess data
|
||||
|
||||
Scenario: Passing base file
|
||||
When I run "osrm-routed {base}.osrm --trial"
|
||||
Then stdout should contain /^\[info\] starting up engines/
|
||||
And stdout should contain /\d{1,2}\.\d{1,2}\.\d{1,2}/
|
||||
And stdout should contain /compiled at/
|
||||
And stdout should contain /^\[info\] loaded plugin: viaroute/
|
||||
And stdout should contain /^\[server\] trial run/
|
||||
And stdout should contain /^\[server\] shutdown completed/
|
||||
And it should exit with code 0
|
||||
@@ -4,8 +4,8 @@ Feature: Command line options: help
|
||||
Background:
|
||||
Given the profile "testbot"
|
||||
|
||||
Scenario: No options should show help
|
||||
When I run "osrm-routed"
|
||||
Scenario Outline: Help
|
||||
When I run "osrm-routed <program_options>"
|
||||
Then stderr should be empty
|
||||
And stdout should contain "osrm-routed <base.osrm> [<options>]:"
|
||||
And stdout should contain "Options:"
|
||||
@@ -27,48 +27,8 @@ Feature: Command line options: help
|
||||
And stdout should contain "--sharedmemory"
|
||||
And it should exit with code 0
|
||||
|
||||
Scenario: Help, short
|
||||
When I run "osrm-routed -h"
|
||||
Then stderr should be empty
|
||||
And stdout should contain "osrm-routed <base.osrm> [<options>]:"
|
||||
And stdout should contain "Options:"
|
||||
And stdout should contain "--version"
|
||||
And stdout should contain "--help"
|
||||
And stdout should contain "--config"
|
||||
And stdout should contain "--trial"
|
||||
And stdout should contain "Configuration:"
|
||||
And stdout should contain "--hsgrdata arg"
|
||||
And stdout should contain "--nodesdata arg"
|
||||
And stdout should contain "--edgesdata arg"
|
||||
And stdout should contain "--ramindex arg"
|
||||
And stdout should contain "--fileindex arg"
|
||||
And stdout should contain "--namesdata arg"
|
||||
And stdout should contain "--timestamp arg"
|
||||
And stdout should contain "--ip"
|
||||
And stdout should contain "--port"
|
||||
And stdout should contain "--threads"
|
||||
And stdout should contain "--sharedmemory"
|
||||
And it should exit with code 0
|
||||
|
||||
Scenario: Help, long
|
||||
When I run "osrm-routed --help"
|
||||
Then stderr should be empty
|
||||
And stdout should contain "osrm-routed <base.osrm> [<options>]:"
|
||||
And stdout should contain "Options:"
|
||||
And stdout should contain "--version"
|
||||
And stdout should contain "--help"
|
||||
And stdout should contain "--config"
|
||||
And stdout should contain "--trial"
|
||||
And stdout should contain "Configuration:"
|
||||
And stdout should contain "--hsgrdata arg"
|
||||
And stdout should contain "--nodesdata arg"
|
||||
And stdout should contain "--edgesdata arg"
|
||||
And stdout should contain "--ramindex arg"
|
||||
And stdout should contain "--fileindex arg"
|
||||
And stdout should contain "--namesdata arg"
|
||||
And stdout should contain "--timestamp arg"
|
||||
And stdout should contain "--ip"
|
||||
And stdout should contain "--port"
|
||||
And stdout should contain "--threads"
|
||||
And stdout should contain "--sharedmemory"
|
||||
And it should exit with code 0
|
||||
Examples:
|
||||
| program_options |
|
||||
| |
|
||||
| -h |
|
||||
| --help |
|
||||
@@ -16,5 +16,4 @@ Feature: Command line options: invalid options
|
||||
Then stdout should contain "over-the-rainbow.osrm"
|
||||
And stderr should contain "exception"
|
||||
And stderr should contain "does not exist"
|
||||
And it should exit with code 255
|
||||
|
||||
And it should exit with code 255
|
||||
@@ -3,15 +3,15 @@ Feature: Command line options: version
|
||||
|
||||
Background:
|
||||
Given the profile "testbot"
|
||||
|
||||
Scenario: Version, short
|
||||
When I run "osrm-routed -v"
|
||||
|
||||
Scenario Outline: Version
|
||||
When I run "osrm-routed <program_options>"
|
||||
Then stderr should be empty
|
||||
And stdout should contain " v0."
|
||||
And stdout should contain 1 line
|
||||
And stdout should contain /v\d{1,2}\.\d{1,2}\.\d{1,2}/
|
||||
And it should exit with code 0
|
||||
|
||||
Scenario: Version, long
|
||||
When I run "osrm-routed --version"
|
||||
Then stderr should be empty
|
||||
And stdout should contain " v0."
|
||||
And it should exit with code 0
|
||||
Examples:
|
||||
| program_options |
|
||||
| -v |
|
||||
| --version |
|
||||
|
||||
Reference in New Issue
Block a user