This is an archive of the discontinued LLVM Phabricator instance.

Fix unittests after windows command line parsing
ClosedPublic

Authored by zturner on Aug 17 2016, 2:46 PM.

Details

Summary

After submitting the windows command line parsing patch, it broke all the command line parsing unittests, because now they were trying parse gnu command lines using the windows command line parser. The patch is reverted for now until we get these unit tests fixed.

I'm not sure what the best solution is. One option is to disable those tests on Windows. But that seems undesirable because it was only some of the tests, and others worked fine. Not all the tests even depended on a command line in the first place. So I decided to expose the command syntax through the API. You can either force it to Gnu, force it to Windows, and let it auto-detect. The unit tests all force it to Gnu for the sake of simplicity, since the Windows command line tokenizer is already rigorously tested in LLVM.

This also kind of lines up with the idea I had in the previous code review for exposing a command line option in CommonOptions.cpp to override the command syntax so we don't have to guess. So if someone decides to do that in the future that should be easier now.

Diff Detail

Event Timeline

zturner updated this revision to Diff 68426.Aug 17 2016, 2:46 PM
zturner retitled this revision from to Fix unittests after windows command line parsing.
zturner updated this object.
zturner added a reviewer: alexfh.
zturner added a subscriber: cfe-commits.
alexfh accepted this revision.Aug 18 2016, 11:28 AM
alexfh edited edge metadata.

LG

This revision is now accepted and ready to land.Aug 18 2016, 11:28 AM
This revision was automatically updated to reflect the committed changes.