diff options
| -rwxr-xr-x | tests/aeadtest.sh | 6 | ||||
| -rwxr-xr-x | tests/evptest.sh | 6 | ||||
| -rwxr-xr-x | tests/pq_test.sh | 6 | ||||
| -rwxr-xr-x | tests/ssltest.sh | 20 | ||||
| -rwxr-xr-x | update.sh | 30 |
5 files changed, 57 insertions, 11 deletions
diff --git a/tests/aeadtest.sh b/tests/aeadtest.sh index d51dd29..132b1fd 100755 --- a/tests/aeadtest.sh +++ b/tests/aeadtest.sh | |||
| @@ -1,3 +1,7 @@ | |||
| 1 | #!/bin/sh | 1 | #!/bin/sh |
| 2 | set -e | 2 | set -e |
| 3 | ./aeadtest $srcdir/aeadtests.txt | 3 | TEST=./aeadtest |
| 4 | if [ -e ./aeadtest.exe ]; then | ||
| 5 | TEST=./aeadtest.exe | ||
| 6 | fi | ||
| 7 | $TEST $srcdir/aeadtests.txt | ||
diff --git a/tests/evptest.sh b/tests/evptest.sh index 8e1d106..ba44d75 100755 --- a/tests/evptest.sh +++ b/tests/evptest.sh | |||
| @@ -1,3 +1,7 @@ | |||
| 1 | #!/bin/sh | 1 | #!/bin/sh |
| 2 | set -e | 2 | set -e |
| 3 | ./evptest $srcdir/evptests.txt | 3 | TEST=./evptest |
| 4 | if [ -e ./evptest.exe ]; then | ||
| 5 | TEST=./evptest.exe | ||
| 6 | fi | ||
| 7 | $TEST $srcdir/evptests.txt | ||
diff --git a/tests/pq_test.sh b/tests/pq_test.sh index b6b9f5e..ab87bc7 100755 --- a/tests/pq_test.sh +++ b/tests/pq_test.sh | |||
| @@ -1,3 +1,7 @@ | |||
| 1 | #!/bin/sh | 1 | #!/bin/sh |
| 2 | set -e | 2 | set -e |
| 3 | ./pq_test | cmp $srcdir/pq_expected.txt - | 3 | TEST=./pq_test |
| 4 | if [ -e ./pq_test.exe ]; then | ||
| 5 | TEST=./pq_test.exe | ||
| 6 | fi | ||
| 7 | $TEST | diff -b $srcdir/pq_expected.txt - | ||
diff --git a/tests/ssltest.sh b/tests/ssltest.sh index 476a258..1b4c9c7 100755 --- a/tests/ssltest.sh +++ b/tests/ssltest.sh | |||
| @@ -1,5 +1,19 @@ | |||
| 1 | #!/bin/sh | 1 | #!/bin/sh |
| 2 | set -e | 2 | set -e |
| 3 | PATH=../apps:$PATH | 3 | |
| 4 | export PATH | 4 | ssltest_bin=./ssltest |
| 5 | $srcdir/testssl $srcdir/server.pem $srcdir/server.pem $srcdir/ca.pem | 5 | if [ -e ./ssltest.exe ]; then |
| 6 | ssltest_bin=./ssltest.exe | ||
| 7 | fi | ||
| 8 | |||
| 9 | openssl_bin=../apps/openssl | ||
| 10 | if [ -e ../apps/openssl.exe ]; then | ||
| 11 | openssl_bin=../apps/openssl.exe | ||
| 12 | fi | ||
| 13 | |||
| 14 | if [ -z $srcdir ]; then | ||
| 15 | srcdir=. | ||
| 16 | fi | ||
| 17 | |||
| 18 | $srcdir/testssl $srcdir/server.pem $srcdir/server.pem $srcdir/ca.pem \ | ||
| 19 | $ssltest_bin $openssl_bin | ||
| @@ -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 |
