Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2002)

Side by Side Diff: tools/clang/plugins/tests/test.sh

Issue 785393002: Revert "Roll Clang 218707:223109 (+r223211, +r223219, -r220714)" and follow-ups. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « tools/clang/plugins/tests/overridden_methods.txt ('k') | tools/clang/scripts/package.sh » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/bin/bash 1 #!/bin/bash
2 # 2 #
3 # Copyright (c) 2011 The Chromium Authors. All rights reserved. 3 # Copyright (c) 2011 The Chromium Authors. All rights reserved.
4 # Use of this source code is governed by a BSD-style license that can be 4 # Use of this source code is governed by a BSD-style license that can be
5 # found in the LICENSE file. 5 # found in the LICENSE file.
6 # 6 #
7 # Hacky, primitive testing: This runs the style plugin for a set of input files 7 # Hacky, primitive testing: This runs the style plugin for a set of input files
8 # and compares the output with golden result files. 8 # and compares the output with golden result files.
9 9
10 E_BADARGS=65 10 E_BADARGS=65
(...skipping 16 matching lines...) Expand all
27 local flags="" 27 local flags=""
28 if [ -e "${3}" ]; then 28 if [ -e "${3}" ]; then
29 flags="$(cat "${3}")" 29 flags="$(cat "${3}")"
30 fi 30 fi
31 31
32 if [ "$(uname -s)" = "Darwin" ]; then 32 if [ "$(uname -s)" = "Darwin" ]; then
33 flags="${flags} -isysroot $(xcrun --show-sdk-path) -stdlib=libstdc++" 33 flags="${flags} -isysroot $(xcrun --show-sdk-path) -stdlib=libstdc++"
34 fi 34 fi
35 35
36 local output="$("${CLANG_PATH}" -fsyntax-only -Wno-c++11-extensions \ 36 local output="$("${CLANG_PATH}" -fsyntax-only -Wno-c++11-extensions \
37 -Wno-inconsistent-missing-override \
38 -Xclang -load -Xclang "${PLUGIN_PATH}" \ 37 -Xclang -load -Xclang "${PLUGIN_PATH}" \
39 -Xclang -add-plugin -Xclang find-bad-constructs ${flags} ${1} 2>&1)" 38 -Xclang -add-plugin -Xclang find-bad-constructs ${flags} ${1} 2>&1)"
40 local diffout="$(echo "${output}" | diff - "${2}")" 39 local diffout="$(echo "${output}" | diff - "${2}")"
41 if [ "${diffout}" = "" ]; then 40 if [ "${diffout}" = "" ]; then
42 echo "PASS: ${1}" 41 echo "PASS: ${1}"
43 else 42 else
44 failed_any_test=yes 43 failed_any_test=yes
45 echo "FAIL: ${1}" 44 echo "FAIL: ${1}"
46 echo "Output of compiler:" 45 echo "Output of compiler:"
47 echo "${output}" 46 echo "${output}"
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 do_testcase "${input}" "${input%cpp}txt" "${input%cpp}flags" 84 do_testcase "${input}" "${input%cpp}txt" "${input%cpp}flags"
86 done 85 done
87 86
88 for input in *.c; do 87 for input in *.c; do
89 do_testcase "${input}" "${input%c}txt" "${input%c}flags" 88 do_testcase "${input}" "${input%c}txt" "${input%c}flags"
90 done 89 done
91 90
92 if [[ "${failed_any_test}" ]]; then 91 if [[ "${failed_any_test}" ]]; then
93 exit ${E_FAILEDTEST} 92 exit ${E_FAILEDTEST}
94 fi 93 fi
OLDNEW
« no previous file with comments | « tools/clang/plugins/tests/overridden_methods.txt ('k') | tools/clang/scripts/package.sh » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698