This is an archive of the discontinued LLVM Phabricator instance.

[test]Make test work on Windows
ClosedPublic

Authored by jhenderson on May 13 2019, 6:07 AM.

Details

Summary

Previously, the test didn't work because '\' characters appeared in the sed string, causing bogus escape characters to form in the substituted string literal. Switching to using '%/p' causes the path to be emitted with '/' characters instead, so that there are are no escaping issues.

Diff Detail

Repository
rL LLVM

Event Timeline

jhenderson created this revision.May 13 2019, 6:07 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 13 2019, 6:07 AM
Herald added a subscriber: rupprecht. · View Herald Transcript
kzhuravl accepted this revision.May 13 2019, 2:50 PM

LGTM, thanks!

This revision is now accepted and ready to land.May 13 2019, 2:50 PM
grimar accepted this revision.May 14 2019, 2:21 AM

LGTM, this works for me under windows.

MaskRay added inline comments.
test/tools/llvm-objdump/X86/source-interleave-x86_64.ll
1 ↗(On Diff #199260)

Use single quotes? BTW, I'm curious what backslashes in single quotes do (in the expanded sed -e 's,SRC_COMPDIR,%p/Inputs,g') do on Windows...

This revision was automatically updated to reflect the committed changes.
jhenderson marked an inline comment as done.May 14 2019, 4:02 AM
jhenderson added inline comments.
test/tools/llvm-objdump/X86/source-interleave-x86_64.ll
1 ↗(On Diff #199260)

I've not done this. Double-quotes work fine and are what were there before.

MaskRay added inline comments.May 14 2019, 8:06 AM
test/tools/llvm-objdump/X86/source-interleave-x86_64.ll
1 ↗(On Diff #199260)

It's fine. I was asking because in POSIX sh the backslash in single quotes wouldn't cause issues.