mirror of https://github.com/zulip/zulip.git
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:
parent
4d2cb3754c
commit
64332d8816
|
@ -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"])
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue