Skip to content

Commit 0208d3c

Browse files
committed
Add uploading tags via scp
1 parent 3dad32b commit 0208d3c

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

mx.graalpython/mx_graalpython.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,8 +220,16 @@ def python3_unittests(args):
220220

221221
def retag_unittests(args):
222222
"""run the cPython stdlib unittests"""
223+
parser = ArgumentParser('mx python-retag-unittests')
224+
parser.add_argument('--upload-results-to')
225+
parsed_args, remaining_args = parser.parse_known_args(args)
223226
with set_env(ENABLE_CPYTHON_TAGGED_UNITTESTS="true"):
224-
python(["graalpython/com.oracle.graal.python.test/src/tests/test_tagged_unittests.py", '--retag'] + args)
227+
python(["graalpython/com.oracle.graal.python.test/src/tests/test_tagged_unittests.py", '--retag'] + remaining_args)
228+
if parsed_args.upload_results_to:
229+
with tempfile.TemporaryDirectory(prefix='graalpython-retagger-') as d:
230+
filename = os.path.join(d, 'unittest-tags-{}.tar.bz2'.format(sys.platform))
231+
mx.run(['tar', 'cJf', filename, 'graalpython/com.oracle.graal.python.test/src/tests/unittest_tags'])
232+
mx.run(['scp', filename, parsed_args.upload_results_to.rstrip('/') + '/'])
225233

226234

227235
AOT_INCOMPATIBLE_TESTS = ["test_interop.py"]

0 commit comments

Comments
 (0)