summaryrefslogtreecommitdiffstats
path: root/tests/arch_is_concerned.sh
diff options
context:
space:
mode:
Diffstat (limited to 'tests/arch_is_concerned.sh')
-rwxr-xr-xtests/arch_is_concerned.sh93
1 files changed, 42 insertions, 51 deletions
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
# <http://www.gnu.org/licenses/>.
-. "${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
+}