-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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 diagnostics are ommited when running with --test
#45911
Comments
CC @manekinekko |
This is indeed caused by node/lib/internal/test_runner/runner.js Line 185 in f14fa1b
This was done by design to prevent some undesired top-level comments from being parsed (can't remember the exact reason). This looks like an issue and we need to handle those top-level comments differently. |
@manekinekko that is not the only cause. see the steps I performed in the issue - commenting that condition out did not help |
Gotcha! Let me investigate this. |
After a quick investigation, it seems that the output of The current TAP parser was implemented following v14 specs which state:
However, it seems that TAP 13 specs treat any comment as a diagnostic value:
@MoLow @cjihrig what do you suggest:
I'd recommend going with 2/ since TAP v14 is considered the current specs. |
@manekinekko options 1 and 3 don't seem great. I'm not sure that option 2 would work because these diagnostics are happening at the root test, and the root test is a special case. Can the root test be special cased (this happens in other places in the test runner already)? |
Perhaps we can add a env var or a flag to tell the root test not to report the "common diagnostics", then the if can be removed |
What are "common diagnostics"? |
All the diagnostics we emit by default once per "root test" - tests,pass,fail,canceled etc |
@ashutosh887 go for it! |
@manekinekko @cjihrig if that is the parsing bug, where I would start? I am reading this multiple times https://github.com/nodejs/node/blob/main/lib/internal/test_runner/tap_parser.js and don't know the context. I also tinkering with test The comment is using TAP14 but the code using TAP13. |
PR-URL: #46450 Fixes: #45911 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]>
PR-URL: nodejs/node#46450 Fixes: nodejs/node#45911 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]> (cherry picked from commit 1118db718c8429f5f343aca90ccb570244e282b4)
PR-URL: nodejs/node#46450 Fixes: nodejs/node#45911 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]> (cherry picked from commit 1118db718c8429f5f343aca90ccb570244e282b4)
PR-URL: nodejs/node#46450 Fixes: nodejs/node#45911 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]> (cherry picked from commit 1118db718c8429f5f343aca90ccb570244e282b4)
PR-URL: nodejs#46450 Fixes: nodejs#45911 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]>
PR-URL: #46450 Fixes: #45911 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]>
PR-URL: nodejs#46450 Fixes: nodejs#45911 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]>
PR-URL: nodejs#46450 Fixes: nodejs#45911 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]>
PR-URL: nodejs#46450 Fixes: nodejs#45911 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]>
PR-URL: #46450 Backport-PR-URL: #46839 Fixes: #45911 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]>
PR-URL: #46450 Backport-PR-URL: #46839 Fixes: #45911 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]>
Version
v20.0.0-pre
Platform
Darwin Moshes-MBP.localdomain 21.1.0 Darwin Kernel Version 21.1.0: Wed Oct 13 17:33:01 PDT 2021; root:xnu-8019.41.5~1/RELEASE_ARM64_T6000 arm64
Subsystem
test_runner
What steps will reproduce the bug?
run
How often does it reproduce? Is there a required condition?
always
What is the expected behavior?
when running without
--flag
the diagnostics are printed:What do you see instead?
this is the result of adding a log where all the TAP parsed tokens are handled
node/lib/internal/test_runner/runner.js
Line 133 in f14fa1b
the diagnostics are missing
Additional information
No response
The text was updated successfully, but these errors were encountered: