Add MLD testing to cucumber tests
This commit is contained in:
@@ -23,6 +23,16 @@ module.exports = function () {
|
||||
callback();
|
||||
});
|
||||
|
||||
this.Given(/^the partition extra arguments "(.*?)"$/, (args, callback) => {
|
||||
this.partitionArgs = this.expandOptions(args);
|
||||
callback();
|
||||
});
|
||||
|
||||
this.Given(/^the customize extra arguments "(.*?)"$/, (args, callback) => {
|
||||
this.customizeArgs = this.expandOptions(args);
|
||||
callback();
|
||||
});
|
||||
|
||||
this.Given(/^a grid size of ([0-9.]+) meters$/, (meters, callback) => {
|
||||
this.setGridSize(meters);
|
||||
callback();
|
||||
@@ -259,12 +269,12 @@ module.exports = function () {
|
||||
this.writeAndLinkOSM(callback);
|
||||
});
|
||||
|
||||
this.Given(/^the data has been extracted$/, (callback) => {
|
||||
this.Given(/^the data has been (extract|contract)ed$/, (step, callback) => {
|
||||
this.reprocess(callback);
|
||||
});
|
||||
|
||||
this.Given(/^the data has been contracted$/, (callback) => {
|
||||
this.reprocess(callback);
|
||||
this.Given(/^the data has been (partition|customiz)ed$/, (step, callback) => {
|
||||
this.reprocessMLD(callback);
|
||||
});
|
||||
|
||||
this.Given(/^osrm\-routed is stopped$/, (callback) => {
|
||||
|
||||
@@ -25,32 +25,16 @@ module.exports = function () {
|
||||
this.runAndSafeOutput('osrm-routed', options, callback);
|
||||
});
|
||||
|
||||
this.When(/^I run "osrm\-extract\s?(.*?)"$/, (options, callback) => {
|
||||
const stamp = this.processedCacheFile + '.extract';
|
||||
this.runAndSafeOutput('osrm-extract', options, (err) => {
|
||||
this.When(/^I run "osrm\-(extract|contract|partition|customize)\s?(.*?)"$/, (binary, options, callback) => {
|
||||
const stamp = this.processedCacheFile + '.stamp_' + binary;
|
||||
this.runAndSafeOutput('osrm-' + binary, options, (err) => {
|
||||
if (err) return callback(err);
|
||||
fs.writeFile(stamp, 'ok', callback);
|
||||
});
|
||||
});
|
||||
|
||||
this.When(/^I run "osrm\-contract\s?(.*?)"$/, (options, callback) => {
|
||||
const stamp = this.processedCacheFile + '.contract';
|
||||
this.runAndSafeOutput('osrm-contract', options, (err) => {
|
||||
if (err) return callback(err);
|
||||
fs.writeFile(stamp, 'ok', callback);
|
||||
});
|
||||
});
|
||||
|
||||
this.When(/^I try to run "osrm\-routed\s?(.*?)"$/, (options, callback) => {
|
||||
this.runAndSafeOutput('osrm-routed', options, () => { callback(); });
|
||||
});
|
||||
|
||||
this.When(/^I try to run "osrm\-extract\s?(.*?)"$/, (options, callback) => {
|
||||
this.runAndSafeOutput('osrm-extract', options, () => { callback(); });
|
||||
});
|
||||
|
||||
this.When(/^I try to run "osrm\-contract\s?(.*?)"$/, (options, callback) => {
|
||||
this.runAndSafeOutput('osrm-contract', options, () => { callback(); });
|
||||
this.When(/^I try to run "(osrm\-[a-z]+)\s?(.*?)"$/, (binary, options, callback) => {
|
||||
this.runAndSafeOutput(binary, options, () => { callback(); });
|
||||
});
|
||||
|
||||
this.When(/^I run "osrm\-datastore\s?(.*?)"(?: with input "([^"]*)")?$/, (options, input, callback) => {
|
||||
|
||||
Reference in New Issue
Block a user