aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/validation/test-suite
diff options
Diffstat (limited to 'validation/test-suite')
-rwxr-xr-xvalidation/test-suite14
1 files changed, 14 insertions, 0 deletions
diff --git a/validation/test-suite b/validation/test-suite
index 4fdc9e9f..6c6d34b2 100755
--- a/validation/test-suite
+++ b/validation/test-suite
@@ -79,6 +79,7 @@ get_tag_value()
check_output_pattern=0
check_arch_ignore=""
check_arch_only=""
+ check_cpp_if=""
lines=$(grep 'check-[a-z-]*' $1 | \
sed -e 's/^.*\(check-[a-z-]*:*\) *\(.*\)$/\1 \2/')
@@ -102,6 +103,7 @@ get_tag_value()
check_arch_ignore="$val" ;;
check-arch-only:) arch=$(uname -m)
check_arch_only="$val" ;;
+ check-cpp-if:) check_cpp_if="$val" ;;
check-description:) ;; # ignore
check-note:) ;; # ignore
@@ -301,6 +303,18 @@ do_test()
return 3
fi
fi
+ if [ "$check_cpp_if" != "" ]; then
+ res=$(../sparse -E - 2>/dev/null <<- EOF
+ #if !($check_cpp_if)
+ fail
+ #endif
+ EOF
+ )
+ if [ "$res" != "" ]; then
+ disable "$test_name" "$file"
+ return 3
+ fi
+ fi
if [ -z "$vquiet" ]; then
echo " TEST $test_name ($file)"