[PATCH] Fixes test failure on darwin introduced by r188274
Edwin Vane
edwin.vane at intel.com
Tue Aug 13 09:57:27 PDT 2013
================
Comment at: test/cpp11-migrate/HeaderReplacements/main.cpp:11-13
@@ -10,5 +10,5 @@
// RUN: ls -1 %t/Test | grep -c "common.cpp_common.h_.*.yaml" | grep "^1$"
-// We need to remove the path from FileNames in the generated YAML file because it will have a path in the temp directory
-// RUN: sed -i -e 's/^\(HeaderFileName:\|SourceFileName:\).*[\/\\]\(.*\)"$/\1 "\2"/g' %t/Test/main.cpp_common.h_*.yaml
// RUN: cp %S/common.h.yaml %t/Test/main.cpp_common.h.yaml
+// We need to put the build path to the expected YAML file to diff against the generated one.
+// RUN: sed -i -e 's#$(path)#%t/Test#g' %t/Test/main.cpp_common.h.yaml
// RUN: diff -b %t/Test/main.cpp_common.h.yaml %t/Test/main.cpp_common.h_*.yaml
----------------
How about not using `sed -i` and instead use `%S/common.h.yaml` as the source and using redirection output to `%t/Test/main.cpp_common.h.yaml`.
Can do something similar below with `common.cpp_common.h.yaml`.
================
Comment at: test/cpp11-migrate/HeaderReplacements/main.cpp:31-32
@@ +30,4 @@
+// We need to put the build path to the expected YAML file to diff against the generated one.
+// RUN: cp %S/common.h.yaml %t/Test/main.cpp_common.h.yaml
+// RUN: sed -i -e 's#$(path)#%t/Test#g' %t/Test/main.cpp_common.h.yaml
+// RUN: diff -b %t/Test/main.cpp_common.h.yaml %t/Test/main.cpp_common.h_*.yaml
----------------
Here again you can eliminate a copy.
http://llvm-reviews.chandlerc.com/D1381
BRANCH
svn
ARCANIST PROJECT
clang-tools-extra
More information about the cfe-commits
mailing list