Skip to content

Commit 28e66be

Browse files
committed
Skip empty lcov files
1 parent 939ef4e commit 28e66be

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

mx.graalpython/mx_graalpython.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1457,6 +1457,7 @@ def python_coverage(args):
14571457
env = os.environ.copy()
14581458
env['GRAAL_PYTHON_ARGS'] = " ".join(extra_args)
14591459
# run all our tests in the dev-home, so that lcov has consistent paths
1460+
# TODO tests with virtualenv won't pick this up
14601461
env['PYTHONPATH'] = os.path.join(_dev_pythonhome(), 'lib-python/3')
14611462
if kwds.pop("tagged", False):
14621463
run_tagged_unittests(executable, env=env)
@@ -1500,7 +1501,7 @@ def python_coverage(args):
15001501

15011502
# merge all generated lcov files
15021503
for f in os.listdir(SUITE.dir):
1503-
if f.endswith(".lcov"):
1504+
if f.endswith(".lcov") and os.path.getsize(f):
15041505
cmdargs += ["-a", f]
15051506

15061507
mx.run(cmdargs)

0 commit comments

Comments
 (0)