aboutsummaryrefslogtreecommitdiff
path: root/update.sh
diff options
context:
space:
mode:
authorCorinna Vinschen <github@cygwin.de>2015-03-04 11:55:50 +0100
committerCorinna Vinschen <github@cygwin.de>2015-03-04 11:55:50 +0100
commite38dc152d6b96aa724c6b77f3383bb75787c6f81 (patch)
tree706a9374323a783b45cdc5fe3db04d3d11753454 /update.sh
parent9cad5993a286048d3b6485640e521fb9f27877d2 (diff)
downloadportable-e38dc152d6b96aa724c6b77f3383bb75787c6f81.tar.gz
portable-e38dc152d6b96aa724c6b77f3383bb75787c6f81.tar.bz2
portable-e38dc152d6b96aa724c6b77f3383bb75787c6f81.zip
Allow to disable tests easily
- Introduce the tests_disabled array, add biotest, explicit_bzero and pidwraptest. - Add preceeding comment to explain why every test is skipped - Rearrange loops generating Makefile.am dependencies to look for tests in tests_disabled first and skip them. Signed-off-by: Corinna Vinschen <github@cygwin.de>
Diffstat (limited to 'update.sh')
-rwxr-xr-xupdate.sh58
1 files changed, 33 insertions, 25 deletions
diff --git a/update.sh b/update.sh
index 29012ad..435c888 100755
--- a/update.sh
+++ b/update.sh
@@ -198,9 +198,6 @@ for i in `find $libcrypto_regress -name '*.c'`; do
198 $CP "$i" tests 198 $CP "$i" tests
199done 199done
200 200
201# the BIO tests rely on resolver results that are OS and environment-specific
202rm tests/biotest.c
203
204# copy libc tests 201# copy libc tests
205$CP $libc_regress/arc4random-fork/arc4random-fork.c tests/arc4randomforktest.c 202$CP $libc_regress/arc4random-fork/arc4random-fork.c tests/arc4randomforktest.c
206$CP $libc_regress/explicit_bzero/explicit_bzero.c tests 203$CP $libc_regress/explicit_bzero/explicit_bzero.c tests
@@ -229,27 +226,38 @@ tests_posix_only=(
229 explicit_bzero 226 explicit_bzero
230 pidwraptest 227 pidwraptest
231) 228)
229# the BIO tests rely on resolver results that are OS and environment-specific
230# explicit_bzero relies on SA_ONSTACK, not available on all systems
231# pidwraptest relies on an OS-specific way to give out pids and is generally
232# awkward on systems with slow fork
233tests_disabled=(
234 biotest
235 explicit_bzero
236 pidwraptest
237)
232$CP $libc_src/string/memmem.c tests/ 238$CP $libc_src/string/memmem.c tests/
233(cd tests 239(cd tests
234 $CP Makefile.am.tpl Makefile.am 240 $CP Makefile.am.tpl Makefile.am
235 241
236 for i in `ls -1 *.c|sort|grep -v memmem.c`; do 242 for i in `ls -1 *.c|sort|grep -v memmem.c`; do
237 TEST=`echo $i|sed -e "s/\.c//"` 243 TEST=`echo $i|sed -e "s/\.c//"`
238 if [[ ${tests_posix_only[*]} =~ "$TEST" ]]; then 244 if ! [[ ${tests_disabled[*]} =~ "$TEST" ]]; then
239 echo "if !HOST_WIN" >> Makefile.am 245 if [[ ${tests_posix_only[*]} =~ "$TEST" ]]; then
240 fi 246 echo "if !HOST_WIN" >> Makefile.am
241 if ! [[ ${test_drivers[*]} =~ "$TEST" ]]; then 247 fi
242 echo "TESTS += $TEST" >> Makefile.am 248 if ! [[ ${test_drivers[*]} =~ "$TEST" ]]; then
243 fi 249 echo "TESTS += $TEST" >> Makefile.am
244 echo "check_PROGRAMS += $TEST" >> Makefile.am 250 fi
245 echo "${TEST}_SOURCES = $i" >> Makefile.am 251 echo "check_PROGRAMS += $TEST" >> Makefile.am
246 if [[ ${TEST} = "explicit_bzero" ]]; then 252 echo "${TEST}_SOURCES = $i" >> Makefile.am
247 echo "if !HAVE_MEMMEM" >> Makefile.am 253 if [[ ${TEST} = "explicit_bzero" ]]; then
248 echo "explicit_bzero_SOURCES += memmem.c" >> Makefile.am 254 echo "if !HAVE_MEMMEM" >> Makefile.am
249 echo "endif" >> Makefile.am 255 echo "explicit_bzero_SOURCES += memmem.c" >> Makefile.am
250 fi 256 echo "endif" >> Makefile.am
251 if [[ ${tests_posix_only[*]} =~ "$TEST" ]]; then 257 fi
252 echo "endif" >> Makefile.am 258 if [[ ${tests_posix_only[*]} =~ "$TEST" ]]; then
259 echo "endif" >> Makefile.am
260 fi
253 fi 261 fi
254 done 262 done
255) 263)
@@ -259,16 +267,16 @@ $CP $libcrypto_regress/pqueue/expected.txt tests/pq_expected.txt
259chmod 755 tests/testssl 267chmod 755 tests/testssl
260for i in "${test_drivers[@]}"; do 268for i in "${test_drivers[@]}"; do
261 if [ -e tests/${i}.sh ]; then 269 if [ -e tests/${i}.sh ]; then
262 if [[ ${tests_posix_only[*]} =~ "$i" ]]; then
263 echo "if !HOST_WIN" >> tests/Makefile.am
264 fi
265 if ! [[ ${tests_disabled[*]} =~ "$i" ]]; then 270 if ! [[ ${tests_disabled[*]} =~ "$i" ]]; then
271 if [[ ${tests_posix_only[*]} =~ "$i" ]]; then
272 echo "if !HOST_WIN" >> tests/Makefile.am
273 fi
266 echo "TESTS += ${i}.sh" >> tests/Makefile.am 274 echo "TESTS += ${i}.sh" >> tests/Makefile.am
275 if [[ ${tests_posix_only[*]} =~ "$i" ]]; then
276 echo "endif" >> tests/Makefile.am
277 fi
278 echo "EXTRA_DIST += ${i}.sh" >> tests/Makefile.am
267 fi 279 fi
268 if [[ ${tests_posix_only[*]} =~ "$i" ]]; then
269 echo "endif" >> tests/Makefile.am
270 fi
271 echo "EXTRA_DIST += ${i}.sh" >> tests/Makefile.am
272 fi 280 fi
273done 281done
274echo "EXTRA_DIST += aeadtests.txt" >> tests/Makefile.am 282echo "EXTRA_DIST += aeadtests.txt" >> tests/Makefile.am