mirror of https://github.com/zulip/zulip.git
mypy: Remove logic for linecoverage report.
This commit is contained in:
parent
ceae1a1c5f
commit
95f1f1d363
|
@ -42,7 +42,6 @@ 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')
|
|
||||||
NODE_TEST_COVERAGE_DIR_PATH = os.path.join(VAR_DIR_PATH, 'node-coverage')
|
NODE_TEST_COVERAGE_DIR_PATH = os.path.join(VAR_DIR_PATH, 'node-coverage')
|
||||||
|
|
||||||
is_travis = 'TRAVIS' in os.environ
|
is_travis = 'TRAVIS' in os.environ
|
||||||
|
@ -281,8 +280,6 @@ def main(options):
|
||||||
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])
|
|
||||||
# create linecoverage directory`var/node-coverage`
|
# create linecoverage directory`var/node-coverage`
|
||||||
run(["mkdir", "-p", NODE_TEST_COVERAGE_DIR_PATH])
|
run(["mkdir", "-p", NODE_TEST_COVERAGE_DIR_PATH])
|
||||||
|
|
||||||
|
|
|
@ -35,8 +35,6 @@ parser.add_argument('-a', '--all', action='store_true',
|
||||||
help="check all files, bypassing the default exclude list")
|
help="check all files, bypassing the default exclude list")
|
||||||
parser.add_argument('--force', action="store_true",
|
parser.add_argument('--force', action="store_true",
|
||||||
help="run tests despite possible provisioning problems")
|
help="run tests despite possible provisioning problems")
|
||||||
parser.add_argument('--linecoverage-report', action='store_true',
|
|
||||||
help="emit a coverage report under var/")
|
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
|
|
||||||
if not args.force:
|
if not args.force:
|
||||||
|
@ -77,9 +75,6 @@ if not python_files and not pyi_files:
|
||||||
sys.exit(0)
|
sys.exit(0)
|
||||||
|
|
||||||
extra_args = []
|
extra_args = []
|
||||||
if args.linecoverage_report:
|
|
||||||
extra_args.append("--linecoverage-report")
|
|
||||||
extra_args.append("var/linecoverage-report")
|
|
||||||
if args.quick:
|
if args.quick:
|
||||||
extra_args.append("--quick")
|
extra_args.append("--quick")
|
||||||
|
|
||||||
|
@ -89,12 +84,4 @@ if args.daemon:
|
||||||
else:
|
else:
|
||||||
rc = subprocess.call([mypy_command] + mypy_args)
|
rc = subprocess.call([mypy_command] + mypy_args)
|
||||||
|
|
||||||
if args.linecoverage_report:
|
|
||||||
# Move the coverage report to where codecov will look for it.
|
|
||||||
try:
|
|
||||||
os.rename('var/linecoverage-report/coverage.txt', 'var/.coverage')
|
|
||||||
except OSError:
|
|
||||||
# maybe mypy crashed; exit with its error code
|
|
||||||
pass
|
|
||||||
|
|
||||||
sys.exit(rc)
|
sys.exit(rc)
|
||||||
|
|
|
@ -13,7 +13,7 @@ set -x
|
||||||
# We run mypy after the backend tests so we get output from the
|
# We run mypy after the backend tests so we get output from the
|
||||||
# backend tests, which tend to uncover more serious problems, first.
|
# backend tests, which tend to uncover more serious problems, first.
|
||||||
./tools/run-mypy --version
|
./tools/run-mypy --version
|
||||||
./tools/run-mypy --linecoverage-report
|
./tools/run-mypy
|
||||||
|
|
||||||
./tools/test-migrations
|
./tools/test-migrations
|
||||||
./tools/optimize-svg
|
./tools/optimize-svg
|
||||||
|
|
Loading…
Reference in New Issue