Skip to content

test_runner_describe_it failures break TAP output #43773

Closed
nodejs/tap2junit
#31
@richardlau

Description

@richardlau

Version

main

Platform

No response

Subsystem

test

What steps will reproduce the bug?

No response

How often does it reproduce? Is there a required condition?

No response

What is the expected behavior?

No response

What do you see instead?

Seen on the CI. When test_runner_describe_it (formerly test_runner_destribe_it (#43764)) fails it breaks the tap2junit TAP parser we have in the CI:
e.g.

15:47:26 not ok 3127 message/test_runner_desctibe_it
15:47:26   ---
15:47:26   duration_ms: 3.801
15:47:26   severity: fail
15:47:26   exitcode: 1
15:47:26   stack: |-
15:47:26     TAP version 13
15:47:26     # Subtest: sync pass todo
15:47:26     ok 1 - sync pass todo # TODO
15:47:26       ---
15:47:26       duration_ms: 0.017320097
15:47:26       ...
15:47:26     # Subtest: sync pass todo with message
15:47:26     ok 2 - sync pass todo with message # TODO this is a passing todo
15:47:26       ---
15:47:26       duration_ms: 0.00010036
15:47:26       ...
15:47:26     # Subtest: sync fail todo
15:47:26     not ok 3 - sync fail todo # TODO
...
16:00:46 + tap2junit -i test.tap -o test.xml
16:00:48 Traceback (most recent call last):
16:00:48   File "/usr/local/bin/tap2junit", line 10, in <module>
16:00:48     sys.exit(main())
16:00:48   File "/Library/Python/3.8/site-packages/tap2junit/__main__.py", line 64, in main
16:00:48     convert(args.input, args.output)
16:00:48   File "/Library/Python/3.8/site-packages/tap2junit/__main__.py", line 43, in convert
16:00:48     result = parse(input_file, data)
16:00:48   File "/Library/Python/3.8/site-packages/tap2junit/__main__.py", line 35, in parse
16:00:48     tap_parser.parse(data)
16:00:48   File "/Library/Python/3.8/site-packages/tap2junit/tap13.py", line 174, in parse
16:00:48     self._parse(StringIO(source))
16:00:48   File "/Library/Python/3.8/site-packages/tap2junit/tap13.py", line 144, in _parse
16:00:48     raise ValueError("Descending test id on line: %r" % line)
16:00:48 ValueError: Descending test id on line: 'not ok 1 - +sync throw fail'

Such failures are also breaking ncu-ci from node-core-utils (nodejs/node-core-utils#639 (comment)) which breaks the CI Reliability reports in https://github.com/nodejs/reliability.

Additional information

No response

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