Skip to content

Commit 6bd96f2

Browse files
committed
fix unlinking
1 parent 865c28f commit 6bd96f2

File tree

1 file changed

+29
-27
lines changed

1 file changed

+29
-27
lines changed

mx.graalpython/mx_graalpython.py

Lines changed: 29 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1221,31 +1221,31 @@ def python_coverage(args):
12211221
parser.add_argument('--truffle-upload-url', help='Format is like rsync: user@host:/directory', default=None)
12221222
args = parser.parse_args(args)
12231223

1224-
if args.jacoco:
1225-
jacoco_args = [
1226-
'--jacoco-whitelist-package', 'com.oracle.graal.python',
1227-
# '--jacoco-exclude-annotation', '@GeneratedBy',
1228-
]
1229-
mx.run_mx(jacoco_args + [
1230-
'--strict-compliance',
1231-
'--dynamicimports', '/compiler',
1232-
'--primary', 'gate',
1233-
'-B=--force-deprecation-as-warning-for-dependencies',
1234-
'--strict-mode',
1235-
'--tags', 'python-unittest,python-tagged-unittest,python-junit',
1236-
'--jacocout', 'html',
1237-
])
1238-
if mx.get_env("SONAR_HOST_URL", None):
1239-
mx.run_mx(jacoco_args + [
1240-
'sonarqube-upload',
1241-
'-Dsonar.host.url=%s' % mx.get_env("SONAR_HOST_URL"),
1242-
'-Dsonar.projectKey=com.oracle.graalvm.python',
1243-
'-Dsonar.projectName=GraalVM - Python',
1244-
'--exclude-generated',
1245-
])
1246-
mx.run_mx(jacoco_args + [
1247-
'coverage-upload',
1248-
])
1224+
# if args.jacoco:
1225+
# jacoco_args = [
1226+
# '--jacoco-whitelist-package', 'com.oracle.graal.python',
1227+
# # '--jacoco-exclude-annotation', '@GeneratedBy',
1228+
# ]
1229+
# mx.run_mx(jacoco_args + [
1230+
# '--strict-compliance',
1231+
# '--dynamicimports', '/compiler',
1232+
# '--primary', 'gate',
1233+
# '-B=--force-deprecation-as-warning-for-dependencies',
1234+
# '--strict-mode',
1235+
# '--tags', 'python-unittest,python-tagged-unittest,python-junit',
1236+
# '--jacocout', 'html',
1237+
# ])
1238+
# if mx.get_env("SONAR_HOST_URL", None):
1239+
# mx.run_mx(jacoco_args + [
1240+
# 'sonarqube-upload',
1241+
# '-Dsonar.host.url=%s' % mx.get_env("SONAR_HOST_URL"),
1242+
# '-Dsonar.projectKey=com.oracle.graalvm.python',
1243+
# '-Dsonar.projectName=GraalVM - Python',
1244+
# '--exclude-generated',
1245+
# ])
1246+
# mx.run_mx(jacoco_args + [
1247+
# 'coverage-upload',
1248+
# ])
12491249
if args.truffle:
12501250
executable = python_gvm()
12511251
variants = [
@@ -1259,13 +1259,15 @@ def python_coverage(args):
12591259
},
12601260
]
12611261
outputlcov = "coverage.lcov"
1262-
os.unlink(outputlcov)
1262+
if os.path.exists(outputlcov):
1263+
os.unlink(outputlcov)
12631264
cmdargs = ["lcov", "-o", outputlcov]
12641265
for kwds in variants:
12651266
variant_str = re.sub(r"[^a-zA-Z]", "_", repr(kwds))
12661267
for pattern in ["py"]:
12671268
outfile = os.path.join(SUITE.dir, "coverage_%s_%s.lcov" % (variant_str, pattern))
1268-
os.unlink(outfile)
1269+
if os.path.exists(outfile):
1270+
os.unlink(outfile)
12691271
extra_args = [
12701272
"--coverage",
12711273
"--coverage.TrackInternal",

0 commit comments

Comments
 (0)