diff --git a/features/step_definitions/data.js b/features/step_definitions/data.js index 81bd42257..fdba9418a 100644 --- a/features/step_definitions/data.js +++ b/features/step_definitions/data.js @@ -8,7 +8,7 @@ var OSM = require('../lib/osm'); module.exports = function () { this.Given(/^the profile "([^"]*)"$/, (profile, callback) => { - this.profile = profile; + this.profile = this.OSRM_PROFILE || profile; this.profileFile = path.join(this.PROFILES_PATH, this.profile + '.lua'); callback(); }); diff --git a/features/support/env.js b/features/support/env.js index 5947afffa..9fdacc383 100644 --- a/features/support/env.js +++ b/features/support/env.js @@ -44,6 +44,8 @@ module.exports = function () { this.OSRM_PORT = process.env.OSRM_PORT && parseInt(process.env.OSRM_PORT) || 5000; this.HOST = 'http://127.0.0.1:' + this.OSRM_PORT; + + this.OSRM_PROFILE = process.env.PROFILE if (this.PLATFORM_WINDOWS) { this.TERMSIGNAL = 9; diff --git a/features/support/hooks.js b/features/support/hooks.js index f3c7fe10d..6b5185e9e 100644 --- a/features/support/hooks.js +++ b/features/support/hooks.js @@ -22,7 +22,7 @@ module.exports = function () { }); this.BeforeFeature((feature, callback) => { - this.profile = this.DEFAULT_PROFILE; + this.profile = this.OSRM_PROFILE || this.DEFAULT_PROFILE; this.profileFile = path.join(this.PROFILES_PATH, this.profile + '.lua'); this.setupFeatureCache(feature); callback();