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