[Mesa-dev] [PATCH 10/12] glcpp/tests: Allow different trailing whitespace

Vladislav Egorov vegorov180 at gmail.com
Sat Jan 7 19:02:11 UTC 2017


There is no point really to enforce exact amount of trailing whitespace
in preprocessor output. Other preprocessors generate even less trailing
whitespace than glcpp. The less trailing whitespace, the better.
---
 src/compiler/glsl/glcpp/tests/glcpp-test | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/compiler/glsl/glcpp/tests/glcpp-test b/src/compiler/glsl/glcpp/tests/glcpp-test
index 3945ee4..5fe53b4 100755
--- a/src/compiler/glsl/glcpp/tests/glcpp-test
+++ b/src/compiler/glsl/glcpp/tests/glcpp-test
@@ -69,12 +69,12 @@ for test in $testdir/*.c; do
     printf "Testing $test... > $out ($test.expected) "
     $glcpp $(test_specific_args $test) < $test > $out 2>&1
     total=$((total+1))
-    if cmp $test.expected $out >/dev/null 2>&1; then
+    if diff -Z -q $test.expected $out >/dev/null 2>&1; then
 	echo "PASS"
 	pass=$((pass+1))
     else
 	echo "FAIL"
-	diff -u $test.expected $out
+	diff -Z -u $test.expected $out
     fi
 done
 
-- 
2.7.4



More information about the mesa-dev mailing list