Chromium Code Reviews| Index: tools/clang/plugins/tests/test.sh |
| diff --git a/tools/clang/plugins/tests/test.sh b/tools/clang/plugins/tests/test.sh |
| index 7946325c539dd36ea9c8c9b35a9cbbaae8c0af48..078c0b054a07b26d77e96d9c3b1fd13f560c03c8 100755 |
| --- a/tools/clang/plugins/tests/test.sh |
| +++ b/tools/clang/plugins/tests/test.sh |
| @@ -33,7 +33,7 @@ do_testcase() { |
| flags="${flags} -isysroot $(xcrun --show-sdk-path) -stdlib=libstdc++" |
| fi |
| - local output="$("${CLANG_PATH}" -c -Wno-c++11-extensions \ |
| + local output="$("${CLANG_PATH}" -fsyntax-only -c -Wno-c++11-extensions \ |
|
hans
2014/09/26 01:29:29
can probably drop the -c now that we pass -fsyntax
dcheng
2014/09/26 07:07:14
Done.
|
| -Xclang -load -Xclang "${PLUGIN_PATH}" \ |
| -Xclang -add-plugin -Xclang find-bad-constructs ${flags} ${1} 2>&1)" |
| local diffout="$(echo "${output}" | diff - "${2}")" |
| @@ -44,6 +44,10 @@ do_testcase() { |
| echo "FAIL: ${1}" |
| echo "Output of compiler:" |
| echo "${output}" |
| + cat > ${2}-actual << EOF |
|
hans
2014/09/26 01:29:29
Won't this leave a file in the source tree? It see
dcheng
2014/09/26 07:07:14
Only if there's a diff. It makes it much easier to
hans
2014/09/27 00:36:09
Oh, right. That makes sense.
|
| +${output} |
| +EOF |
| + |
| echo "Expected output:" |
| cat "${2}" |
| echo |