]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-109276: libregrtest: WASM use filename for JSON (#109340)
authorVictor Stinner <vstinner@python.org>
Tue, 12 Sep 2023 22:41:25 +0000 (00:41 +0200)
committerGitHub <noreply@github.com>
Tue, 12 Sep 2023 22:41:25 +0000 (00:41 +0200)
commit75cdd9a904bbed9ac3bf02ef53b1c4c58aeee4d0
tree5534259955c57c016c2fb18fc20aef3d2beb1bbd
parent5dcbbd8861e618488d95416dee8ea94577e3f4f0
gh-109276: libregrtest: WASM use filename for JSON (#109340)

On Emscripten and WASI platforms, or if --python command line option
is used, libregrtest now uses a filename for the JSON file.

Emscripten and WASI buildbot workers run the main test process with a
different Python (Linux) which spawns Emscripten/WASI processes using
the command specified in --python command line option. Passing a file
descriptor from the parent process to the child process doesn't work
in this case.

* Add JsonFile and JsonFileType classes
* Add RunTests.json_file_use_filename() method.
* Add a test in test_regrtest on the --python command line option.
* test_regrtest: add parallel=False parameter.
* Split long RunWorkers._runtest() function into sub-functions.
Lib/test/libregrtest/main.py
Lib/test/libregrtest/run_workers.py
Lib/test/libregrtest/runtests.py
Lib/test/libregrtest/utils.py
Lib/test/libregrtest/worker.py
Lib/test/test_regrtest.py