This is an archive of the discontinued LLVM Phabricator instance.

[lit, python] Always add quotes around the python path in lit
ClosedPublic

Authored by stella.stamenova on Aug 2 2018, 4:19 PM.

Details

Summary

The issue with the python path is that the path to python on Windows can contain spaces. To make the tests always work, the path to python needs to be surrounded by quotes.

This change updates several configuration files which specify the path to python as a substitution and also remove quotes from existing tests.

Diff Detail

Repository
rL LLVM

Event Timeline

Should the substitution just be surrounded by quotes automatically so we
don’t have this problem?

I looked at doing this in a generic way when we first encountered it and I couldn't find a good way of doing it partially because configuration files (such as lit.cfg in this changeset) can override the substitutions.

A couple of things we can do:

  1. Update the cfg files as much as possible rather than the test themselves
  2. Update config.py (where we define the default substitusions for tools) to use quotes as well.

One of the problems I originally ran into was that when the tool has inputs, putting quotes around the tool AND the input caused more problems. I think 2) will avoid that, but it's still not entirely generic and some tests might need individual fixes.

Let me know if you'd prefer that I try to update config.py as well.

stella.stamenova retitled this revision from [lit, windows] Fix several lit tests on Windows to [lit, python] Always add quotes around the python path in lit.
stella.stamenova edited the summary of this revision. (Show Details)
zturner accepted this revision.Aug 3 2018, 4:05 PM
This revision is now accepted and ready to land.Aug 3 2018, 4:05 PM
jakehehrlich accepted this revision.Aug 3 2018, 4:42 PM
This revision was automatically updated to reflect the committed changes.