-
Notifications
You must be signed in to change notification settings - Fork 349
Fix the following CAS related test for Windows #11475
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1501,6 +1501,7 @@ def getDefaultSubstitutions(test, tmpDir, tmpBase, normalize_slashes=False): | |
("%{fs-src-root}", pathlib.Path(sourcedir).anchor), | ||
("%{fs-tmp-root}", pathlib.Path(tmpBase).anchor), | ||
("%{fs-sep}", os.path.sep), | ||
("%{fs-sep-yaml}", "\\\\\\\\\\\\\\\\" if kIsWindows else "/"), | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. How did we get from 1 \ to 16 \s? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Four levels of backslash escaping - one for this python string, two for being quoted and being a replacement pattern in sed and one for being a json string. |
||
] | ||
) | ||
|
||
|
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.
We have a number of tests that do something like pipe the output through
sed 's:\\\\\?:/:g'
to avoid needing regex for every CHECK line. Does that work here?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.
Yes that would probably work but I had had a review comment that using PathSanitizingFileCheck and doing this way would be more precise so I'm following that style.