summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlon Bar-Lev <alon.barlev@gmail.com>2017-01-20 23:39:41 +0200
committerNikos Mavrogiannopoulos <nmav@gnutls.org>2017-01-25 15:48:04 +0100
commitc9db51920a691797670c290909ea851fa7abb08c (patch)
treebb6546bc4da5388608acff4f9162bb2147e9f088
parentde04596e55d786a448136aa2ef0fd9c343b82eb0 (diff)
downloadgnutls-c9db51920a691797670c290909ea851fa7abb08c.tar.gz
tests: skip tests that requires tools if tools are disabled
building with --disable-tools should not cause test failure. Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com>
-rwxr-xr-xtests/key-tests/illegal-rsa6
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/key-tests/illegal-rsa b/tests/key-tests/illegal-rsa
index aacd97e306..9e6a5b6895 100755
--- a/tests/key-tests/illegal-rsa
+++ b/tests/key-tests/illegal-rsa
@@ -22,12 +22,16 @@ srcdir="${srcdir:-.}"
CERTTOOL="${CERTTOOL:-../../src/certtool${EXEEXT}}"
GREP="${GREP:-grep}"
-TMPFILE=tmp-key.$$.p8
+if ! test -x "${CERTTOOL}"; then
+ exit 77
+fi
if ! test -z "${VALGRIND}"; then
VALGRIND="${LIBTOOL:-libtool} --mode=execute ${VALGRIND} --error-exitcode=1"
fi
+TMPFILE=tmp-key.$$.p8
+
${VALGRIND} "${CERTTOOL}" -k --password 1234 --infile "${srcdir}/data/p8key-illegal.pem"
rc=$?
# We're done.