diff options
| author | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2017-09-11 06:19:07 +0200 |
|---|---|---|
| committer | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2017-11-08 10:51:02 +0100 |
| commit | d5aa4d326b9d7e9ee8ae3d1d430fff574c3e1d6f (patch) | |
| tree | 8238e7d0f8a4c801f70b9cabfa616af529d1885a /validation | |
| parent | 893581b46dd9563aa5df0020f668b369103334ec (diff) | |
| download | sparse-dev-d5aa4d326b9d7e9ee8ae3d1d430fff574c3e1d6f.tar.gz | |
testsuite: allow arch-specific tests
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Diffstat (limited to 'validation')
| -rwxr-xr-x | validation/test-suite | 18 |
1 files changed, 18 insertions, 0 deletions
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` |
