aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrent Cook <bcook@openbsd.org>2014-07-21 18:30:31 -0500
committerBrent Cook <bcook@openbsd.org>2014-07-21 20:27:14 -0500
commit33bc05ca9ce2f190350738684eee1cd9d1bea9c2 (patch)
tree865d838f2a398abafd9f36ddee0e9df5031f56a8
parent23dc97f8c2543cf67881dd6d4a351e95318637db (diff)
downloadportable-33bc05ca9ce2f190350738684eee1cd9d1bea9c2.tar.gz
portable-33bc05ca9ce2f190350738684eee1cd9d1bea9c2.tar.bz2
portable-33bc05ca9ce2f190350738684eee1cd9d1bea9c2.zip
better handle disabled tests and exclude files
ok beck@ guenther@
-rwxr-xr-xtests/pidwraptest.sh4
-rwxr-xr-xupdate.sh24
2 files changed, 21 insertions, 7 deletions
diff --git a/tests/pidwraptest.sh b/tests/pidwraptest.sh
index d1e2685..74fd46e 100755
--- a/tests/pidwraptest.sh
+++ b/tests/pidwraptest.sh
@@ -1,5 +1,5 @@
1#!/usr/bin/env bash 1#!/usr/bin/env bash
2./fork_rand > fork_rand.txt 2./pidwraptest > pidwraptest.txt
3while read -r a b; 3while read -r a b;
4do 4do
5 if [ "$a" = "$b" ]; then 5 if [ "$a" = "$b" ]; then
@@ -8,4 +8,4 @@ do
8 else 8 else
9 echo "PASS: $a != $b" 9 echo "PASS: $a != $b"
10 fi 10 fi
11done < fork_rand.txt 11done < pidwraptest.txt
diff --git a/update.sh b/update.sh
index 660128e..f641e4c 100755
--- a/update.sh
+++ b/update.sh
@@ -276,7 +276,6 @@ copy_src apps "apps.c apps.h asn1pars.c ca.c ciphers.c cms.c crl.c crl2p7.c
276 s_server.c s_socket.c s_time.c sess_id.c smime.c speed.c spkac.c 276 s_server.c s_socket.c s_time.c sess_id.c smime.c speed.c spkac.c
277 testdsa.h testrsa.h timeouts.h ts.c verify.c version.c x509.c" 277 testdsa.h testrsa.h timeouts.h ts.c verify.c version.c x509.c"
278 278
279rm -f tests/*test.c
280for i in aead/aeadtest.c aeswrap/aes_wrap.c base64/base64test.c bf/bftest.c \ 279for i in aead/aeadtest.c aeswrap/aes_wrap.c base64/base64test.c bf/bftest.c \
281 bio/biotest.c bn/general/bntest.c bn/mont/mont.c \ 280 bio/biotest.c bn/general/bntest.c bn/mont/mont.c \
282 cast/casttest.c chacha/chachatest.c cts128/cts128test.c \ 281 cast/casttest.c chacha/chachatest.c cts128/cts128test.c \
@@ -298,13 +297,26 @@ for i in asn1/asn1test.c ssl/ssltest.c ssl/testssl certs/ca.pem certs/server.pem
298done 297done
299 298
300# do not directly run all test programs 299# do not directly run all test programs
301test_excludes=(biotest aeadtest evptest pq_test ssltest arc4randomforktest fork_rand) 300test_drivers=(
301 biotest
302 aeadtest
303 evptest
304 pq_test
305 ssltest
306 arc4randomforktest
307 pidwraptest
308)
309# disabled by-default tests
310tests_disabled=(
311 biotest
312 pidwraptest
313)
302(cd tests 314(cd tests
303 $CP Makefile.am.tpl Makefile.am 315 $CP Makefile.am.tpl Makefile.am
304 316
305 for i in `ls -1 *.c|sort`; do 317 for i in `ls -1 *.c|sort`; do
306 TEST=`echo $i|sed -e "s/\.c//"` 318 TEST=`echo $i|sed -e "s/\.c//"`
307 if ! [[ ${test_excludes[*]} =~ "$TEST" ]]; then 319 if ! [[ ${test_drivers[*]} =~ "$TEST" ]]; then
308 echo "TESTS += $TEST" >> Makefile.am 320 echo "TESTS += $TEST" >> Makefile.am
309 fi 321 fi
310 echo "check_PROGRAMS += $TEST" >> Makefile.am 322 echo "check_PROGRAMS += $TEST" >> Makefile.am
@@ -317,9 +329,11 @@ $CP $libcrypto_regress/evp/evptests.txt tests
317$CP $libcrypto_regress/aead/aeadtests.txt tests 329$CP $libcrypto_regress/aead/aeadtests.txt tests
318$CP $libcrypto_regress/pqueue/expected.txt tests/pq_expected.txt 330$CP $libcrypto_regress/pqueue/expected.txt tests/pq_expected.txt
319chmod 755 tests/testssl 331chmod 755 tests/testssl
320for i in "${test_excludes[@]}"; do 332for i in "${test_drivers[@]}"; do
321 if [ -e tests/${i}.sh ]; then 333 if [ -e tests/${i}.sh ]; then
322 echo "TESTS += ${i}.sh" >> tests/Makefile.am 334 if ! [[ ${tests_disabled[*]} =~ "$i" ]]; then
335 echo "TESTS += ${i}.sh" >> tests/Makefile.am
336 fi
323 echo "EXTRA_DIST += ${i}.sh" >> tests/Makefile.am 337 echo "EXTRA_DIST += ${i}.sh" >> tests/Makefile.am
324 fi 338 fi
325done 339done