summaryrefslogtreecommitdiffstats
path: root/test/tx509
diff options
context:
space:
mode:
authorRich Salz <rsalz@openssl.org>2015-04-10 10:06:17 -0400
committerRich Salz <rsalz@openssl.org>2015-04-10 10:06:17 -0400
commit30f54ad295d58ff8c6d28c1fd612d23c2c343d19 (patch)
treef740e39be9698b13d0f0a088903b236988aeb075 /test/tx509
parent2cfdfe0918f03f8323c9523a2beb2b363ae86ca7 (diff)
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/tx509')
-rw-r--r--test/tx50971
1 files changed, 24 insertions, 47 deletions
diff --git a/test/tx509 b/test/tx509
index 4e9c0a54f2..f4774c0c99 100644
--- a/test/tx509
+++ b/test/tx509
@@ -13,67 +13,44 @@ echo testing X509 conversions
cp $t x509-fff.p
echo "p -> d"
-$cmd -in x509-fff.p -inform p -outform d >x509-f.d
-if [ $? != 0 ]; then exit 1; fi
+$cmd -in x509-fff.p -inform p -outform d >x509-f.d || exit 1
echo "p -> n"
-$cmd -in x509-fff.p -inform p -outform n >x509-f.n
-if [ $? != 0 ]; then exit 1; fi
+$cmd -in x509-fff.p -inform p -outform n >x509-f.n || exit 1
echo "p -> p"
-$cmd -in x509-fff.p -inform p -outform p >x509-f.p
-if [ $? != 0 ]; then exit 1; fi
+$cmd -in x509-fff.p -inform p -outform p >x509-f.p || exit 1
echo "d -> d"
-$cmd -in x509-f.d -inform d -outform d >x509-ff.d1
-if [ $? != 0 ]; then exit 1; fi
+$cmd -in x509-f.d -inform d -outform d >x509-ff.d1 || exit 1
echo "n -> d"
-$cmd -in x509-f.n -inform n -outform d >x509-ff.d2
-if [ $? != 0 ]; then exit 1; fi
+$cmd -in x509-f.n -inform n -outform d >x509-ff.d2 || exit 1
echo "p -> d"
-$cmd -in x509-f.p -inform p -outform d >x509-ff.d3
-if [ $? != 0 ]; then exit 1; fi
+$cmd -in x509-f.p -inform p -outform d >x509-ff.d3 || exit 1
echo "d -> n"
-$cmd -in x509-f.d -inform d -outform n >x509-ff.n1
-if [ $? != 0 ]; then exit 1; fi
+$cmd -in x509-f.d -inform d -outform n >x509-ff.n1 || exit 1
echo "n -> n"
-$cmd -in x509-f.n -inform n -outform n >x509-ff.n2
-if [ $? != 0 ]; then exit 1; fi
+$cmd -in x509-f.n -inform n -outform n >x509-ff.n2 || exit 1
echo "p -> n"
-$cmd -in x509-f.p -inform p -outform n >x509-ff.n3
-if [ $? != 0 ]; then exit 1; fi
+$cmd -in x509-f.p -inform p -outform n >x509-ff.n3 || exit 1
echo "d -> p"
-$cmd -in x509-f.d -inform d -outform p >x509-ff.p1
-if [ $? != 0 ]; then exit 1; fi
+$cmd -in x509-f.d -inform d -outform p >x509-ff.p1 || exit 1
echo "n -> p"
-$cmd -in x509-f.n -inform n -outform p >x509-ff.p2
-if [ $? != 0 ]; then exit 1; fi
+$cmd -in x509-f.n -inform n -outform p >x509-ff.p2 || exit 1
echo "p -> p"
-$cmd -in x509-f.p -inform p -outform p >x509-ff.p3
-if [ $? != 0 ]; then exit 1; fi
-
-cmp x509-fff.p x509-f.p
-if [ $? != 0 ]; then exit 1; fi
-cmp x509-fff.p x509-ff.p1
-if [ $? != 0 ]; then exit 1; fi
-cmp x509-fff.p x509-ff.p2
-if [ $? != 0 ]; then exit 1; fi
-cmp x509-fff.p x509-ff.p3
-if [ $? != 0 ]; then exit 1; fi
-
-cmp x509-f.n x509-ff.n1
-if [ $? != 0 ]; then exit 1; fi
-cmp x509-f.n x509-ff.n2
-if [ $? != 0 ]; then exit 1; fi
-cmp x509-f.n x509-ff.n3
-if [ $? != 0 ]; then exit 1; fi
-
-cmp x509-f.p x509-ff.p1
-if [ $? != 0 ]; then exit 1; fi
-cmp x509-f.p x509-ff.p2
-if [ $? != 0 ]; then exit 1; fi
-cmp x509-f.p x509-ff.p3
-if [ $? != 0 ]; then exit 1; fi
+$cmd -in x509-f.p -inform p -outform p >x509-ff.p3 || exit 1
+
+cmp x509-fff.p x509-f.p || exit 1
+cmp x509-fff.p x509-ff.p1 || exit 1
+cmp x509-fff.p x509-ff.p2 || exit 1
+cmp x509-fff.p x509-ff.p3 || exit 1
+
+cmp x509-f.n x509-ff.n1 || exit 1
+cmp x509-f.n x509-ff.n2 || exit 1
+cmp x509-f.n x509-ff.n3 || exit 1
+cmp x509-f.p x509-ff.p1 || exit 1
+cmp x509-f.p x509-ff.p2 || exit 1
+cmp x509-f.p x509-ff.p3 || exit 1
/bin/rm -f x509-f.* x509-ff.* x509-fff.*
exit 0