summaryrefslogtreecommitdiff
path: root/openstack_dashboard/karma.conf.js
diff options
context:
space:
mode:
authorRob Cresswell <robert.cresswell@outlook.com>2016-10-06 14:27:22 +0100
committerRob Cresswell <robert.cresswell@outlook.com>2016-11-30 20:38:59 +0000
commit36d1d1ac682c75167e5fe054f16eefe64988e3cf (patch)
tree9d29cfdb1bac5f33c89b6a47436287c505e7e95d /openstack_dashboard/karma.conf.js
parent2394397bfd258fe584cc565a924e4dd216f6b224 (diff)
downloadhorizon-36d1d1ac682c75167e5fe054f16eefe64988e3cf.tar.gz
Refactor tox & update docs
- Updated tox envlist, so just running `tox` from the CLI will now run all voting gate tests - Reduce duplicated definitions and commands - Remove any reliance on run_tests within tox - Removes all doc references to run_tests.sh, and replaces them with their tox equivalent. Where necessary, language around the tox commands has been altered or extended so that it makes sense and is consistent with other parts of the docs. Also adds a new "Test Environment" list to the docs, so that newcomers do not have to piece together CLI commands and their cryptic extensions from tox.ini - Move the inline shell scripting to its own file. Also fixes a bug when passing args, since the logic assumed you were attempting a subset test run (try `tox -e py27 -- --pdb` on master to compare) - Moved translation tooling from run_tests to manage.py, w/ help text and arg restrictions. This is much more flexible so that plugins can use it without having to copy commands, but still defaults to exactly the same parameters/behaviour from run_tests. Docs updated appropriately. - Removed npm/karma strange reliance on either .venv or tox/py27. Now it only uses tox/npm. Change-Id: I883f885bd424955d39ddcfde5ba396a88cfc041e Implements: blueprint enhance-tox Closes-Bug: 1638672
Diffstat (limited to 'openstack_dashboard/karma.conf.js')
-rw-r--r--openstack_dashboard/karma.conf.js19
1 files changed, 5 insertions, 14 deletions
diff --git a/openstack_dashboard/karma.conf.js b/openstack_dashboard/karma.conf.js
index 0b91931f0..e0acf2c52 100644
--- a/openstack_dashboard/karma.conf.js
+++ b/openstack_dashboard/karma.conf.js
@@ -20,23 +20,14 @@ var fs = require('fs');
var path = require('path');
module.exports = function (config) {
- var xstaticPath;
- var basePaths = [
- './.venv',
- './.tox/py27'
- ];
-
- for (var i = 0; i < basePaths.length; i++) {
- var basePath = path.resolve(basePaths[i]);
-
- if (fs.existsSync(basePath)) {
- xstaticPath = basePath + '/lib/python2.7/site-packages/xstatic/pkg/';
- break;
- }
+ var xstaticPath = path.resolve('./.tox/npm');
+
+ if (fs.existsSync(xstaticPath)) {
+ xstaticPath += '/lib/python2.7/site-packages/xstatic/pkg/';
}
if (!xstaticPath) {
- console.error('xStatic libraries not found, please set up venv');
+ console.error('xStatic libraries not found, please run `tox -e npm`');
process.exit(1);
}