diff options
author | beck <> | 2018-03-19 03:41:40 +0000 |
---|---|---|
committer | beck <> | 2018-03-19 03:41:40 +0000 |
commit | 2f7b277069b6cb7fc65a5f3fc8b7dfa914f78905 (patch) | |
tree | 1b3641b98588f120ed099ef3fa31eb20f749593c | |
parent | e464d58452a0842aa8954833a7d46480949f5a6b (diff) | |
download | openbsd-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/Makefile | 4 | ||||
-rwxr-xr-x | src/regress/usr.bin/openssl/appstest.sh | 42 |
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 | ||
3 | SUBDIR= options | 3 | SUBDIR= options |
4 | 4 | ||
@@ -58,7 +58,7 @@ ssl-dsa: | |||
58 | ssl-rsa: | 58 | ssl-rsa: |
59 | env OPENSSL=${OPENSSL} sh ${.CURDIR}/testrsa.sh ${.OBJDIR} ${.CURDIR} | 59 | env OPENSSL=${OPENSSL} sh ${.CURDIR}/testrsa.sh ${.OBJDIR} ${.CURDIR} |
60 | appstest: | 60 | appstest: |
61 | env OPENSSL=${OPENSSL} sh ${.CURDIR}/appstest.sh ${.OBJDIR} ${.CURDIR} | 61 | env OPENSSL=${OPENSSL} sh ${.CURDIR}/appstest.sh -q |
62 | 62 | ||
63 | clean: | 63 | clean: |
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 | ||
41 | function usage { | ||
42 | echo "usage: apptest.sh [[-q]]" | ||
43 | } | ||
44 | |||
45 | no_long_tests=0 | ||
46 | |||
47 | while [ "$1" != "" ]; do | ||
48 | case $1 in | ||
49 | -q | --quick ) shift | ||
50 | no_long_tests=1 | ||
51 | ;; | ||
52 | * ) usage | ||
53 | exit 1 | ||
54 | esac | ||
55 | done | ||
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 |
227 | check_exit_status $? | 243 | check_exit_status $? |
228 | 244 | ||
229 | start_message "dhparam - Superseded by genpkey and pkeyparam." | 245 | if [ $no_long_tests = 0 ] ; then |
230 | dhparam2=$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 |
232 | check_exit_status $? | 248 | $openssl_bin dhparam -2 -out $dhparam2 |
233 | $openssl_bin dhparam -in $dhparam2 -check -text -out $dhparam2.out | 249 | check_exit_status $? |
234 | check_exit_status $? | 250 | $openssl_bin dhparam -in $dhparam2 -check -text -out $dhparam2.out |
251 | check_exit_status $? | ||
252 | else | ||
253 | start_message "SKIPPNG dhparam - Superseded by genpkey and pkeyparam. (quick mode)" | ||
254 | fi | ||
235 | 255 | ||
236 | # DSA | 256 | # DSA |
237 | 257 | ||
@@ -936,9 +956,13 @@ wait $s_server_pid | |||
936 | # === PERFORMANCE === | 956 | # === PERFORMANCE === |
937 | section_message "PERFORMANCE" | 957 | section_message "PERFORMANCE" |
938 | 958 | ||
939 | start_message "speed" | 959 | if [ $no_long_tests = 0 ] ; then |
940 | $openssl_bin speed sha512 rsa2048 -multi 2 -elapsed | 960 | start_message "speed" |
941 | check_exit_status $? | 961 | $openssl_bin speed sha512 rsa2048 -multi 2 -elapsed |
962 | check_exit_status $? | ||
963 | else | ||
964 | start_message "SKIPPNG speed (quick mode)" | ||
965 | fi | ||
942 | 966 | ||
943 | #---------#---------#---------#---------#---------#---------#---------#--------- | 967 | #---------#---------#---------#---------#---------#---------#---------#--------- |
944 | 968 | ||