summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorPhilip Withnall <philip.withnall@collabora.co.uk>2015-01-27 12:35:42 +0000
committerPhilip Withnall <philip.withnall@collabora.co.uk>2015-01-27 12:35:42 +0000
commit9f3a872b12b59e1177f59bdc6363cb50bda8ec32 (patch)
tree63e35fd4eabc9868927c8a74f8e35e341a235587 /tests
parent768c993f803676ed8b6af0bbf44fde2f2e535f44 (diff)
tests: Improve support for testing against LLVM 3.4 and 3.5
As described in commit 0743df4033967c18a5009e4f01ccf709f7c06c86, LLVM changed an error message between 3.4 and 3.5. We ignored the problem before, but actually it’s easy (if hacky) to fix by checking against both versions of the error message in the wrapper script.
Diffstat (limited to 'tests')
-rwxr-xr-xtests/wrapper-compiler-errors14
1 files changed, 12 insertions, 2 deletions
diff --git a/tests/wrapper-compiler-errors b/tests/wrapper-compiler-errors
index 264618c..8e30771 100755
--- a/tests/wrapper-compiler-errors
+++ b/tests/wrapper-compiler-errors
@@ -107,10 +107,20 @@ while [[ -f `printf "${temp_dir}/${input_filename}_%02d.c" ${num}` ]]; do
while read line
do
+ # Check the string and the string with ‘which’ for
+ # ‘that’ against the actual errors. This is a hack
+ # needed to support testing against LLVM 3.4 and 3.5
+ # from the same test vectors.
+ #
+ # See commit 0743df4033967c18a5009e4f01ccf709f7c06c86
+ # for details.
grep -F "${line}" "${actual_error_filename}" >/dev/null
- grep_status=$?
+ grep_status1=$?
- if [ $grep_status -ne 0 ]; then
+ grep -F "${line//that/which}" "${actual_error_filename}" >/dev/null
+ grep_status2=$?
+
+ if [ $grep_status1 -ne 0 -a $grep_status2 -ne 0 ]; then
echo " * Non-matching line:" 1>&2
echo "${line}" 1>&2
grep_failed=1