diff options
author | Alon Bar-Lev <alon.barlev@gmail.com> | 2017-01-05 10:34:07 +0200 |
---|---|---|
committer | Alon Bar-Lev <alon.barlev@gmail.com> | 2017-01-05 11:16:38 +0200 |
commit | 98e49e9d0727d93a58b336dac0a78ce74558e8c8 (patch) | |
tree | 61653d08a7243ce4cd40f7f97efdd6c2e06b054d | |
parent | 2c55e6b554a3d30ee92b37aae02536794fd5cac1 (diff) | |
download | gnutls-98e49e9d0727d93a58b336dac0a78ce74558e8c8.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-x | tests/cert-tests/crq | 6 | ||||
-rwxr-xr-x | tests/cert-tests/krb5-test | 4 | ||||
-rwxr-xr-x | tests/cert-tests/md5-test | 5 | ||||
-rwxr-xr-x | tests/cert-tests/name-constraints | 6 | ||||
-rwxr-xr-x | tests/cert-tests/othername-test | 4 | ||||
-rwxr-xr-x | tests/cert-tests/pkcs1-pad | 4 | ||||
-rwxr-xr-x | tests/cert-tests/pkcs7 | 6 | ||||
-rwxr-xr-x | tests/cert-tests/pkcs7-cat | 6 | ||||
-rwxr-xr-x | tests/cert-tests/pkcs7-constraints | 6 | ||||
-rwxr-xr-x | tests/cert-tests/pkcs7-constraints2 | 6 | ||||
-rwxr-xr-x | tests/cert-tests/sha3-test | 5 | ||||
-rwxr-xr-x | tests/cert-tests/template-exts-test | 4 | ||||
-rwxr-xr-x | tests/cert-tests/template-test | 4 | ||||
-rwxr-xr-x | tests/cert-tests/tlsfeature-test | 5 | ||||
-rwxr-xr-x | tests/ocsp-tests/ocsp-must-staple-connection | 16 | ||||
-rwxr-xr-x | tests/ocsp-tests/ocsp-test | 4 | ||||
-rwxr-xr-x | tests/ocsp-tests/ocsp-tls-connection | 16 | ||||
-rwxr-xr-x | tests/rsa-md5-collision/rsa-md5-collision.sh | 4 | ||||
-rwxr-xr-x | tests/suite/testcompat-main-openssl | 5 | ||||
-rwxr-xr-x | tests/suite/testcompat-main-polarssl | 5 |
20 files changed, 121 insertions, 0 deletions
diff --git a/tests/cert-tests/crq b/tests/cert-tests/crq index 983184695e..41973c9f83 100755 --- a/tests/cert-tests/crq +++ b/tests/cert-tests/crq @@ -25,9 +25,15 @@ srcdir="${srcdir:-.}" CERTTOOL="${CERTTOOL:-../../src/certtool${EXEEXT}}" DIFF="${DIFF:-diff}" + +if ! test -x "${CERTTOOL}"; then + exit 77 +fi + if ! test -z "${VALGRIND}"; then VALGRIND="${LIBTOOL:-libtool} --mode=execute ${VALGRIND} --error-exitcode=15" fi + OUTFILE=out.$$.tmp OUTFILE2=out2.$$.tmp diff --git a/tests/cert-tests/krb5-test b/tests/cert-tests/krb5-test index 54ce215611..3ada1f9b4e 100755 --- a/tests/cert-tests/krb5-test +++ b/tests/cert-tests/krb5-test @@ -26,6 +26,10 @@ DIFF="${DIFF:-diff}" OUTFILE=tmp-krb5name.pem TMPLFILE=tmp-krb5name.tmpl +if ! test -x "${CERTTOOL}"; then + exit 77 +fi + export TZ="UTC" . ${srcdir}/../scripts/common.sh diff --git a/tests/cert-tests/md5-test b/tests/cert-tests/md5-test index c72cc14919..a9635cc1d8 100755 --- a/tests/cert-tests/md5-test +++ b/tests/cert-tests/md5-test @@ -25,6 +25,11 @@ srcdir="${srcdir:-.}" CERTTOOL="${CERTTOOL:-../../src/certtool${EXEEXT}}" DIFF="${DIFF:-diff}" TMPFILE=md5.$$.tmp + +if ! test -x "${CERTTOOL}"; then + exit 77 +fi + export TZ="UTC" . ${srcdir}/../scripts/common.sh diff --git a/tests/cert-tests/name-constraints b/tests/cert-tests/name-constraints index 9645879a5c..9f7e453f36 100755 --- a/tests/cert-tests/name-constraints +++ b/tests/cert-tests/name-constraints @@ -23,9 +23,15 @@ srcdir="${srcdir:-.}" CERTTOOL="${CERTTOOL:-../../src/certtool${EXEEXT}}" DIFF="${DIFF:-diff}" + +if ! test -x "${CERTTOOL}"; then + exit 77 +fi + if ! test -z "${VALGRIND}"; then VALGRIND="${LIBTOOL:-libtool} --mode=execute ${VALGRIND}" fi + TMPFILE=tmp.$$.pem . ${srcdir}/../scripts/common.sh diff --git a/tests/cert-tests/othername-test b/tests/cert-tests/othername-test index 8741b0f52e..38032fee1c 100755 --- a/tests/cert-tests/othername-test +++ b/tests/cert-tests/othername-test @@ -25,6 +25,10 @@ CERTTOOL="${CERTTOOL:-../../src/certtool${EXEEXT}}" DIFF="${DIFF:-diff}" OUTFILE=tmp-othername.pem +if ! test -x "${CERTTOOL}"; then + exit 77 +fi + export TZ="UTC" . ${srcdir}/../scripts/common.sh diff --git a/tests/cert-tests/pkcs1-pad b/tests/cert-tests/pkcs1-pad index fe10cf22d8..bc859cc31d 100755 --- a/tests/cert-tests/pkcs1-pad +++ b/tests/cert-tests/pkcs1-pad @@ -26,6 +26,10 @@ set -e srcdir="${srcdir:-.}" CERTTOOL="${CERTTOOL:-../../src/certtool${EXEEXT}}" +if ! test -x "${CERTTOOL}"; then + exit 77 +fi + export TZ="UTC" # Check for datefudge diff --git a/tests/cert-tests/pkcs7 b/tests/cert-tests/pkcs7 index d6972603da..a06d92fbb6 100755 --- a/tests/cert-tests/pkcs7 +++ b/tests/cert-tests/pkcs7 @@ -23,9 +23,15 @@ srcdir="${srcdir:-.}" CERTTOOL="${CERTTOOL:-../../src/certtool${EXEEXT}}" DIFF="${DIFF:-diff -b -B}" + +if ! test -x "${CERTTOOL}"; then + exit 77 +fi + if ! test -z "${VALGRIND}"; then VALGRIND="${LIBTOOL:-libtool} --mode=execute ${VALGRIND} --error-exitcode=15" fi + OUTFILE=out-pkcs7.$$.tmp OUTFILE2=out2-pkcs7.$$.tmp diff --git a/tests/cert-tests/pkcs7-cat b/tests/cert-tests/pkcs7-cat index 7a18dd3b47..f55c085ab2 100755 --- a/tests/cert-tests/pkcs7-cat +++ b/tests/cert-tests/pkcs7-cat @@ -23,9 +23,15 @@ srcdir="${srcdir:-.}" CERTTOOL="${CERTTOOL:-../../src/certtool${EXEEXT}}" DIFF="${DIFF:-diff -b -B}" + +if ! test -x "${CERTTOOL}"; then + exit 77 +fi + if ! test -z "${VALGRIND}"; then VALGRIND="${LIBTOOL:-libtool} --mode=execute ${VALGRIND} --error-exitcode=15" fi + OUTFILE=out-pkcs7.$$.tmp . ${srcdir}/../scripts/common.sh diff --git a/tests/cert-tests/pkcs7-constraints b/tests/cert-tests/pkcs7-constraints index 8b786b6d82..8e5b5345d1 100755 --- a/tests/cert-tests/pkcs7-constraints +++ b/tests/cert-tests/pkcs7-constraints @@ -23,9 +23,15 @@ srcdir="${srcdir:-.}" CERTTOOL="${CERTTOOL:-../../src/certtool${EXEEXT}}" DIFF="${DIFF:-diff -b -B}" + +if ! test -x "${CERTTOOL}"; then + exit 77 +fi + if ! test -z "${VALGRIND}"; then VALGRIND="${LIBTOOL:-libtool} --mode=execute ${VALGRIND} --error-exitcode=15" fi + OUTFILE=out-pkcs7.$$.tmp . ${srcdir}/../scripts/common.sh diff --git a/tests/cert-tests/pkcs7-constraints2 b/tests/cert-tests/pkcs7-constraints2 index a31961f78e..389071e27b 100755 --- a/tests/cert-tests/pkcs7-constraints2 +++ b/tests/cert-tests/pkcs7-constraints2 @@ -23,9 +23,15 @@ srcdir="${srcdir:-.}" CERTTOOL="${CERTTOOL:-../../src/certtool${EXEEXT}}" DIFF="${DIFF:-diff -b -B}" + +if ! test -x "${CERTTOOL}"; then + exit 77 +fi + if ! test -z "${VALGRIND}"; then VALGRIND="${LIBTOOL:-libtool} --mode=execute ${VALGRIND} --error-exitcode=15" fi + OUTFILE=out-pkcs7.$$.tmp . ${srcdir}/../scripts/common.sh diff --git a/tests/cert-tests/sha3-test b/tests/cert-tests/sha3-test index 8d619e59f0..abb20bca04 100755 --- a/tests/cert-tests/sha3-test +++ b/tests/cert-tests/sha3-test @@ -24,6 +24,11 @@ srcdir="${srcdir:-.}" CERTTOOL="${CERTTOOL:-../../src/certtool${EXEEXT}}" DIFF="${DIFF:-diff}" TMPFILE=sha3.$$.tmp + +if ! test -x "${CERTTOOL}"; then + exit 77 +fi + export TZ="UTC" . ${srcdir}/../scripts/common.sh diff --git a/tests/cert-tests/template-exts-test b/tests/cert-tests/template-exts-test index 219cfdbc8d..8475981d00 100755 --- a/tests/cert-tests/template-exts-test +++ b/tests/cert-tests/template-exts-test @@ -25,6 +25,10 @@ CERTTOOL="${CERTTOOL:-../../src/certtool${EXEEXT}}" DIFF="${DIFF:-diff}" OUTFILE="exts.$$.tmp" +if ! test -x "${CERTTOOL}"; then + exit 77 +fi + export TZ="UTC" . ${srcdir}/../scripts/common.sh diff --git a/tests/cert-tests/template-test b/tests/cert-tests/template-test index 808b52a9e6..2f14bf2eab 100755 --- a/tests/cert-tests/template-test +++ b/tests/cert-tests/template-test @@ -24,6 +24,10 @@ srcdir="${srcdir:-.}" CERTTOOL="${CERTTOOL:-../../src/certtool${EXEEXT}}" DIFF="${DIFF:-diff}" +if ! test -x "${CERTTOOL}"; then + exit 77 +fi + export TZ="UTC" . ${srcdir}/../scripts/common.sh diff --git a/tests/cert-tests/tlsfeature-test b/tests/cert-tests/tlsfeature-test index e76aa109b3..aadbffc26a 100755 --- a/tests/cert-tests/tlsfeature-test +++ b/tests/cert-tests/tlsfeature-test @@ -25,6 +25,11 @@ CERTTOOL="${CERTTOOL:-../../src/certtool${EXEEXT}}" DIFF="${DIFF:-diff}" TMPFILE=tlsfeature.$$.tmp TMPFILE2=tlsfeature-2.$$.tmp + +if ! test -x "${CERTTOOL}"; then + exit 77 +fi + export TZ="UTC" . ${srcdir}/../scripts/common.sh diff --git a/tests/ocsp-tests/ocsp-must-staple-connection b/tests/ocsp-tests/ocsp-must-staple-connection index 2df3af1263..2c7aa1e322 100755 --- a/tests/ocsp-tests/ocsp-must-staple-connection +++ b/tests/ocsp-tests/ocsp-must-staple-connection @@ -31,6 +31,22 @@ OCSP_REQ_FILE="ms-req.$$.tmp" export TZ="UTC" +if ! test -x "${CERTTOOL}"; then + exit 77 +fi + +if ! test -x "${OCSPTOOL}"; then + exit 77 +fi + +if ! test -x "${GNUTLS_SERV}"; then + exit 77 +fi + +if ! test -x "${GNUTLS_CLI}"; then + exit 77 +fi + if ! test -z "${VALGRIND}"; then VALGRIND="${LIBTOOL:-libtool} --mode=execute ${VALGRIND} --error-exitcode=15" fi diff --git a/tests/ocsp-tests/ocsp-test b/tests/ocsp-tests/ocsp-test index 5fe2659162..e3a3ef5613 100755 --- a/tests/ocsp-tests/ocsp-test +++ b/tests/ocsp-tests/ocsp-test @@ -24,6 +24,10 @@ srcdir="${srcdir:-.}" OCSPTOOL="${OCSPTOOL:-../../src/ocsptool${EXEEXT}}" DIFF="${DIFF:-diff}" +if ! test -x "${OCSPTOOL}"; then + exit 77 +fi + export TZ="UTC" # Check for datefudge diff --git a/tests/ocsp-tests/ocsp-tls-connection b/tests/ocsp-tests/ocsp-tls-connection index 8a73f98650..d01b0fe9c9 100755 --- a/tests/ocsp-tests/ocsp-tls-connection +++ b/tests/ocsp-tests/ocsp-tls-connection @@ -30,6 +30,22 @@ DIFF="${DIFF:-diff}" TEMPLATE_FILE="out.$$.tmpl.tmp" SERVER_CERT_FILE="cert.$$.pem.tmp" +if ! test -x "${CERTTOOL}"; then + exit 77 +fi + +if ! test -x "${OCSPTOOL}"; then + exit 77 +fi + +if ! test -x "${GNUTLS_SERV}"; then + exit 77 +fi + +if ! test -x "${GNUTLS_CLI}"; then + exit 77 +fi + if ! test -z "${VALGRIND}"; then VALGRIND="${LIBTOOL:-libtool} --mode=execute ${VALGRIND} --error-exitcode=15" fi diff --git a/tests/rsa-md5-collision/rsa-md5-collision.sh b/tests/rsa-md5-collision/rsa-md5-collision.sh index 27289595d9..a935804dc0 100755 --- a/tests/rsa-md5-collision/rsa-md5-collision.sh +++ b/tests/rsa-md5-collision/rsa-md5-collision.sh @@ -26,6 +26,10 @@ CERTTOOL="${CERTTOOL:-../src/certtool${EXEEXT}}" TMPFILE1=rsa-md5.$$.tmp TMPFILE2=rsa-md5-2.$$.tmp +if ! test -x "${CERTTOOL}"; then + exit 77 +fi + . ${srcdir}/scripts/common.sh check_for_datefudge diff --git a/tests/suite/testcompat-main-openssl b/tests/suite/testcompat-main-openssl index 7e6f6bec89..e38d7238e8 100755 --- a/tests/suite/testcompat-main-openssl +++ b/tests/suite/testcompat-main-openssl @@ -33,6 +33,11 @@ srcdir="${srcdir:-.}" CLI="${CLI:-../../src/gnutls-cli${EXEEXT}}" unset RETCODE + +if ! test -x "${CLI}"; then + exit 77 +fi + if ! test -z "${VALGRIND}"; then VALGRIND="${LIBTOOL:-libtool} --mode=execute ${VALGRIND}" fi diff --git a/tests/suite/testcompat-main-polarssl b/tests/suite/testcompat-main-polarssl index 91b6046436..311b1ca5ef 100755 --- a/tests/suite/testcompat-main-polarssl +++ b/tests/suite/testcompat-main-polarssl @@ -34,6 +34,11 @@ srcdir="${srcdir:-.}" CLI="${CLI:-../../src/gnutls-cli${EXEEXT}}" LOGFILE=polarssl.log unset RETCODE + +if ! test -x "${CLI}"; then + exit 77 +fi + if ! test -z "${VALGRIND}"; then VALGRIND="${LIBTOOL:-libtool} --mode=execute ${VALGRIND}" fi |