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

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

Issue 8370018: Fix typo to make clang plugin tests work on linux. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Created 9 years, 2 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | 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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 42
43 # Validate input to the script. 43 # Validate input to the script.
44 if [[ -z "${1}" ]]; then 44 if [[ -z "${1}" ]]; then
45 usage 45 usage
46 exit ${E_BADARGS} 46 exit ${E_BADARGS}
47 elif [[ ! -d "${1}" ]]; then 47 elif [[ ! -d "${1}" ]]; then
48 echo "${1} is not a directory." 48 echo "${1} is not a directory."
49 usage 49 usage
50 exit ${E_BADARGS} 50 exit ${E_BADARGS}
51 else 51 else
52 export CLANG_DIR="$(PWD)/${1}" 52 export CLANG_DIR="${PWD}/${1}"
53 echo "Using clang directory ${CLANG_DIR}..." 53 echo "Using clang directory ${CLANG_DIR}..."
54 54
55 # The golden files assume that the cwd is this directory. To make the script 55 # The golden files assume that the cwd is this directory. To make the script
56 # work no matter what the cwd is, explicitly cd to there. 56 # work no matter what the cwd is, explicitly cd to there.
57 cd "$(dirname "${0}")" 57 cd "$(dirname "${0}")"
58 58
59 if [ "$(uname -s)" = "Linux" ]; then 59 if [ "$(uname -s)" = "Linux" ]; then
60 export LIB=so 60 export LIB=so
61 elif [ "$(uname -s)" = "Darwin" ]; then 61 elif [ "$(uname -s)" = "Darwin" ]; then
62 export LIB=dylib 62 export LIB=dylib
63 fi 63 fi
64 fi 64 fi
65 65
66 for input in *.cpp; do 66 for input in *.cpp; do
67 do_testcase "${input}" "${input%cpp}txt" 67 do_testcase "${input}" "${input%cpp}txt"
68 done 68 done
69 69
70 if [[ "${failed_any_test}" ]]; then 70 if [[ "${failed_any_test}" ]]; then
71 exit ${E_FAILEDTEST} 71 exit ${E_FAILEDTEST}
72 fi 72 fi
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698