From 33bc05ca9ce2f190350738684eee1cd9d1bea9c2 Mon Sep 17 00:00:00 2001 From: Brent Cook Date: Mon, 21 Jul 2014 18:30:31 -0500 Subject: [PATCH] better handle disabled tests and exclude files ok beck@ guenther@ --- tests/pidwraptest.sh | 4 ++-- update.sh | 24 +++++++++++++++++++----- 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 @@ #!/usr/bin/env bash -./fork_rand > fork_rand.txt +./pidwraptest > pidwraptest.txt while read -r a b; do if [ "$a" = "$b" ]; then @@ -8,4 +8,4 @@ do else echo "PASS: $a != $b" fi -done < fork_rand.txt +done < 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 s_server.c s_socket.c s_time.c sess_id.c smime.c speed.c spkac.c testdsa.h testrsa.h timeouts.h ts.c verify.c version.c x509.c" -rm -f tests/*test.c for i in aead/aeadtest.c aeswrap/aes_wrap.c base64/base64test.c bf/bftest.c \ bio/biotest.c bn/general/bntest.c bn/mont/mont.c \ 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 done # do not directly run all test programs -test_excludes=(biotest aeadtest evptest pq_test ssltest arc4randomforktest fork_rand) +test_drivers=( + biotest + aeadtest + evptest + pq_test + ssltest + arc4randomforktest + pidwraptest +) +# disabled by-default tests +tests_disabled=( + biotest + pidwraptest +) (cd tests $CP Makefile.am.tpl Makefile.am for i in `ls -1 *.c|sort`; do TEST=`echo $i|sed -e "s/\.c//"` - if ! [[ ${test_excludes[*]} =~ "$TEST" ]]; then + if ! [[ ${test_drivers[*]} =~ "$TEST" ]]; then echo "TESTS += $TEST" >> Makefile.am fi echo "check_PROGRAMS += $TEST" >> Makefile.am @@ -317,9 +329,11 @@ $CP $libcrypto_regress/evp/evptests.txt tests $CP $libcrypto_regress/aead/aeadtests.txt tests $CP $libcrypto_regress/pqueue/expected.txt tests/pq_expected.txt chmod 755 tests/testssl -for i in "${test_excludes[@]}"; do +for i in "${test_drivers[@]}"; do if [ -e tests/${i}.sh ]; then - echo "TESTS += ${i}.sh" >> tests/Makefile.am + if ! [[ ${tests_disabled[*]} =~ "$i" ]]; then + echo "TESTS += ${i}.sh" >> tests/Makefile.am + fi echo "EXTRA_DIST += ${i}.sh" >> tests/Makefile.am fi done