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

pseudo-tty/test_runner_default_reporter breaks Python based test runner #47173

Closed
richardlau opened this issue Mar 20, 2023 · 4 comments · Fixed by #47175
Closed

pseudo-tty/test_runner_default_reporter breaks Python based test runner #47173

richardlau opened this issue Mar 20, 2023 · 4 comments · Fixed by #47175

Comments

@richardlau
Copy link
Member

pseudo-tty/test_runner_default_reporter is emitting skip messages that our Python based test harness cannot currently parse. This means we no longer get the failure summaries on the job pages and need to manually scan/search through the console log output for actual failures.

e.g. https://ci.nodejs.org/job/node-test-commit-linux-containered/nodes=ubuntu1804_sharedlibs_withoutssl_x64/36660/console

15:32:05 --- Logging error ---
15:32:05 Traceback (most recent call last):
15:32:05   File "/usr/lib/python3.6/logging/__init__.py", line 996, in emit
15:32:05     stream.write(msg)
15:32:05 UnicodeEncodeError: 'ascii' codec can't encode character '\u2139' in position 59: ordinal not in range(128)
15:32:05 Call stack:
15:32:05   File "tools/test.py", line 1794, in <module>
15:32:05     sys.exit(Main())
15:32:05   File "tools/test.py", line 1765, in Main
15:32:05     result = RunTestCases(cases_to_run, options.progress, options.j, options.flaky_tests, options.measure_flakiness)
15:32:05   File "tools/test.py", line 978, in RunTestCases
15:32:05     return progress.Run(tasks)
15:32:05   File "tools/test.py", line 162, in Run
15:32:05     self.RunSingle(False, 0)
15:32:05   File "tools/test.py", line 238, in RunSingle
15:32:05     self.HasRun(output)
15:32:05   File "tools/test.py", line 386, in HasRun
15:32:05     'ok %i %s # skip %s' % (self._done, command, skip.group(1)))
15:32:05 Message: 'ok 3493 pseudo-tty/test_runner_default_reporter # skip [34m\u2139 tests 3[39m'
15:32:05 Arguments: ()
@MoLow
Copy link
Member

MoLow commented Mar 20, 2023

Duplicate of: #47048
Fixed by: nodejs/tap2junit#45
Waiting for: nodejs/tap2junit#46 and nodejs/tap2junit#43

@richardlau
Copy link
Member Author

@MoLow I'm fairly certain the Python stack trace I've captured is coming from tools/test.py and not tap2junit.

@MoLow
Copy link
Member

MoLow commented Mar 20, 2023

It seems like it might have picked up the latest version of tap2junit, in the log I have seen the error came from tap2junit:
anyway, I will open a PR trying to fix it in test.py

https://ci.nodejs.org/job/node-test-commit-linux-containered/36476/nodes=ubuntu1804_sharedlibs_openssl111_x64/console

07:05:39 [node-test-commit-linux-containered] $ /bin/sh -xe /tmp/jenkins9016369142153194027.sh
07:05:39 + mkdir -p out/junit
07:05:39 + [ -f test.tap ]
07:05:39 + tap2junit -i test.tap -o out/junit/test.xml
07:05:39 Traceback (most recent call last):
07:05:39   File "/usr/local/bin/tap2junit", line 11, in <module>
07:05:39     sys.exit(main())
07:05:39   File "/usr/local/lib/python3.6/dist-packages/tap2junit/__main__.py", line 64, in main
07:05:39     convert(args.input, args.output)
07:05:39   File "/usr/local/lib/python3.6/dist-packages/tap2junit/__main__.py", line 42, in convert
07:05:39     data = in_file.read()
07:05:39   File "/usr/lib/python3.6/encodings/ascii.py", line 26, in decode
07:05:39     return codecs.ascii_decode(input, self.errors)[0]
07:05:39 UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 19033: ordinal not in range(128)
07:05:39 POST BUILD TASK : FAILURE

@richardlau
Copy link
Member Author

@MoLow We may still have issues with tap2junit requiring the new version of that to be released and deployed throughout the CI. This issue seems to be more recent, and is occurring in the Python based test runner before tap2junit is even run.

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.

2 participants