Skip to content

Commit 4b6f378

Browse files
committed
run retagging with svm so it's a bit faster
1 parent 4da6372 commit 4b6f378

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

graalpython/com.oracle.graal.python.test/src/tests/test_tagged_unittests.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,14 +100,15 @@ def fun():
100100
else:
101101
glob_pattern = os.path.join(os.path.dirname(test.__file__), "test_*.py")
102102

103-
for testfile in glob.glob(glob_pattern):
103+
testfiles = glob.glob(glob_pattern)
104+
for idx, testfile in enumerate(testfiles):
104105
testfile_stem = os.path.splitext(os.path.basename(testfile))[0]
105106
testmod = "test." + testfile_stem
106107
cmd = ["/usr/bin/timeout", "-s", "9", "60"] + executable + ["-m"]
107108
tagfile = os.path.join(TAGS_DIR, testfile_stem + ".txt")
108109
test_selectors = working_selectors(tagfile)
109110

110-
print("Testing ", testmod)
111+
print("[%d/%d] Testing %s" %(idx, len(testfiles), testmod))
111112
cmd += ["unittest", "-v"]
112113
for selector in test_selectors:
113114
cmd += ["-k", selector]

mx.graalpython/mx_graalpython.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ def retag_unittests(args):
188188
"""run the cPython stdlib unittests"""
189189
os.environ["ENABLE_CPYTHON_TAGGED_UNITTESTS"] = "true"
190190
try:
191-
python(["graalpython/com.oracle.graal.python.test/src/tests/test_tagged_unittests.py"] + args)
191+
python_svm(["graalpython/com.oracle.graal.python.test/src/tests/test_tagged_unittests.py"] + args)
192192
finally:
193193
del os.environ["ENABLE_CPYTHON_TAGGED_UNITTESTS"]
194194

@@ -265,7 +265,7 @@ def python_svm(args):
265265
mx.run_mx(_SVM_ARGS + ["build"])
266266
out = mx.OutputCapture()
267267
mx.run_mx(_SVM_ARGS + ["graalvm-home"], out=mx.TeeOutputCapture(out))
268-
svm_image = os.path.join(out.data.strip(), "bin", "graalpython")
268+
svm_image = os.path.join(out.data.strip(), "bin", "graalpython").split("\n")[-1].strip()
269269
mx.log(svm_image)
270270
mx.run([svm_image] + args)
271271
return svm_image

0 commit comments

Comments
 (0)