summaryrefslogtreecommitdiff
path: root/tests/scripts/common.sh
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@redhat.com>2017-05-26 12:43:21 +0200
committerNikos Mavrogiannopoulos <nmav@redhat.com>2017-05-26 17:36:33 +0200
commit085aa25d09db57f0ccb60305439478696ba2c47d (patch)
treea84457aff5818834d1d2cfeeaf6a0db3997ba6fb /tests/scripts/common.sh
parent6b748886799f88ddee9721dba4fc4d52854832ae (diff)
downloadgnutls-085aa25d09db57f0ccb60305439478696ba2c47d.tar.gz
tests: skip x86-specific tests when not in x86
Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
Diffstat (limited to 'tests/scripts/common.sh')
-rw-r--r--tests/scripts/common.sh12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/scripts/common.sh b/tests/scripts/common.sh
index 485197a291..5b6734b7dd 100644
--- a/tests/scripts/common.sh
+++ b/tests/scripts/common.sh
@@ -83,6 +83,18 @@ fail() {
exit 1
}
+exit_if_non_x86()
+{
+which lscpu >/dev/null 2>&1
+if test $? = 0;then
+ $(which lscpu)|grep Architecture|grep x86
+ if test $? != 0;then
+ echo "non-x86 CPU detected"
+ exit 0
+ fi
+fi
+}
+
wait_for_port()
{
local ret