provision.py: Create dir var/node-coverage for js test coverage.

test-js-with-node: Move istanbul test coverage to var/node-coverage.

This commit moves js test coverage generated through istanbul to
var/node-coverage.
This commit is contained in:
Taranjeet Singh 2016-08-11 22:03:52 +05:30 committed by Tim Abbott
parent b36dfc0395
commit 4350b6e0fb
2 changed files with 4 additions and 1 deletions

View File

@ -33,6 +33,7 @@ UPLOAD_DIR_PATH = os.path.join(VAR_DIR_PATH, 'uploads')
TEST_UPLOAD_DIR_PATH = os.path.join(VAR_DIR_PATH, 'test_uploads') TEST_UPLOAD_DIR_PATH = os.path.join(VAR_DIR_PATH, 'test_uploads')
COVERAGE_DIR_PATH = os.path.join(VAR_DIR_PATH, 'coverage') COVERAGE_DIR_PATH = os.path.join(VAR_DIR_PATH, 'coverage')
LINECOVERAGE_DIR_PATH = os.path.join(VAR_DIR_PATH, 'linecoverage-report') LINECOVERAGE_DIR_PATH = os.path.join(VAR_DIR_PATH, 'linecoverage-report')
NODE_TEST_COVERAGE_DIR_PATH = os.path.join(VAR_DIR_PATH, 'node-coverage')
if PY2: if PY2:
VENV_PATH = PY2_VENV_PATH VENV_PATH = PY2_VENV_PATH
@ -206,6 +207,8 @@ def main():
run(["mkdir", "-p", COVERAGE_DIR_PATH]) run(["mkdir", "-p", COVERAGE_DIR_PATH])
# create linecoverage directory`var/linecoverage-report` # create linecoverage directory`var/linecoverage-report`
run(["mkdir", "-p", LINECOVERAGE_DIR_PATH]) run(["mkdir", "-p", LINECOVERAGE_DIR_PATH])
# create linecoverage directory`var/node-coverage`
run(["mkdir", "-p", NODE_TEST_COVERAGE_DIR_PATH])
if TRAVIS: if TRAVIS:
run(["tools/setup/install-phantomjs", "--travis"]) run(["tools/setup/install-phantomjs", "--travis"])

View File

@ -12,7 +12,7 @@ ret=0
if [ "$1" = "cover" ]; then if [ "$1" = "cover" ]; then
# Run a coverage test with Istanbul. # Run a coverage test with Istanbul.
istanbul cover "$INDEX_JS" || ret=1; istanbul cover "$INDEX_JS" --dir var/node-coverage || ret=1;
elif [ "$1" = "-h" -o "$1" = "--help" ]; then elif [ "$1" = "-h" -o "$1" = "--help" ]; then
echo "Usage: echo "Usage: