Skip to content

Lost JUnit support for V8 tests #236

Description

@targos

We've been floating an old patch for some time (nodejs/node@d8b4a7e) 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/

Activity

  1. targos commented on Jul 20, 2022

    @targos
    MemberAuthor

    @nodejs/python @nodejs/build

  2. bnoordhuis commented on Jul 20, 2022

    @bnoordhuis
    Member

    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.)

  3. kvakil commented on Jul 25, 2022

    @kvakil

    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
  4. bnoordhuis commented on Jul 28, 2022

    @bnoordhuis
    Member

    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.

  5. cclauss commented on Jul 29, 2022

    @cclauss

    Would this make sense to add to https://github.com/nodejs/tap2junit ?

    • A question, not a suggestion unless others agree.
  6. kvakil commented on Jul 30, 2022

    @kvakil

    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 nodejs/node#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?

  7. cclauss commented on Jul 30, 2022

    @cclauss

    https://github.com/nodejs/tap2junit is a URL that you can click on.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions