Skip to content

Commit cca28f3

Browse files
committed
[GR-61088] Make sure we run the TCK tests through the Truffle suite command.
PullRequest: graalpython/3641
2 parents 7d72437 + a84c2de commit cca28f3

File tree

3 files changed

+22
-10
lines changed

3 files changed

+22
-10
lines changed

ci.jsonnet

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{ "overlay": "a2c662481228644c2e37d5adac1219bb2778eea1" }
1+
{ "overlay": "2c2a0d17556e07bfd9edcf91b9b6716d3966dc83" }

mx.graalpython/mx_graalpython.py

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,7 @@ def _dev_pythonhome():
376376

377377
def punittest(ars, report=False):
378378
"""
379-
Runs GraalPython junit tests, TCK, and memory leak tests, which can be skipped using --no-leak-tests.
379+
Runs GraalPython junit tests and memory leak tests, which can be skipped using --no-leak-tests.
380380
Pass --regex to further filter the junit and TSK tests. GraalPy tests are always run in two configurations:
381381
with language home on filesystem and with language home served from the Truffle resources.
382382
"""
@@ -407,9 +407,6 @@ def __str__(self):
407407
configs += [
408408
TestConfig("junit", vm_args + graalpy_tests + args, True),
409409
TestConfig("junit", vm_args + graalpy_tests + args, False),
410-
# TCK suite is not compatible with the PythonMxUnittestConfig,
411-
# so it must have its own run and the useResources config is ignored
412-
TestConfig("tck", vm_args + ['com.oracle.truffle.tck.tests'] + args, False),
413410
]
414411
if mx.is_linux():
415412
# see GR-60656 and GR-60658 for what's missing in darwin and windows support
@@ -1207,7 +1204,7 @@ def graalpython_gate_runner(args, tasks):
12071204
"--verbose",
12081205
"--no-leak-tests",
12091206
"--regex",
1210-
r'((com\.oracle\.truffle\.tck\.tests)|(graal\.python\.test\.integration)|(graal\.python\.test\.(builtin|interop|util)))'
1207+
r'((graal\.python\.test\.integration)|(graal\.python\.test\.(builtin|interop|util)))'
12111208
],
12121209
report=True
12131210
)
@@ -1221,6 +1218,21 @@ def graalpython_gate_runner(args, tasks):
12211218
punittest(['--verbose', '--no-leak-tests', '--regex', 'com.oracle.graal.python.test.advanced.ExclusionsTest'])
12221219
finally:
12231220
jdk.java_args_pfx = prev
1221+
if report():
1222+
tmpfile = tempfile.NamedTemporaryFile(delete=False, suffix='.json.gz')
1223+
try:
1224+
# Cannot use context manager because windows doesn't allow
1225+
# make_test_report to read the file while it is open for
1226+
# writing
1227+
mx.command_function('tck')([f'--json-results={tmpfile.name}'])
1228+
mx_gate.make_test_report(tmpfile.name, GraalPythonTags.junit + "-TCK")
1229+
finally:
1230+
try:
1231+
os.unlink(tmpfile.name)
1232+
except:
1233+
pass # Sometimes this fails on windows
1234+
else:
1235+
mx.command_function('tck')()
12241236

12251237
# JUnit tests with Maven
12261238
with Task('GraalPython integration JUnit with Maven', tasks, tags=[GraalPythonTags.junit_maven]) as task:

mx.graalpython/suite.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,31 +45,31 @@
4545
},
4646
{
4747
"name": "sdk",
48-
"version": "d7d4ddbefaac211de2fbfe6e4a8ee8bbdfc2affc",
48+
"version": "999329767ba5537fd1595bc153b5dbe266f66062",
4949
"subdir": True,
5050
"urls": [
5151
{"url": "https://github.com/oracle/graal", "kind": "git"},
5252
]
5353
},
5454
{
5555
"name": "tools",
56-
"version": "d7d4ddbefaac211de2fbfe6e4a8ee8bbdfc2affc",
56+
"version": "999329767ba5537fd1595bc153b5dbe266f66062",
5757
"subdir": True,
5858
"urls": [
5959
{"url": "https://github.com/oracle/graal", "kind": "git"},
6060
],
6161
},
6262
{
6363
"name": "sulong",
64-
"version": "d7d4ddbefaac211de2fbfe6e4a8ee8bbdfc2affc",
64+
"version": "999329767ba5537fd1595bc153b5dbe266f66062",
6565
"subdir": True,
6666
"urls": [
6767
{"url": "https://github.com/oracle/graal", "kind": "git"},
6868
]
6969
},
7070
{
7171
"name": "regex",
72-
"version": "d7d4ddbefaac211de2fbfe6e4a8ee8bbdfc2affc",
72+
"version": "999329767ba5537fd1595bc153b5dbe266f66062",
7373
"subdir": True,
7474
"urls": [
7575
{"url": "https://github.com/oracle/graal", "kind": "git"},

0 commit comments

Comments
 (0)