Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test_runner_describe_it failures break TAP output #43773

Closed
richardlau opened this issue Jul 11, 2022 · 6 comments · Fixed by nodejs/tap2junit#31
Closed

test_runner_describe_it failures break TAP output #43773

richardlau opened this issue Jul 11, 2022 · 6 comments · Fixed by nodejs/tap2junit#31

Comments

@richardlau
Copy link
Member

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

@MoLow
Copy link
Member

MoLow commented Jul 11, 2022

Taking a look. might take me a few days

@MoLow
Copy link
Member

MoLow commented Jul 11, 2022

@richardlau do we know if this affects anything else besides node-core-utils?

@richardlau
Copy link
Member Author

@MoLow https://github.com/nodejs/tap2junit, as described above. In the Jenkins CI this is used to convert the TAP output of Node.js' tools/test.py to XML which Jenkins can parse -- we do this because the tap plugin for Jenkins has very bad performance (nodejs/build#453).

@F3n67u
Copy link
Member

F3n67u commented Jul 11, 2022

I experience multiple time when jenkins job say test.xml is empty, but I don't know what is wrong and ignored. If a job say test.xml is empty, then there must be some problem when run tap2junit right?

@richardlau
Copy link
Member Author

@F3n67u Yes, either tap2junit has failed to parse the tap output or the build failed to compile and no tests were run.

@MoLow
Copy link
Member

MoLow commented Jul 12, 2022

@richardlau please see my PR - the output is valid, it is that tap2junit parser that cannot handle it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants