diff options
author | Michael Krotscheck <krotscheck@gmail.com> | 2015-06-03 16:16:18 -0700 |
---|---|---|
committer | Michael Krotscheck <krotscheck@gmail.com> | 2015-06-05 08:16:22 -0700 |
commit | 76ea1f18374b6a4b9694abaf5f2a4a8af1375722 (patch) | |
tree | 7c5437616bfeb6d735e6ce908a441b0bfc02582b /package.json | |
parent | 4ffd55c7c92d805e3dbb8ae5814eff5309113c5c (diff) | |
download | horizon-76ea1f18374b6a4b9694abaf5f2a4a8af1375722.tar.gz |
Trigger tox from package.json, if necessary.
This patch adds several fixes to improve karma test handling.
* A postinstall hook was added to package.json, which tests for
the existence of .venv. If it is not found, it will invoke
tox -e py27 --notest.
* Both karma.conf files were taught to automatically detect the
directories in which the xstatic dependencies might live, and
pick the appropriate directory.
postinstall was chosen, because setting up a virtual environment
is likely to be useful for more than one type of npm job.
Change-Id: I822cb020bd8b2ca8d4f994b9734af5636e4bd144
Diffstat (limited to 'package.json')
-rw-r--r-- | package.json | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/package.json b/package.json index 4c283bfa8..a431e2458 100644 --- a/package.json +++ b/package.json @@ -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": {} |