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.
This commit is contained in:
parent
58fcd3c39c
commit
96bf8be098
@ -1,3 +1,7 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
set -e
|
set -e
|
||||||
./aeadtest $srcdir/aeadtests.txt
|
TEST=./aeadtest
|
||||||
|
if [ -e ./aeadtest.exe ]; then
|
||||||
|
TEST=./aeadtest.exe
|
||||||
|
fi
|
||||||
|
$TEST $srcdir/aeadtests.txt
|
||||||
|
@ -1,3 +1,7 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
set -e
|
set -e
|
||||||
./evptest $srcdir/evptests.txt
|
TEST=./evptest
|
||||||
|
if [ -e ./evptest.exe ]; then
|
||||||
|
TEST=./evptest.exe
|
||||||
|
fi
|
||||||
|
$TEST $srcdir/evptests.txt
|
||||||
|
@ -1,3 +1,7 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
set -e
|
set -e
|
||||||
./pq_test | cmp $srcdir/pq_expected.txt -
|
TEST=./pq_test
|
||||||
|
if [ -e ./pq_test.exe ]; then
|
||||||
|
TEST=./pq_test.exe
|
||||||
|
fi
|
||||||
|
$TEST | diff -b $srcdir/pq_expected.txt -
|
||||||
|
@ -1,5 +1,19 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
set -e
|
set -e
|
||||||
PATH=../apps:$PATH
|
|
||||||
export PATH
|
ssltest_bin=./ssltest
|
||||||
$srcdir/testssl $srcdir/server.pem $srcdir/server.pem $srcdir/ca.pem
|
if [ -e ./ssltest.exe ]; then
|
||||||
|
ssltest_bin=./ssltest.exe
|
||||||
|
fi
|
||||||
|
|
||||||
|
openssl_bin=../apps/openssl
|
||||||
|
if [ -e ../apps/openssl.exe ]; then
|
||||||
|
openssl_bin=../apps/openssl.exe
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -z $srcdir ]; then
|
||||||
|
srcdir=.
|
||||||
|
fi
|
||||||
|
|
||||||
|
$srcdir/testssl $srcdir/server.pem $srcdir/server.pem $srcdir/ca.pem \
|
||||||
|
$ssltest_bin $openssl_bin
|
||||||
|
26
update.sh
26
update.sh
@ -289,7 +289,7 @@ for i in $openssl_cmd_src/*; do
|
|||||||
done
|
done
|
||||||
|
|
||||||
for i in aead/aeadtest.c aeswrap/aes_wrap.c base64/base64test.c bf/bftest.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 \
|
bn/general/bntest.c bn/mont/mont.c \
|
||||||
cast/casttest.c chacha/chachatest.c cts128/cts128test.c \
|
cast/casttest.c chacha/chachatest.c cts128/cts128test.c \
|
||||||
des/destest.c dh/dhtest.c dsa/dsatest.c ec/ectest.c ecdh/ecdhtest.c \
|
des/destest.c dh/dhtest.c dsa/dsatest.c ec/ectest.c ecdh/ecdhtest.c \
|
||||||
ecdsa/ecdsatest.c engine/enginetest.c evp/evptest.c exp/exptest.c \
|
ecdsa/ecdsatest.c engine/enginetest.c evp/evptest.c exp/exptest.c \
|
||||||
@ -310,7 +310,6 @@ done
|
|||||||
|
|
||||||
# do not directly run all test programs
|
# do not directly run all test programs
|
||||||
test_drivers=(
|
test_drivers=(
|
||||||
biotest
|
|
||||||
aeadtest
|
aeadtest
|
||||||
evptest
|
evptest
|
||||||
pq_test
|
pq_test
|
||||||
@ -322,21 +321,34 @@ test_drivers=(
|
|||||||
tests_disabled=(
|
tests_disabled=(
|
||||||
biotest
|
biotest
|
||||||
)
|
)
|
||||||
|
tests_posix_only=(
|
||||||
|
arc4randomforktest
|
||||||
|
explicit_bzero
|
||||||
|
pidwraptest
|
||||||
|
)
|
||||||
$CP $libc_src/string/memmem.c tests/
|
$CP $libc_src/string/memmem.c tests/
|
||||||
(cd tests
|
(cd tests
|
||||||
$CP Makefile.am.tpl Makefile.am
|
$CP Makefile.am.tpl Makefile.am
|
||||||
|
|
||||||
for i in `ls -1 *.c|sort|grep -v memmem.c`; do
|
for i in `ls -1 *.c|sort|grep -v memmem.c`; do
|
||||||
TEST=`echo $i|sed -e "s/\.c//"`
|
TEST=`echo $i|sed -e "s/\.c//"`
|
||||||
|
if [[ ${tests_posix_only[*]} =~ "$TEST" ]]; then
|
||||||
|
echo "if !HOST_WIN" >> Makefile.am
|
||||||
|
fi
|
||||||
if ! [[ ${test_drivers[*]} =~ "$TEST" ]]; then
|
if ! [[ ${test_drivers[*]} =~ "$TEST" ]]; then
|
||||||
echo "TESTS += $TEST" >> Makefile.am
|
echo "TESTS += $TEST" >> Makefile.am
|
||||||
fi
|
fi
|
||||||
echo "check_PROGRAMS += $TEST" >> Makefile.am
|
echo "check_PROGRAMS += $TEST" >> Makefile.am
|
||||||
echo "${TEST}_SOURCES = $i" >> Makefile.am
|
echo "${TEST}_SOURCES = $i" >> Makefile.am
|
||||||
done
|
if [[ ${TEST} = "explicit_bzero" ]]; then
|
||||||
echo "if !HAVE_MEMMEM" >> Makefile.am
|
echo "if !HAVE_MEMMEM" >> Makefile.am
|
||||||
echo "explicit_bzero_SOURCES += memmem.c" >> Makefile.am
|
echo "explicit_bzero_SOURCES += memmem.c" >> Makefile.am
|
||||||
echo "endif" >> Makefile.am
|
echo "endif" >> Makefile.am
|
||||||
|
fi
|
||||||
|
if [[ ${tests_posix_only[*]} =~ "$TEST" ]]; then
|
||||||
|
echo "endif" >> Makefile.am
|
||||||
|
fi
|
||||||
|
done
|
||||||
)
|
)
|
||||||
$CP $libcrypto_regress/evp/evptests.txt tests
|
$CP $libcrypto_regress/evp/evptests.txt tests
|
||||||
$CP $libcrypto_regress/aead/aeadtests.txt tests
|
$CP $libcrypto_regress/aead/aeadtests.txt tests
|
||||||
@ -344,8 +356,16 @@ $CP $libcrypto_regress/pqueue/expected.txt tests/pq_expected.txt
|
|||||||
chmod 755 tests/testssl
|
chmod 755 tests/testssl
|
||||||
for i in "${test_drivers[@]}"; do
|
for i in "${test_drivers[@]}"; do
|
||||||
if [ -e tests/${i}.sh ]; then
|
if [ -e tests/${i}.sh ]; then
|
||||||
|
if [[ ${tests_posix_only[*]} =~ "$i" ]]; then
|
||||||
|
echo "if !HOST_WIN" >> tests/Makefile.am
|
||||||
|
fi
|
||||||
if ! [[ ${tests_disabled[*]} =~ "$i" ]]; then
|
if ! [[ ${tests_disabled[*]} =~ "$i" ]]; then
|
||||||
echo "TESTS += ${i}.sh" >> tests/Makefile.am
|
echo "TESTS += ${i}.sh" >> tests/Makefile.am
|
||||||
|
else
|
||||||
|
rm -f tests/$i*
|
||||||
|
fi
|
||||||
|
if [[ ${tests_posix_only[*]} =~ "$i" ]]; then
|
||||||
|
echo "endif" >> tests/Makefile.am
|
||||||
fi
|
fi
|
||||||
echo "EXTRA_DIST += ${i}.sh" >> tests/Makefile.am
|
echo "EXTRA_DIST += ${i}.sh" >> tests/Makefile.am
|
||||||
fi
|
fi
|
||||||
|
Loading…
x
Reference in New Issue
Block a user