[PATCH] D43164: Fix test from failing when the python path has spaces

Aaron Smith via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Feb 10 12:16:55 PST 2018


asmith created this revision.
asmith added reviewers: zturner, llvm-commits.
Herald added subscribers: cfe-commits, klimek.

This test would fail if the python path had spaces. Add a quote around the path to fix this problem and update some test values changed by the addition of quotes around the path.

Tested on Windows and Linux with Python 3.x


Repository:
  rC Clang

https://reviews.llvm.org/D43164

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": 299,
+// CHECK: "begin": 301,
 // CHECK: "type": "FieldDecl",
-// CHECK: "end": 319,
+// CHECK: "end": 321,
 // CHECK: "type": "CXXRecordDecl",
 class A {
   int x;


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D43164.133764.patch
Type: text/x-patch
Size: 700 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180210/064d8b5a/attachment.bin>


More information about the llvm-commits mailing list