summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbeck <>2018-03-19 03:41:40 +0000
committerbeck <>2018-03-19 03:41:40 +0000
commit2f7b277069b6cb7fc65a5f3fc8b7dfa914f78905 (patch)
tree1b3641b98588f120ed099ef3fa31eb20f749593c
parente464d58452a0842aa8954833a7d46480949f5a6b (diff)
downloadopenbsd-2f7b277069b6cb7fc65a5f3fc8b7dfa914f78905.tar.gz
openbsd-2f7b277069b6cb7fc65a5f3fc8b7dfa914f78905.tar.bz2
openbsd-2f7b277069b6cb7fc65a5f3fc8b7dfa914f78905.zip
Add a -q (for quick) mode to apptest.sh, and use it by default.
this means that running the regression test doesn't take forever because we run a huge dhparam test and openssl speed tests. ok inoguchi@
-rw-r--r--src/regress/usr.bin/openssl/Makefile4
-rwxr-xr-xsrc/regress/usr.bin/openssl/appstest.sh42
2 files changed, 35 insertions, 11 deletions
diff --git a/src/regress/usr.bin/openssl/Makefile b/src/regress/usr.bin/openssl/Makefile
index c6bc2748cc..0ef7928ea4 100644
--- a/src/regress/usr.bin/openssl/Makefile
+++ b/src/regress/usr.bin/openssl/Makefile
@@ -1,4 +1,4 @@
1# $OpenBSD: Makefile,v 1.5 2018/02/06 02:31:13 tb Exp $ 1# $OpenBSD: Makefile,v 1.6 2018/03/19 03:41:40 beck Exp $
2 2
3SUBDIR= options 3SUBDIR= options
4 4
@@ -58,7 +58,7 @@ ssl-dsa:
58ssl-rsa: 58ssl-rsa:
59 env OPENSSL=${OPENSSL} sh ${.CURDIR}/testrsa.sh ${.OBJDIR} ${.CURDIR} 59 env OPENSSL=${OPENSSL} sh ${.CURDIR}/testrsa.sh ${.OBJDIR} ${.CURDIR}
60appstest: 60appstest:
61 env OPENSSL=${OPENSSL} sh ${.CURDIR}/appstest.sh ${.OBJDIR} ${.CURDIR} 61 env OPENSSL=${OPENSSL} sh ${.CURDIR}/appstest.sh -q
62 62
63clean: 63clean:
64 rm -rf ${CLEANFILES} 64 rm -rf ${CLEANFILES}
diff --git a/src/regress/usr.bin/openssl/appstest.sh b/src/regress/usr.bin/openssl/appstest.sh
index 24d1d741a0..4e88840520 100755
--- a/src/regress/usr.bin/openssl/appstest.sh
+++ b/src/regress/usr.bin/openssl/appstest.sh
@@ -38,6 +38,22 @@ function check_exit_status {
38 fi 38 fi
39} 39}
40 40
41function usage {
42 echo "usage: apptest.sh [[-q]]"
43}
44
45no_long_tests=0
46
47while [ "$1" != "" ]; do
48 case $1 in
49 -q | --quick ) shift
50 no_long_tests=1
51 ;;
52 * ) usage
53 exit 1
54 esac
55done
56
41#---------#---------#---------#---------#---------#---------#---------#--------- 57#---------#---------#---------#---------#---------#---------#---------#---------
42 58
43# 59#
@@ -226,12 +242,16 @@ start_message "dh - Obsoleted by dhparam."
226$openssl_bin dh -in $gendh2 -check -text -out $gendh2.out 242$openssl_bin dh -in $gendh2 -check -text -out $gendh2.out
227check_exit_status $? 243check_exit_status $?
228 244
229start_message "dhparam - Superseded by genpkey and pkeyparam." 245if [ $no_long_tests = 0 ] ; then
230dhparam2=$key_dir/dhparam2.pem 246 start_message "dhparam - Superseded by genpkey and pkeyparam."
231$openssl_bin dhparam -2 -out $dhparam2 247 dhparam2=$key_dir/dhparam2.pem
232check_exit_status $? 248 $openssl_bin dhparam -2 -out $dhparam2
233$openssl_bin dhparam -in $dhparam2 -check -text -out $dhparam2.out 249 check_exit_status $?
234check_exit_status $? 250 $openssl_bin dhparam -in $dhparam2 -check -text -out $dhparam2.out
251 check_exit_status $?
252else
253 start_message "SKIPPNG dhparam - Superseded by genpkey and pkeyparam. (quick mode)"
254fi
235 255
236# DSA 256# DSA
237 257
@@ -936,9 +956,13 @@ wait $s_server_pid
936# === PERFORMANCE === 956# === PERFORMANCE ===
937section_message "PERFORMANCE" 957section_message "PERFORMANCE"
938 958
939start_message "speed" 959if [ $no_long_tests = 0 ] ; then
940$openssl_bin speed sha512 rsa2048 -multi 2 -elapsed 960 start_message "speed"
941check_exit_status $? 961 $openssl_bin speed sha512 rsa2048 -multi 2 -elapsed
962 check_exit_status $?
963else
964 start_message "SKIPPNG speed (quick mode)"
965fi
942 966
943#---------#---------#---------#---------#---------#---------#---------#--------- 967#---------#---------#---------#---------#---------#---------#---------#---------
944 968