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

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

Issue 898713004: Revert of Roll Clang 223108:228129 (Closed) Base URL: precise:/work/chromium/src@clang_roll_226907
Patch Set: Created 5 years, 10 months 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
OLDNEW
1 #!/bin/bash 1 #!/bin/bash
2 # 2 #
3 # Copyright 2014 The Chromium Authors. All rights reserved. 3 # Copyright 2014 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 11 matching lines...) Expand all
22 echo "" 22 echo ""
23 } 23 }
24 24
25 # Runs a single test case. 25 # Runs a single test case.
26 do_testcase() { 26 do_testcase() {
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 local output="$("${CLANG_PATH}" -c -Wno-c++11-extensions \ 31 local output="$("${CLANG_PATH}" -c -Wno-c++11-extensions \
32 -Wno-inaccessible-base \
33 -Xclang -load -Xclang "${PLUGIN_PATH}" \ 32 -Xclang -load -Xclang "${PLUGIN_PATH}" \
34 -Xclang -add-plugin -Xclang blink-gc-plugin ${flags} ${1} 2>&1)" 33 -Xclang -add-plugin -Xclang blink-gc-plugin ${flags} ${1} 2>&1)"
35 local json="${input%cpp}graph.json" 34 local json="${input%cpp}graph.json"
36 if [ -f "$json" ]; then 35 if [ -f "$json" ]; then
37 output="$(python ../process-graph.py -c ${json} 2>&1)" 36 output="$(python ../process-graph.py -c ${json} 2>&1)"
38 fi 37 fi
39 local diffout="$(echo "${output}" | diff - "${2}")" 38 local diffout="$(echo "${output}" | diff - "${2}")"
40 if [ "${diffout}" = "" ]; then 39 if [ "${diffout}" = "" ]; then
41 echo "PASS: ${1}" 40 echo "PASS: ${1}"
42 else 41 else
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 cd "$(dirname "${0}")" 75 cd "$(dirname "${0}")"
77 fi 76 fi
78 77
79 for input in *.cpp; do 78 for input in *.cpp; do
80 do_testcase "${input}" "${input%cpp}txt" "${input%cpp}flags" 79 do_testcase "${input}" "${input%cpp}txt" "${input%cpp}flags"
81 done 80 done
82 81
83 if [[ "${failed_any_test}" ]]; then 82 if [[ "${failed_any_test}" ]]; then
84 exit ${E_FAILEDTEST} 83 exit ${E_FAILEDTEST}
85 fi 84 fi
OLDNEW
« no previous file with comments | « tools/clang/blink_gc_plugin/RecordInfo.h ('k') | tools/clang/plugins/tests/weak_ptr_factory.flags » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698