Merge "Trigger tox from package.json, if necessary."

This commit is contained in:
Jenkins 2015-06-06 02:37:15 +00:00 committed by Gerrit Code Review
commit 5fa6f0f0fa
3 changed files with 45 additions and 6 deletions

View File

@ -1,7 +1,26 @@
module.exports = function(config){
var fs = require('fs');
var path = require('path');
// Path to xstatic pkg path.
var xstaticPath = '../../.venv/lib/python2.7/site-packages/xstatic/pkg/';
module.exports = function(config){
var xstaticPath;
var base_paths = [
'./.venv',
'./.tox/py27'
]
for( var i = 0; i < base_paths.length; i++) {
var base_path = path.resolve(base_paths[i]);
if( fs.existsSync(base_path) ) {
xstaticPath = base_path + '/lib/python2.7/site-packages/xstatic/pkg/';
break;
}
}
if( !xstaticPath) {
console.error("xStatic libraries not found, please set up venv");
process.exit(1);
}
config.set({

View File

@ -1,7 +1,26 @@
module.exports = function(config){
var fs = require('fs');
var path = require('path');
// Path to xstatic pkg path.
var xstaticPath = '../../.venv/lib/python2.7/site-packages/xstatic/pkg/';
module.exports = function(config){
var xstaticPath;
var base_paths = [
'./.venv',
'./.tox/py27'
]
for( var i = 0; i < base_paths.length; i++) {
var base_path = path.resolve(base_paths[i]);
if( fs.existsSync(base_path) ) {
xstaticPath = base_path + '/lib/python2.7/site-packages/xstatic/pkg/';
break;
}
}
if( !xstaticPath) {
console.error("xStatic libraries not found, please set up venv");
process.exit(1);
}
config.set({

View File

@ -17,6 +17,7 @@
"phantomjs": "1.9.17"
},
"scripts": {
"postinstall": "if [ ! -d .venv ]; then tox -epy27 --notest; fi",
"test": "karma start horizon/karma.conf.js --single-run && karma start openstack_dashboard/karma.conf.js --single-run"
},
"dependencies": {}