[PATCH] D50373: [lit, tests] Fix failing lit test: shtest-format.py

Stella Stamenova via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 6 21:06:54 PDT 2018


stella.stamenova created this revision.
stella.stamenova added reviewers: asmith, zturner.
Herald added subscribers: llvm-commits, delcypher.

The problem here is that on windows double quotes are used for paths (usually) while single quotes are not. This is not generally a problem for the tests because the lit infrastructure tends to treat both the same. One (and possibly only) exception is when some tests are run in an external shell such as some of the shtest-format tests. In this case on windows the path to python was not created correctly because it had single quotes and the test failed.

This same test is already failing with python 3 which is why our testing missed the new failure. This patch will take care of the immediate failure with python 2 and I'll send a follow up for the python 3 failure.


Repository:
  rL LLVM

https://reviews.llvm.org/D50373

Files:
  utils/lit/tests/Inputs/shtest-format/lit.cfg


Index: utils/lit/tests/Inputs/shtest-format/lit.cfg
===================================================================
--- utils/lit/tests/Inputs/shtest-format/lit.cfg
+++ utils/lit/tests/Inputs/shtest-format/lit.cfg
@@ -6,4 +6,4 @@
 config.test_exec_root = None
 config.target_triple = 'x86_64-unknown-unknown'
 config.available_features.add('a-present-feature')
-config.substitutions.append(('%{python}', "'%s'" % (sys.executable)))
+config.substitutions.append(('%{python}', '"%s"' % (sys.executable)))


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D50373.159450.patch
Type: text/x-patch
Size: 507 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180807/042bc96e/attachment.bin>


More information about the llvm-commits mailing list