Update linecoverage directory to linecoverage-report.

tools/provision.py: Create directory var/linecoverage-report.

tools/run-mypy: Update coverage dir to var/linecoverage-report.
This commit is contained in:
Taranjeet Singh 2016-07-16 20:14:41 +05:30 committed by Tim Abbott
parent 4d2cb3754c
commit 64332d8816
2 changed files with 5 additions and 2 deletions

View File

@ -32,6 +32,7 @@ LOG_DIR_PATH = os.path.join(VAR_DIR_PATH, 'log')
UPLOAD_DIR_PATH = os.path.join(VAR_DIR_PATH, 'uploads') 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')
if PY2: if PY2:
VENV_PATH = PY2_VENV_PATH VENV_PATH = PY2_VENV_PATH
@ -192,6 +193,8 @@ def main():
run(["mkdir", "-p", TEST_UPLOAD_DIR_PATH]) run(["mkdir", "-p", TEST_UPLOAD_DIR_PATH])
# create coverage directory`var/coverage` # create coverage directory`var/coverage`
run(["mkdir", "-p", COVERAGE_DIR_PATH]) run(["mkdir", "-p", COVERAGE_DIR_PATH])
# create linecoverage directory`var/linecoverage-report`
run(["mkdir", "-p", LINECOVERAGE_DIR_PATH])
if "--travis" in sys.argv: if "--travis" in sys.argv:
run(["tools/setup/install-phantomjs", "--travis"]) run(["tools/setup/install-phantomjs", "--travis"])

View File

@ -97,7 +97,7 @@ if py_version == 2:
extra_args.append("--py2") extra_args.append("--py2")
if args.linecoverage_report: if args.linecoverage_report:
extra_args.append("--linecoverage-report") extra_args.append("--linecoverage-report")
extra_args.append("linecoverage-report") extra_args.append("var/linecoverage-report")
if args.disallow_untyped_defs: if args.disallow_untyped_defs:
extra_args.append("--disallow-untyped-defs") extra_args.append("--disallow-untyped-defs")
@ -108,7 +108,7 @@ if python_files:
if args.linecoverage_report: if args.linecoverage_report:
# Move the coverage report to where coveralls will look for it. # Move the coverage report to where coveralls will look for it.
try: try:
os.rename('linecoverage-report/coverage.txt', '.coverage') os.rename('var/linecoverage-report/coverage.txt', '.coverage')
except OSError: except OSError:
# maybe mypy crashed; exit with its error code # maybe mypy crashed; exit with its error code
pass pass