summaryrefslogtreecommitdiff
path: root/tests/slow/test-ciphers-common.sh
diff options
context:
space:
mode:
Diffstat (limited to 'tests/slow/test-ciphers-common.sh')
-rw-r--r--tests/slow/test-ciphers-common.sh6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/slow/test-ciphers-common.sh b/tests/slow/test-ciphers-common.sh
index 1a76b48ce0..e8b38c84ed 100644
--- a/tests/slow/test-ciphers-common.sh
+++ b/tests/slow/test-ciphers-common.sh
@@ -23,7 +23,7 @@ if ! test -z "${VALGRIND}"; then
VALGRIND="${LIBTOOL:-libtool} --mode=execute ${VALGRIND}"
fi
-srcdir="${srcdir:-.}"
+: ${srcdir=.}
. "${srcdir}/../scripts/common.sh"
${PROG}
@@ -74,8 +74,8 @@ if test $ret != 0; then
fi
#SHANI
-$(which lscpu)|grep Flags|grep sha_ni >/dev/null
-if test $? = 0;then
+if (lscpu --version) >/dev/null 2>&1 && \
+ lscpu 2>/dev/null | grep 'Flags:[ ]*sha_ni' >/dev/null; then
GNUTLS_CPUID_OVERRIDE=0x20 ${PROG}
ret=$?
if test $ret != 0; then