diff options
author | Dmitry Eremin-Solenikov <dbaryshkov@gmail.com> | 2018-11-29 06:05:22 +0300 |
---|---|---|
committer | Dmitry Eremin-Solenikov <dbaryshkov@gmail.com> | 2018-11-29 06:16:25 +0300 |
commit | feea70eb5639fcdbdbc7572370677dbafda7aea5 (patch) | |
tree | 9990f116b10cb4f92e46cb76b9dc96c485f55d2c | |
parent | f57bc651f14103218e5a543a4269756c8d8cab86 (diff) | |
download | gnutls-feea70eb5639fcdbdbc7572370677dbafda7aea5.tar.gz |
tests: attempt to fix test errors on Mac OS X
It looks like Mac OS X's grep has issues with applying basic regexps
with alternation operator inside. Use several grep calls in pipeline to
achieve the same result.
Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
-rwxr-xr-x | tests/cert-tests/crl | 2 | ||||
-rwxr-xr-x | tests/cert-tests/crq | 2 | ||||
-rwxr-xr-x | tests/cert-tests/pem-decoding | 6 | ||||
-rwxr-xr-x | tests/cert-tests/pkcs12 | 2 | ||||
-rwxr-xr-x | tests/cert-tests/pkcs7 | 2 | ||||
-rwxr-xr-x | tests/cert-tests/privkey-import | 2 |
6 files changed, 8 insertions, 8 deletions
diff --git a/tests/cert-tests/crl b/tests/cert-tests/crl index bea0c5237e..9ca61d7700 100755 --- a/tests/cert-tests/crl +++ b/tests/cert-tests/crl @@ -63,7 +63,7 @@ if test "${rc}" != "0"; then exit ${rc} fi -if grep -v '^-----BEGIN [A-Z0-9 ]\+-----$\|^[A-Za-z0-9/+=]\+$\|^-----END [A-Z0-9 ]\+-----$' ${TMP2FILE} ; then +if grep -v '^-----BEGIN [A-Z0-9 ]\+-----$' ${TMP2FILE} | grep -v '^[A-Za-z0-9/+=]\+$' | grep -v '^-----END [A-Z0-9 ]\+-----$' ; then echo "--no-text crl info failed 2" exit 1 fi diff --git a/tests/cert-tests/crq b/tests/cert-tests/crq index 58581e4148..e29f17a17f 100755 --- a/tests/cert-tests/crq +++ b/tests/cert-tests/crq @@ -74,7 +74,7 @@ if test "${rc}" != "0"; then exit ${rc} fi -if grep -v '^-----BEGIN [A-Z0-9 ]\+-----$\|^[A-Za-z0-9/+=]\+$\|^-----END [A-Z0-9 ]\+-----$' ${TMPFILE} ; then +if grep -v '^-----BEGIN [A-Z0-9 ]\+-----$' ${TMPFILE} | grep -v '^[A-Za-z0-9/+=]\+$' | grep -v '^-----END [A-Z0-9 ]\+-----$' ; then echo "--no-text crq info failed 2" exit 1 fi diff --git a/tests/cert-tests/pem-decoding b/tests/cert-tests/pem-decoding index c5ba22e26d..1daf926317 100755 --- a/tests/cert-tests/pem-decoding +++ b/tests/cert-tests/pem-decoding @@ -188,7 +188,7 @@ if test "${rc}" != "0"; then exit ${rc} fi -if grep -v '^-----BEGIN [A-Z0-9 ]\+-----$\|^[A-Za-z0-9/+=]\+$\|^-----END [A-Z0-9 ]\+-----$' ${TMPFILE} ; then +if grep -v '^-----BEGIN [A-Z0-9 ]\+-----$' ${TMPFILE} | grep -v '^[A-Za-z0-9/+=]\+$' | grep -v '^-----END [A-Z0-9 ]\+-----$' ; then echo "--no-text -k --certificate-info failed 2" exit 1 fi @@ -202,7 +202,7 @@ if test "${rc}" != "0"; then exit ${rc} fi -if grep -v '^-----BEGIN [A-Z0-9 ]\+-----$\|^[A-Za-z0-9/+=]\+$\|^-----END [A-Z0-9 ]\+-----$' ${TMPFILE} ; then +if grep -v '^-----BEGIN [A-Z0-9 ]\+-----$' ${TMPFILE} | grep -v '^[A-Za-z0-9/+=]\+$' | grep -v '^-----END [A-Z0-9 ]\+-----$' ; then echo "--no-text cert pubkey failed 2" exit 1 fi @@ -216,7 +216,7 @@ if test "${rc}" != "0"; then exit ${rc} fi -if grep -v '^-----BEGIN [A-Z0-9 ]\+-----$\|^[A-Za-z0-9/+=]\+$\|^-----END [A-Z0-9 ]\+-----$' ${TMPFILE} ; then +if grep -v '^-----BEGIN [A-Z0-9 ]\+-----$' ${TMPFILE} | grep -v '^[A-Za-z0-9/+=]\+$' | grep -v '^-----END [A-Z0-9 ]\+-----$' ; then echo "--no-text pubkey info failed 2" exit 1 fi diff --git a/tests/cert-tests/pkcs12 b/tests/cert-tests/pkcs12 index d05389d10f..f28230a7b2 100755 --- a/tests/cert-tests/pkcs12 +++ b/tests/cert-tests/pkcs12 @@ -88,7 +88,7 @@ if test "${rc}" != "0"; then exit ${rc} fi -if grep -v '^-----BEGIN [A-Z0-9 ]\+-----$\|^[A-Za-z0-9/+=]\+$\|^-----END [A-Z0-9 ]\+-----$' ${TMPFILE} ; then +if grep -v '^-----BEGIN [A-Z0-9 ]\+-----$' ${TMPFILE} | grep -v '^[A-Za-z0-9/+=]\+$' | grep -v '^-----END [A-Z0-9 ]\+-----$' ; then echo "--no-text pkcs12 info failed 2" exit 1 fi diff --git a/tests/cert-tests/pkcs7 b/tests/cert-tests/pkcs7 index bfe11290fc..eed9f068a2 100755 --- a/tests/cert-tests/pkcs7 +++ b/tests/cert-tests/pkcs7 @@ -72,7 +72,7 @@ if test "${rc}" != "0"; then exit ${rc} fi -if grep -v '^-----BEGIN [A-Z0-9 ]\+-----$\|^[A-Za-z0-9/+=]\+$\|^-----END [A-Z0-9 ]\+-----$' ${TMPFILE} ; then +if grep -v '^-----BEGIN [A-Z0-9 ]\+-----$' ${TMPFILE} | grep -v '^[A-Za-z0-9/+=]\+$' | grep -v '^-----END [A-Z0-9 ]\+-----$' ; then echo "--no-text pkcs7 info failed 2" exit 1 fi diff --git a/tests/cert-tests/privkey-import b/tests/cert-tests/privkey-import index f3f94806fa..73bacae253 100755 --- a/tests/cert-tests/privkey-import +++ b/tests/cert-tests/privkey-import @@ -52,7 +52,7 @@ if test "${rc}" != "0"; then exit ${rc} fi -if grep -v '^-----BEGIN [A-Z0-9 ]\+-----$\|^[A-Za-z0-9/+=]\+$\|^-----END [A-Z0-9 ]\+-----$' ${TMPFILE} ; then +if grep -v '^-----BEGIN [A-Z0-9 ]\+-----$' ${TMPFILE} | grep -v '^[A-Za-z0-9/+=]\+$' | grep -v '^-----END [A-Z0-9 ]\+-----$' ; then echo "--no-text privkey info failed 2" exit 1 fi |