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

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

Issue 790263003: Roll Clang 218707:223109 (+r223211, +r223219, -r220714), take 2 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Don't bump the plugin number 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 \
37 -Xclang -load -Xclang "${PLUGIN_PATH}" \ 38 -Xclang -load -Xclang "${PLUGIN_PATH}" \
38 -Xclang -add-plugin -Xclang find-bad-constructs ${flags} ${1} 2>&1)" 39 -Xclang -add-plugin -Xclang find-bad-constructs ${flags} ${1} 2>&1)"
39 local diffout="$(echo "${output}" | diff - "${2}")" 40 local diffout="$(echo "${output}" | diff - "${2}")"
40 if [ "${diffout}" = "" ]; then 41 if [ "${diffout}" = "" ]; then
41 echo "PASS: ${1}" 42 echo "PASS: ${1}"
42 else 43 else
43 failed_any_test=yes 44 failed_any_test=yes
44 echo "FAIL: ${1}" 45 echo "FAIL: ${1}"
45 echo "Output of compiler:" 46 echo "Output of compiler:"
46 echo "${output}" 47 echo "${output}"
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 do_testcase "${input}" "${input%cpp}txt" "${input%cpp}flags" 85 do_testcase "${input}" "${input%cpp}txt" "${input%cpp}flags"
85 done 86 done
86 87
87 for input in *.c; do 88 for input in *.c; do
88 do_testcase "${input}" "${input%c}txt" "${input%c}flags" 89 do_testcase "${input}" "${input%c}txt" "${input%c}flags"
89 done 90 done
90 91
91 if [[ "${failed_any_test}" ]]; then 92 if [[ "${failed_any_test}" ]]; then
92 exit ${E_FAILEDTEST} 93 exit ${E_FAILEDTEST}
93 fi 94 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