diff options
author | Bob Beck <beck@cvs.openbsd.org> | 2018-03-19 03:41:41 +0000 |
---|---|---|
committer | Bob Beck <beck@cvs.openbsd.org> | 2018-03-19 03:41:41 +0000 |
commit | c705f6f911bf91286a912886df7ab46ed801fac6 (patch) | |
tree | 04615f38d0f90b749a377e0803d72db2d4f393d7 /regress | |
parent | 187b9ff1e8538f12c819e09b94541353693baec5 (diff) |
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@
Diffstat (limited to 'regress')
-rw-r--r-- | regress/usr.bin/openssl/Makefile | 4 | ||||
-rwxr-xr-x | regress/usr.bin/openssl/appstest.sh | 42 |
2 files changed, 35 insertions, 11 deletions
diff --git a/regress/usr.bin/openssl/Makefile b/regress/usr.bin/openssl/Makefile index c6bc2748cc9..0ef7928ea4f 100644 --- a/regress/usr.bin/openssl/Makefile +++ b/regress/usr.bin/openssl/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.5 2018/02/06 02:31:13 tb Exp $ +# $OpenBSD: Makefile,v 1.6 2018/03/19 03:41:40 beck Exp $ SUBDIR= options @@ -58,7 +58,7 @@ ssl-dsa: ssl-rsa: env OPENSSL=${OPENSSL} sh ${.CURDIR}/testrsa.sh ${.OBJDIR} ${.CURDIR} appstest: - env OPENSSL=${OPENSSL} sh ${.CURDIR}/appstest.sh ${.OBJDIR} ${.CURDIR} + env OPENSSL=${OPENSSL} sh ${.CURDIR}/appstest.sh -q clean: rm -rf ${CLEANFILES} diff --git a/regress/usr.bin/openssl/appstest.sh b/regress/usr.bin/openssl/appstest.sh index 24d1d741a0f..4e888405203 100755 --- a/regress/usr.bin/openssl/appstest.sh +++ b/regress/usr.bin/openssl/appstest.sh @@ -38,6 +38,22 @@ function check_exit_status { fi } +function usage { + echo "usage: apptest.sh [[-q]]" +} + +no_long_tests=0 + +while [ "$1" != "" ]; do + case $1 in + -q | --quick ) shift + no_long_tests=1 + ;; + * ) usage + exit 1 + esac +done + #---------#---------#---------#---------#---------#---------#---------#--------- # @@ -226,12 +242,16 @@ start_message "dh - Obsoleted by dhparam." $openssl_bin dh -in $gendh2 -check -text -out $gendh2.out check_exit_status $? -start_message "dhparam - Superseded by genpkey and pkeyparam." -dhparam2=$key_dir/dhparam2.pem -$openssl_bin dhparam -2 -out $dhparam2 -check_exit_status $? -$openssl_bin dhparam -in $dhparam2 -check -text -out $dhparam2.out -check_exit_status $? +if [ $no_long_tests = 0 ] ; then + start_message "dhparam - Superseded by genpkey and pkeyparam." + dhparam2=$key_dir/dhparam2.pem + $openssl_bin dhparam -2 -out $dhparam2 + check_exit_status $? + $openssl_bin dhparam -in $dhparam2 -check -text -out $dhparam2.out + check_exit_status $? +else + start_message "SKIPPNG dhparam - Superseded by genpkey and pkeyparam. (quick mode)" +fi # DSA @@ -936,9 +956,13 @@ wait $s_server_pid # === PERFORMANCE === section_message "PERFORMANCE" -start_message "speed" -$openssl_bin speed sha512 rsa2048 -multi 2 -elapsed -check_exit_status $? +if [ $no_long_tests = 0 ] ; then + start_message "speed" + $openssl_bin speed sha512 rsa2048 -multi 2 -elapsed + check_exit_status $? +else + start_message "SKIPPNG speed (quick mode)" +fi #---------#---------#---------#---------#---------#---------#---------#--------- |