summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick McDermott <patrick.mcdermott@libiquity.com>2019-03-14 20:56:48 (EDT)
committer Patrick McDermott <patrick.mcdermott@libiquity.com>2019-03-14 21:03:16 (EDT)
commit99a6fe694a0b0074861e35fe29c5c56feb9a379e (patch)
tree830f6485ea0b5324e60870500043f8564dee79fc
parent44d41cd6342396e6bb834d192afb8c7bc4ff6afc (diff)
tests/ob_arch_is_concerned.sh: Add more test cases
These are similar to test cases in tests/ob_match_arch.sh.
-rwxr-xr-xtests/ob_arch_is_concerned.sh44
1 files changed, 43 insertions, 1 deletions
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'