Lost JUnit support for V8 tests
We've been floating an old patch for some time (https://github.com/nodejs/node/commit/d8b4a7edaeff573df18d47277cb94553bf6faf39) but unfortunately it doesn't apply anymore since V8 did a big refactor of its test runner.
This breaks V8 CI: https://ci.nodejs.org/job/node-test-commit-v8-linux/4781/
@nodejs/python @nodejs/build
It's possible to fix up the patch but it's arguably a better idea to just use the built-in --json-test-results flag and transform the JSON file to JUnit, or teach Jenkins the JSON format (possibly harder, I don't know how much harder.)
Here's a script which does the JSON -> JUnit conversion: https://gist.github.com/kvakil/8ed172559f5bc3c8391ec34065682599
It seems to work on all the cases I tried locally (on Linux: passed,
timeout, and failed test cases). One weird thing is that the JSON output
doesn't include all the successful test cases, only the failing ones and
the slowest slow_tests_cutoff ones. Of course, you can set
slow_tests_cutoff arbitrary high in order to get all the output, which
is what that script assumes:
$ python3 tools/run-tests.py --gn --arch=x64 --json-test-results $(pwd)/v8-tap.json --slow-tests-cutoff=1000000 cctest
$ python3 json_to_xml_tap.py < v8-tap.json > v8-tap.xml
Seems like a good forward. Can I suggest you PR it to nodejs/node? I don't know how to hook it up to the CI but someone else no doubt does.
One style nit: the project's python style is two space indent, not four.
Would this make sense to add to https://github.com/nodejs/tap2junit ?
- A question, not a suggestion unless others agree.
Seems like a good forward. Can I suggest you PR it to nodejs/node? I don't know how to hook it up to the CI but someone else no doubt does.
One style nit: the project's python style is two space indent, not four.
PR is now at https://github.com/nodejs/node/pull/44049 (with your style nit addressed).
Would this make sense to add to https://github.com/nodejs/tap2junit ?
I'm not opposed to this. I can't find tap2unit anywhere in the nodejs repo with git grep tap2junit. Is it just hanging out in the Jenkins job config somewhere?
https://github.com/nodejs/tap2junit is a URL that you can click on.