diff options
author | Brent Cook <bcook@openbsd.org> | 2015-03-21 19:04:54 -0500 |
---|---|---|
committer | Brent Cook <bcook@openbsd.org> | 2015-03-21 19:04:54 -0500 |
commit | 45065de1bafde1d34acd2cab1b8460663074961c (patch) | |
tree | 6a473b5864b1e652a0e45d8a260ed4d5113b79c8 /update.sh | |
parent | e38dc152d6b96aa724c6b77f3383bb75787c6f81 (diff) | |
download | portable-45065de1bafde1d34acd2cab1b8460663074961c.tar.gz portable-45065de1bafde1d34acd2cab1b8460663074961c.tar.bz2 portable-45065de1bafde1d34acd2cab1b8460663074961c.zip |
rework tests Makefile.am
There are so many test exceptions that need handling that it is easier
to simply edit it directly rather than doing autogeneration anymore.
This also puts biotest and pidwraptest behind a new --enable-extratests
option, so they are easy to run but are not enabled by default.
Diffstat (limited to 'update.sh')
-rwxr-xr-x | update.sh | 76 |
1 files changed, 3 insertions, 73 deletions
@@ -208,82 +208,12 @@ $CP $libssl_regress/ssl/testssl tests | |||
208 | for i in `find $libssl_regress -name '*.c'`; do | 208 | for i in `find $libssl_regress -name '*.c'`; do |
209 | $CP "$i" tests | 209 | $CP "$i" tests |
210 | done | 210 | done |
211 | |||
211 | $CP $libssl_regress/certs/ca.pem tests | 212 | $CP $libssl_regress/certs/ca.pem tests |
212 | $CP $libssl_regress/certs/server.pem tests | 213 | $CP $libssl_regress/certs/server.pem tests |
213 | |||
214 | # setup test drivers | ||
215 | # do not directly run all test programs | ||
216 | test_drivers=( | ||
217 | aeadtest | ||
218 | evptest | ||
219 | pq_test | ||
220 | ssltest | ||
221 | arc4randomforktest | ||
222 | pidwraptest | ||
223 | ) | ||
224 | tests_posix_only=( | ||
225 | arc4randomforktest | ||
226 | explicit_bzero | ||
227 | pidwraptest | ||
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 | ||
233 | tests_disabled=( | ||
234 | biotest | ||
235 | explicit_bzero | ||
236 | pidwraptest | ||
237 | ) | ||
238 | $CP $libc_src/string/memmem.c tests/ | ||
239 | (cd tests | ||
240 | $CP Makefile.am.tpl Makefile.am | ||
241 | |||
242 | for i in `ls -1 *.c|sort|grep -v memmem.c`; do | ||
243 | TEST=`echo $i|sed -e "s/\.c//"` | ||
244 | if ! [[ ${tests_disabled[*]} =~ "$TEST" ]]; then | ||
245 | if [[ ${tests_posix_only[*]} =~ "$TEST" ]]; then | ||
246 | echo "if !HOST_WIN" >> Makefile.am | ||
247 | fi | ||
248 | if ! [[ ${test_drivers[*]} =~ "$TEST" ]]; then | ||
249 | echo "TESTS += $TEST" >> Makefile.am | ||
250 | fi | ||
251 | echo "check_PROGRAMS += $TEST" >> Makefile.am | ||
252 | echo "${TEST}_SOURCES = $i" >> Makefile.am | ||
253 | if [[ ${TEST} = "explicit_bzero" ]]; then | ||
254 | echo "if !HAVE_MEMMEM" >> Makefile.am | ||
255 | echo "explicit_bzero_SOURCES += memmem.c" >> Makefile.am | ||
256 | echo "endif" >> Makefile.am | ||
257 | fi | ||
258 | if [[ ${tests_posix_only[*]} =~ "$TEST" ]]; then | ||
259 | echo "endif" >> Makefile.am | ||
260 | fi | ||
261 | fi | ||
262 | done | ||
263 | ) | ||
264 | $CP $libcrypto_regress/evp/evptests.txt tests | ||
265 | $CP $libcrypto_regress/aead/aeadtests.txt tests | ||
266 | $CP $libcrypto_regress/pqueue/expected.txt tests/pq_expected.txt | ||
267 | chmod 755 tests/testssl | 214 | chmod 755 tests/testssl |
268 | for i in "${test_drivers[@]}"; do | ||
269 | if [ -e tests/${i}.sh ]; then | ||
270 | if ! [[ ${tests_disabled[*]} =~ "$i" ]]; then | ||
271 | if [[ ${tests_posix_only[*]} =~ "$i" ]]; then | ||
272 | echo "if !HOST_WIN" >> tests/Makefile.am | ||
273 | fi | ||
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 | ||
279 | fi | ||
280 | fi | ||
281 | done | ||
282 | echo "EXTRA_DIST += aeadtests.txt" >> tests/Makefile.am | ||
283 | echo "EXTRA_DIST += evptests.txt" >> tests/Makefile.am | ||
284 | echo "EXTRA_DIST += pq_expected.txt" >> tests/Makefile.am | ||
285 | echo "EXTRA_DIST += testssl ca.pem server.pem" >> tests/Makefile.am | ||
286 | 215 | ||
216 | # add headers | ||
287 | (cd include/openssl | 217 | (cd include/openssl |
288 | $CP Makefile.am.tpl Makefile.am | 218 | $CP Makefile.am.tpl Makefile.am |
289 | for i in `ls -1 *.h|sort`; do | 219 | for i in `ls -1 *.h|sort`; do |
@@ -291,8 +221,8 @@ echo "EXTRA_DIST += testssl ca.pem server.pem" >> tests/Makefile.am | |||
291 | done | 221 | done |
292 | ) | 222 | ) |
293 | 223 | ||
294 | echo "copying manpages" | ||
295 | # copy manpages | 224 | # copy manpages |
225 | echo "copying manpages" | ||
296 | (cd man | 226 | (cd man |
297 | $CP Makefile.am.tpl Makefile.am | 227 | $CP Makefile.am.tpl Makefile.am |
298 | 228 | ||