From 34a77f7822126263fed5c72aedaa65b58fee94ac Mon Sep 17 00:00:00 2001 From: P. J. McDermott Date: Mon, 07 Dec 2015 12:07:15 -0500 Subject: Merge branch 'feature/use-shld' --- (limited to 'tests/arch_is_concerned.sh') diff --git a/tests/arch_is_concerned.sh b/tests/arch_is_concerned.sh index 5358b73..c6c1d17 100755 --- a/tests/arch_is_concerned.sh +++ b/tests/arch_is_concerned.sh @@ -20,10 +20,6 @@ # along with the ProteanOS Development Kit. If not, see # . -. "${srcdir}/tests/common.sh" - -use archplat - do_test() { local host_arch="${1}" @@ -47,50 +43,45 @@ do_test() fi } -# Architecture: all - -do_test 'amd64-linux-glibc' 'all' false - -do_test 'i686-linux-glibc' 'all' false - -do_test 'all' 'all' true - -# Architecture: any - -do_test 'amd64-linux-glibc' 'any' true - -do_test 'i686-linux-glibc' 'any' true - -do_test 'all' 'any' false - -# Architecture: amd64-linux-glibc - -do_test 'amd64-linux-glibc' 'amd64-linux-glibc' true - -do_test 'i686-linux-glibc' 'amd64-linux-glibc' false - -do_test 'all' 'amd64-linux-glibc' false - -# Architecture: !amd64-linux-glibc - -do_test 'amd64-linux-glibc' '!amd64-linux-glibc' false - -do_test 'i686-linux-glibc' '!amd64-linux-glibc' true - -do_test 'all' '!amd64-linux-glibc' false - -# Architecture: amd64-linux-glibc cortexa8-linux-glibc - -do_test 'amd64-linux-glibc' 'amd64-linux-glibc cortexa8-linux-glibc' true - -do_test 'i686-linux-glibc' 'amd64-linux-glibc cortexa8-linux-glibc' false - -do_test 'all' 'amd64-linux-glibc cortexa8-linux-glibc' false - -# Architecture: amd64-linux-glibc all - -do_test 'amd64-linux-glibc' 'amd64-linux-glibc all' true - -do_test 'i686-linux-glibc' 'amd64-linux-glibc all' false - -do_test 'all' 'amd64-linux-glibc all' true +main() +{ + local arches= + + # Architecture: all + arches='all' + do_test 'amd64-linux-glibc' "${arches}" false + do_test 'i686-linux-glibc' "${arches}" false + do_test 'all' "${arches}" true + + # Architecture: any + arches='any' + do_test 'amd64-linux-glibc' "${arches}" true + do_test 'i686-linux-glibc' "${arches}" true + do_test 'all' "${arches}" false + + # Architecture: amd64-linux-glibc + arches='amd64-linux-glibc' + do_test 'amd64-linux-glibc' "${arches}" true + do_test 'i686-linux-glibc' "${arches}" false + do_test 'all' "${arches}" false + + # Architecture: !amd64-linux-glibc + arches='!amd64-linux-glibc' + do_test 'amd64-linux-glibc' "${arches}" false + do_test 'i686-linux-glibc' "${arches}" true + do_test 'all' "${arches}" false + + # Architecture: amd64-linux-glibc cortexa8-linux-glibc + arches='amd64-linux-glibc cortexa8-linux-glibc' + do_test 'amd64-linux-glibc' "${arches}" true + do_test 'i686-linux-glibc' "${arches}" false + do_test 'all' "${arches}" false + + # Architecture: amd64-linux-glibc all + arches='amd64-linux-glibc all' + do_test 'amd64-linux-glibc' "${arches}" true + do_test 'i686-linux-glibc' "${arches}" false + do_test 'all' "${arches}" true + + return 0 +} -- cgit v0.9.1