diff options
author | Rich Salz <rsalz@openssl.org> | 2015-04-10 10:06:17 -0400 |
---|---|---|
committer | Rich Salz <rsalz@openssl.org> | 2015-04-10 10:06:17 -0400 |
commit | 30f54ad295d58ff8c6d28c1fd612d23c2c343d19 (patch) | |
tree | f740e39be9698b13d0f0a088903b236988aeb075 /test/testca | |
parent | 2cfdfe0918f03f8323c9523a2beb2b363ae86ca7 (diff) | |
download | openssl-30f54ad295d58ff8c6d28c1fd612d23c2c343d19.tar.gz |
test script cleanup
Removed commented-out tests
Standardize on doing
cmd ... || exit 1
instead of
cmd ...
if [ $? != 0] ; then
exit 1
fi
where that if statement has ben one, three, or four lines, variously.
Reviewed-by: Richard Levitte <levitte@openssl.org>
Diffstat (limited to 'test/testca')
-rw-r--r-- | test/testca | 25 |
1 files changed, 9 insertions, 16 deletions
diff --git a/test/testca b/test/testca index 0e2d05c572..8961cf8448 100644 --- a/test/testca +++ b/test/testca @@ -16,35 +16,28 @@ OPENSSL="`pwd`/../util/opensslwrap.sh" export OPENSSL /bin/rm -fr demoCA + +# Could do '...CA.pl -newca || exot 1 << EOF +# EOF' but that seems too obscure to me. :) OPENSSL_CONFIG=/dev/null $PERL ../apps/CA.pl -newca <<EOF EOF - -if [ $? != 0 ]; then - exit 1; -fi +[ $? == 0 ] || exit 1 SSLEAY_CONFIG="-config Uss.cnf" export SSLEAY_CONFIG -$PERL ../apps/CA.pl -newreq -if [ $? != 0 ]; then - exit 1; -fi - +$PERL ../apps/CA.pl -newreq || exit 1 SSLEAY_CONFIG="-config ../apps/openssl.cnf" export SSLEAY_CONFIG + +# Same comment here. $PERL ../apps/CA.pl -sign <<EOF y y EOF -if [ $? != 0 ]; then - exit 1; -fi +[ $? == 0 ] || exit 1 -$PERL ../apps/CA.pl -verify newcert.pem -if [ $? != 0 ]; then - exit 1; -fi +$PERL ../apps/CA.pl -verify newcert.pem || exit 1 /bin/rm -fr demoCA newcert.pem newreq.pem |