-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Fix line and path separators in test #23534
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
Conversation
A NL is dropped from check files of bootstrapped neg-macros but it's not obvious how to supply the update flag. Edit: just |
db2c829
to
31b4fd4
Compare
Spurious windows_fast failure. |
31b4fd4
to
c6fa07f
Compare
c6fa07f
to
2d3adb2
Compare
That's a nice idea! Did you actually try it again under windows to see if it akshually works? Edit: the TestReporter's ConsoleReporter (its Probably the TestReporter is not used to report a path in a diagnostic, but it also translates paths, because why not. The test rig reports "local" paths as usual, but the diagnostics don't include a path (which would be normalized). Note, of course, how sbt "progress" collides with test rig output, which is still quite annoying and provides no value. Windows example where a spurious
In fact Edit: that is, local convention is good for test rig reports; normalized path is required only for check file output. |
2d3adb2
to
45afde7
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR fixes #23458:
- 976a8f5: replaces
String.split("\n")
withlinesIterator
to properly handle Windows\r\n
line endings, preventing\r
characters from being left behind
and causing formatting issues. - 5672e36: normalizes paths in test outputs using a new
renderPath
function to ensure consistent cross-platform test results. - 45afde7: removes extra leading newlines from 43 checkfiles.
Looks good to me, thanks!
This was not refreshed and is stale with respect to 2 months of new check files. |
Do we except a lot of new check files to be affected? For now the CI (test_non_bootstrapped and test_windows_full) seems to (also) fail for problems that were already occurring before the merge (see runs on the previous commit). |
In the context of the current dust due to construction, if a few check files need I was feeling paranoid about breaking the build! |
Fixes #23458
Splitting on NL leaves the CR if present. Just use
linesIterator
.Introduce a template method for rendering paths. The test reporter replaces windows convention when run on windows, so that check files are correct;
FileDiff.matches
currently accounts for comparing lines of text when run on windows.Previously, a
TestReporter
with empty console output would contribute a NL because"".split("\n")
is not empty. (There is a test reporter per compilation group.)