diff options
| -rw-r--r-- | Documentation/test-suite | 5 | ||||
| -rwxr-xr-x | validation/test-suite | 18 |
2 files changed, 23 insertions, 0 deletions
diff --git a/Documentation/test-suite b/Documentation/test-suite index d9d2ea52..160fed31 100644 --- a/Documentation/test-suite +++ b/Documentation/test-suite @@ -22,6 +22,11 @@ check-command: <command arg ...> run time. It defaults to "sparse $file". +check-arch-ignore: <arch[|...]> +check-arch-only: <arch[|...]> + Ignore the test if the current architecture (as returned by 'uname -m') + match or not one of the archs given in the pattern. + check-exit-value: <value> The expected exit value of check-command. It defaults to 0. diff --git a/validation/test-suite b/validation/test-suite index df978c11..f4fa3f9b 100755 --- a/validation/test-suite +++ b/validation/test-suite @@ -56,6 +56,8 @@ get_tag_value() check_output_excludes=0 check_output_pattern_obsolete=0 check_output_pattern=0 + check_arch_ignore="" + check_arch_only="" lines=$(grep 'check-[a-z-]*' $1 | \ sed -e 's/^.*\(check-[a-z-]*:*\) *\(.*\)$/\1 \2/') @@ -76,6 +78,10 @@ get_tag_value() check-output-excludes:) check_output_excludes=1 ;; check-output-pattern-) check_output_pattern_obsolete=1 ;; check-output-pattern) check_output_pattern=1 ;; + check-arch-ignore:) arch=$(uname -m) + check_arch_ignore="$val" ;; + check-arch-only:) arch=$(uname -m) + check_arch_only="$val" ;; esac done << EOT $lines @@ -272,6 +278,18 @@ do_test() return 3 fi done + if [ "$check_arch_ignore" != "" ]; then + if echo $arch | egrep -q -w "$check_arch_ignore"; then + disable "$test_name" "$file" + return 3 + fi + fi + if [ "$check_arch_only" != "" ]; then + if ! (echo $arch | egrep -q -w "$check_arch_only"); then + disable "$test_name" "$file" + return 3 + fi + fi cmd=`eval echo $default_path/$check_command` |
