[PATCH] D50281: [lit, python] Always add quotes around the python path in lit

Stella Stamenova via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Aug 3 16:18:16 PDT 2018


stella.stamenova created this revision.
stella.stamenova added reviewers: asmith, zturner.
Herald added a subscriber: cfe-commits.

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 is a companion change to: https://reviews.llvm.org/D50206


Repository:
  rC Clang

https://reviews.llvm.org/D50281

Files:
  test/Tooling/clang-diff-json.cpp


Index: test/Tooling/clang-diff-json.cpp
===================================================================
--- test/Tooling/clang-diff-json.cpp
+++ test/Tooling/clang-diff-json.cpp
@@ -1,10 +1,10 @@
 // RUN: clang-diff -ast-dump-json %s -- \
-// RUN: | '%python' -c 'import json, sys; json.dump(json.loads(sys.stdin.read()), sys.stdout, sort_keys=True, indent=2)' \
+// RUN: | %python -c 'import json, sys; json.dump(json.loads(sys.stdin.read()), sys.stdout, sort_keys=True, indent=2)' \
 // RUN: | FileCheck %s
 
-// CHECK: "begin": 301,
+// CHECK: "begin": 311,
 // CHECK: "type": "FieldDecl",
-// CHECK: "end": 321,
+// CHECK: "end": 331,
 // CHECK: "type": "CXXRecordDecl",
 class A {
   int x;


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D50281.159123.patch
Type: text/x-patch
Size: 700 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180803/9553e322/attachment.bin>


More information about the cfe-commits mailing list