From 99a6fe694a0b0074861e35fe29c5c56feb9a379e Mon Sep 17 00:00:00 2001 From: Patrick McDermott Date: Thu, 14 Mar 2019 20:56:48 -0400 Subject: tests/ob_arch_is_concerned.sh: Add more test cases These are similar to test cases in tests/ob_match_arch.sh. --- (limited to 'tests') diff --git a/tests/ob_arch_is_concerned.sh b/tests/ob_arch_is_concerned.sh index 41c57d2..f88abef 100755 --- a/tests/ob_arch_is_concerned.sh +++ b/tests/ob_arch_is_concerned.sh @@ -22,7 +22,7 @@ set -e . "${TOP_SRCDIR}/tests/aux/tap-functions.sh" . "${TOP_BUILDDIR}/lib/libopkbuild.${SHSOEXT}.${LIBOPKBUILD_SHSOVERSION}" -plan_ 12 +plan_ 18 # Architecture: all @@ -103,3 +103,45 @@ command_ok_ \ not ob_arch_is_concerned \ 'all' \ '!amd64-linux-glibc' + +# Architecture: amd64-any-any + +command_ok_ \ + 'HOST "amd64-linux-glibc" DOES NOT MATCH ARCH "amd64-any-any"' -- \ + ob_arch_is_concerned \ + 'amd64-linux-glibc' \ + 'amd64-any-any' + +command_ok_ \ + 'HOST "i686-linux-glibc" DOES MATCH ARCH "amd64-any-any"' -- \ + not ob_arch_is_concerned \ + 'i686-linux-glibc' \ + 'amd64-any-any' + +command_ok_ \ + 'HOST "all" DOES NOT MATCH ARCH "amd64-any-any"' -- \ + not ob_arch_is_concerned \ + 'all' \ + 'amd64-any-any' + +# Architecture: cortexa8-any-any i686-any-any + +command_ok_ \ + 'HOST "amd64-linux-glibc" DOES NOT MATCH ARCH '$(: \ + )'"cortexa8-any-any i686-any-any"' -- \ + not ob_arch_is_concerned \ + 'amd64-linux-glibc' \ + 'cortexa8-any-any i686-any-any' + +command_ok_ \ + 'HOST "i686-linux-glibc" DOES MATCH ARCH '$(: \ + )'"cortexa8-any-any i686-any-any"' -- \ + ob_arch_is_concerned \ + 'i686-linux-glibc' \ + 'cortexa8-any-any i686-any-any' + +command_ok_ \ + 'HOST "all" DOES NOT MATCH ARCH "cortexa8-any-any i686-any-any"' -- \ + not ob_arch_is_concerned \ + 'all' \ + 'cortexa8-any-any i686-any-any' -- cgit v0.9.1