set OSRM_PROFILE to force profile when running cuke tests

This commit is contained in:
Emil Tin 2017-09-18 16:18:07 +02:00 committed by Patrick Niklaus
parent dba825d829
commit 999211ed9c
3 changed files with 4 additions and 2 deletions

View File

@ -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();
});

View File

@ -45,6 +45,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;
this.EXE = '.exe';

View File

@ -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();