]> git.ipfire.org Git - thirdparty/gnutls.git/commitdiff
tests: skip tests that requires tools if tools are disabled
authorAlon Bar-Lev <alon.barlev@gmail.com>
Fri, 20 Jan 2017 21:39:41 +0000 (23:39 +0200)
committerAlon Bar-Lev <alon.barlev@gmail.com>
Mon, 23 Jan 2017 18:51:36 +0000 (20:51 +0200)
building with --disable-tools should not cause test failure.

Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com>
tests/key-tests/illegal-rsa

index aacd97e3064a203b0dd39946ffa403e37f5b2043..9e6a5b6895722b97db766880343a628f898d9a81 100755 (executable)
@@ -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.