summaryrefslogtreecommitdiffstats
path: root/tools/clang
diff options
context:
space:
mode:
authorthakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-09-26 19:50:20 +0000
committerthakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-09-26 19:50:20 +0000
commitd48bb34e0e85ac1c5962ae4b9b0d366bacc1ccee (patch)
treeca9223bd1f7e9d7438b4073b40b8044a180b2586 /tools/clang
parent99372841aea3f058340e82a09c7f0d64a7d9ed47 (diff)
downloadchromium_src-d48bb34e0e85ac1c5962ae4b9b0d366bacc1ccee.zip
chromium_src-d48bb34e0e85ac1c5962ae4b9b0d366bacc1ccee.tar.gz
chromium_src-d48bb34e0e85ac1c5962ae4b9b0d366bacc1ccee.tar.bz2
clang plugin test script: Set $? if a test fails.
I want to run this script automatically on clang rolls, and need a working $? to detect failure. BUG=none TEST=none Review URL: http://codereview.chromium.org/8038011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@102782 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'tools/clang')
-rwxr-xr-xtools/clang/plugins/tests/test.sh8
1 files changed, 8 insertions, 0 deletions
diff --git a/tools/clang/plugins/tests/test.sh b/tools/clang/plugins/tests/test.sh
index 37bbaf6..8d73d7f 100755
--- a/tools/clang/plugins/tests/test.sh
+++ b/tools/clang/plugins/tests/test.sh
@@ -8,6 +8,9 @@
# and compares the output with golden result files.
E_BADARGS=65
+E_FAILEDTEST=1
+
+failed_any_test=
# Prints usage information.
usage() {
@@ -27,6 +30,7 @@ do_testcase() {
if [ "${diffout}" = "" ]; then
echo "PASS: ${1}"
else
+ failed_any_test=yes
echo "FAIL: ${1}"
echo "Output of compiler:"
echo "${output}"
@@ -57,3 +61,7 @@ fi
for input in *.cpp; do
do_testcase "${input}" "${input%cpp}txt"
done
+
+if [[ "${failed_any_test}" ]]; then
+ exit ${E_FAILEDTEST}
+fi