diff options
author | Brent Cook <busterb@gmail.com> | 2014-11-20 08:46:02 -0600 |
---|---|---|
committer | Brent Cook <bcook@openbsd.org> | 2014-12-03 17:02:29 -0600 |
commit | 96bf8be098b434ec19146d5724b60179ae56e00a (patch) | |
tree | d711ef8bff8a7e6f8633dee953cb7565959b3e54 /update.sh | |
parent | 58fcd3c39c73d83eb9782a8ef935498b18b5ae73 (diff) | |
download | portable-96bf8be098b434ec19146d5724b60179ae56e00a.tar.gz portable-96bf8be098b434ec19146d5724b60179ae56e00a.tar.bz2 portable-96bf8be098b434ec19146d5724b60179ae56e00a.zip |
update and mask unit tests when running on win32
Update pq_test to ignore changes in whitespace.
Update for new testssl params, specify absolute paths to test binaries.
Fork-based tests do not make sense on Windows.
Disable building biotest, since it is too specific to OpenBSD's behavior
to be useful on other platforms.
Diffstat (limited to 'update.sh')
-rwxr-xr-x | update.sh | 30 |
1 files changed, 25 insertions, 5 deletions
@@ -289,7 +289,7 @@ for i in $openssl_cmd_src/*; do | |||
289 | done | 289 | done |
290 | 290 | ||
291 | for i in aead/aeadtest.c aeswrap/aes_wrap.c base64/base64test.c bf/bftest.c \ | 291 | for i in aead/aeadtest.c aeswrap/aes_wrap.c base64/base64test.c bf/bftest.c \ |
292 | bio/biotest.c bn/general/bntest.c bn/mont/mont.c \ | 292 | bn/general/bntest.c bn/mont/mont.c \ |
293 | cast/casttest.c chacha/chachatest.c cts128/cts128test.c \ | 293 | cast/casttest.c chacha/chachatest.c cts128/cts128test.c \ |
294 | des/destest.c dh/dhtest.c dsa/dsatest.c ec/ectest.c ecdh/ecdhtest.c \ | 294 | des/destest.c dh/dhtest.c dsa/dsatest.c ec/ectest.c ecdh/ecdhtest.c \ |
295 | ecdsa/ecdsatest.c engine/enginetest.c evp/evptest.c exp/exptest.c \ | 295 | ecdsa/ecdsatest.c engine/enginetest.c evp/evptest.c exp/exptest.c \ |
@@ -310,7 +310,6 @@ done | |||
310 | 310 | ||
311 | # do not directly run all test programs | 311 | # do not directly run all test programs |
312 | test_drivers=( | 312 | test_drivers=( |
313 | biotest | ||
314 | aeadtest | 313 | aeadtest |
315 | evptest | 314 | evptest |
316 | pq_test | 315 | pq_test |
@@ -322,21 +321,34 @@ test_drivers=( | |||
322 | tests_disabled=( | 321 | tests_disabled=( |
323 | biotest | 322 | biotest |
324 | ) | 323 | ) |
324 | tests_posix_only=( | ||
325 | arc4randomforktest | ||
326 | explicit_bzero | ||
327 | pidwraptest | ||
328 | ) | ||
325 | $CP $libc_src/string/memmem.c tests/ | 329 | $CP $libc_src/string/memmem.c tests/ |
326 | (cd tests | 330 | (cd tests |
327 | $CP Makefile.am.tpl Makefile.am | 331 | $CP Makefile.am.tpl Makefile.am |
328 | 332 | ||
329 | for i in `ls -1 *.c|sort|grep -v memmem.c`; do | 333 | for i in `ls -1 *.c|sort|grep -v memmem.c`; do |
330 | TEST=`echo $i|sed -e "s/\.c//"` | 334 | TEST=`echo $i|sed -e "s/\.c//"` |
335 | if [[ ${tests_posix_only[*]} =~ "$TEST" ]]; then | ||
336 | echo "if !HOST_WIN" >> Makefile.am | ||
337 | fi | ||
331 | if ! [[ ${test_drivers[*]} =~ "$TEST" ]]; then | 338 | if ! [[ ${test_drivers[*]} =~ "$TEST" ]]; then |
332 | echo "TESTS += $TEST" >> Makefile.am | 339 | echo "TESTS += $TEST" >> Makefile.am |
333 | fi | 340 | fi |
334 | echo "check_PROGRAMS += $TEST" >> Makefile.am | 341 | echo "check_PROGRAMS += $TEST" >> Makefile.am |
335 | echo "${TEST}_SOURCES = $i" >> Makefile.am | 342 | echo "${TEST}_SOURCES = $i" >> Makefile.am |
343 | if [[ ${TEST} = "explicit_bzero" ]]; then | ||
344 | echo "if !HAVE_MEMMEM" >> Makefile.am | ||
345 | echo "explicit_bzero_SOURCES += memmem.c" >> Makefile.am | ||
346 | echo "endif" >> Makefile.am | ||
347 | fi | ||
348 | if [[ ${tests_posix_only[*]} =~ "$TEST" ]]; then | ||
349 | echo "endif" >> Makefile.am | ||
350 | fi | ||
336 | done | 351 | done |
337 | echo "if !HAVE_MEMMEM" >> Makefile.am | ||
338 | echo "explicit_bzero_SOURCES += memmem.c" >> Makefile.am | ||
339 | echo "endif" >> Makefile.am | ||
340 | ) | 352 | ) |
341 | $CP $libcrypto_regress/evp/evptests.txt tests | 353 | $CP $libcrypto_regress/evp/evptests.txt tests |
342 | $CP $libcrypto_regress/aead/aeadtests.txt tests | 354 | $CP $libcrypto_regress/aead/aeadtests.txt tests |
@@ -344,8 +356,16 @@ $CP $libcrypto_regress/pqueue/expected.txt tests/pq_expected.txt | |||
344 | chmod 755 tests/testssl | 356 | chmod 755 tests/testssl |
345 | for i in "${test_drivers[@]}"; do | 357 | for i in "${test_drivers[@]}"; do |
346 | if [ -e tests/${i}.sh ]; then | 358 | if [ -e tests/${i}.sh ]; then |
359 | if [[ ${tests_posix_only[*]} =~ "$i" ]]; then | ||
360 | echo "if !HOST_WIN" >> tests/Makefile.am | ||
361 | fi | ||
347 | if ! [[ ${tests_disabled[*]} =~ "$i" ]]; then | 362 | if ! [[ ${tests_disabled[*]} =~ "$i" ]]; then |
348 | echo "TESTS += ${i}.sh" >> tests/Makefile.am | 363 | echo "TESTS += ${i}.sh" >> tests/Makefile.am |
364 | else | ||
365 | rm -f tests/$i* | ||
366 | fi | ||
367 | if [[ ${tests_posix_only[*]} =~ "$i" ]]; then | ||
368 | echo "endif" >> tests/Makefile.am | ||
349 | fi | 369 | fi |
350 | echo "EXTRA_DIST += ${i}.sh" >> tests/Makefile.am | 370 | echo "EXTRA_DIST += ${i}.sh" >> tests/Makefile.am |
351 | fi | 371 | fi |