From 64332d881665b56a1644b861daf3d56a40d1cb22 Mon Sep 17 00:00:00 2001 From: Taranjeet Singh Date: Sat, 16 Jul 2016 20:14:41 +0530 Subject: [PATCH] Update linecoverage directory to linecoverage-report. tools/provision.py: Create directory var/linecoverage-report. tools/run-mypy: Update coverage dir to var/linecoverage-report. --- tools/provision.py | 3 +++ tools/run-mypy | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/tools/provision.py b/tools/provision.py index b4011719fc..04fa33da58 100755 --- a/tools/provision.py +++ b/tools/provision.py @@ -32,6 +32,7 @@ LOG_DIR_PATH = os.path.join(VAR_DIR_PATH, 'log') 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') if PY2: VENV_PATH = PY2_VENV_PATH @@ -192,6 +193,8 @@ def main(): run(["mkdir", "-p", TEST_UPLOAD_DIR_PATH]) # create coverage directory`var/coverage` run(["mkdir", "-p", COVERAGE_DIR_PATH]) + # create linecoverage directory`var/linecoverage-report` + run(["mkdir", "-p", LINECOVERAGE_DIR_PATH]) if "--travis" in sys.argv: run(["tools/setup/install-phantomjs", "--travis"]) diff --git a/tools/run-mypy b/tools/run-mypy index 89de491b45..53410b3606 100755 --- a/tools/run-mypy +++ b/tools/run-mypy @@ -97,7 +97,7 @@ if py_version == 2: extra_args.append("--py2") if args.linecoverage_report: extra_args.append("--linecoverage-report") - extra_args.append("linecoverage-report") + extra_args.append("var/linecoverage-report") if args.disallow_untyped_defs: extra_args.append("--disallow-untyped-defs") @@ -108,7 +108,7 @@ if python_files: if args.linecoverage_report: # Move the coverage report to where coveralls will look for it. try: - os.rename('linecoverage-report/coverage.txt', '.coverage') + os.rename('var/linecoverage-report/coverage.txt', '.coverage') except OSError: # maybe mypy crashed; exit with its error code pass