From 4350b6e0fb28b7f04fd4e847232e37915b756f22 Mon Sep 17 00:00:00 2001 From: Taranjeet Singh Date: Thu, 11 Aug 2016 22:03:52 +0530 Subject: [PATCH] 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. --- tools/provision.py | 3 +++ tools/test-js-with-node | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/tools/provision.py b/tools/provision.py index bef362b7c1..95e199c0ff 100755 --- a/tools/provision.py +++ b/tools/provision.py @@ -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') COVERAGE_DIR_PATH = os.path.join(VAR_DIR_PATH, 'coverage') 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: VENV_PATH = PY2_VENV_PATH @@ -206,6 +207,8 @@ def main(): run(["mkdir", "-p", COVERAGE_DIR_PATH]) # create linecoverage directory`var/linecoverage-report` run(["mkdir", "-p", LINECOVERAGE_DIR_PATH]) + # create linecoverage directory`var/node-coverage` + run(["mkdir", "-p", NODE_TEST_COVERAGE_DIR_PATH]) if TRAVIS: run(["tools/setup/install-phantomjs", "--travis"]) diff --git a/tools/test-js-with-node b/tools/test-js-with-node index 8366e07bdb..88b45e5faf 100755 --- a/tools/test-js-with-node +++ b/tools/test-js-with-node @@ -12,7 +12,7 @@ ret=0 if [ "$1" = "cover" ]; then # 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 echo "Usage: