Update the test framework so that the need for test_main is removed. Everything
authorPauli <paul.dale@oracle.com>
Tue, 18 Jul 2017 01:48:27 +0000 (11:48 +1000)
committerPauli <paul.dale@oracle.com>
Wed, 26 Jul 2017 21:53:08 +0000 (07:53 +1000)
commitad887416f1e59c3294a7d8f83a0ca77120523b4a
tree99971c4acaaa7a43efa38a0d52e230c0e68a1c6c
parentd445302418b41b76c15e103954b1311d98077480
Update the test framework so that the need for test_main is removed.  Everything
that needed test_main now works using the same infrastructure as tests that used
register_tests.

This meant:
* renaming register_tests to setup_tests and giving it a success/failure return.
* renaming the init_test function to setup_test_framework.
* renaming the finish_test function to pulldown_test_framework.
* adding a user provided global_init function that runs before the test frame
    work is initialised.  It returns a failure indication that stops the stest.
* adding helper functions that permit tests to access their command line args.
* spliting the BIO initialisation and finalisation out from the test setup and
    teardown.
* hiding some of the now test internal functions.
* fix the comments in testutil.h

Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3953)
92 files changed:
test/README
test/afalgtest.c
test/asn1_encode_test.c
test/asn1_internal_test.c
test/asynciotest.c
test/bad_dtls_test.c
test/bftest.c
test/bio_enc_test.c
test/bioprinttest.c
test/bntest.c
test/build.info
test/casttest.c
test/chacha_internal_test.c
test/cipher_overhead_test.c
test/cipherbytes_test.c
test/cipherlist_test.c
test/ciphername_test.c
test/clienthellotest.c
test/constant_time_test.c
test/crltest.c
test/ct_test.c
test/d2i_test.c
test/danetest.c
test/destest.c
test/dhtest.c
test/drbgtest.c
test/dsatest.c
test/dtls_mtu_test.c
test/dtlstest.c
test/dtlsv1listentest.c
test/ecdsatest.c
test/ecstresstest.c
test/ectest.c
test/enginetest.c
test/evp_extra_test.c
test/evp_test.c
test/exdatatest.c
test/exptest.c
test/gmdifftest.c
test/hmactest.c
test/ideatest.c
test/igetest.c
test/lhash_test.c
test/md2test.c
test/mdc2_internal_test.c
test/mdc2test.c
test/modes_internal_test.c
test/packettest.c
test/pbelutest.c
test/pemtest.c
test/pkey_meth_test.c
test/poly1305_internal_test.c
test/randtest.c
test/rc2test.c
test/rc4test.c
test/rc5test.c
test/recordlentest.c
test/rsa_test.c
test/sanitytest.c
test/secmemtest.c
test/shlibloadtest.c
test/siphash_internal_test.c
test/srptest.c
test/ssl_cert_table_internal_test.c
test/ssl_test.c
test/ssl_test_ctx_test.c
test/sslapitest.c
test/sslcorrupttest.c
test/stack_test.c
test/test_test.c
test/testutil.h
test/testutil/driver.c
test/testutil/init.c [new file with mode: 0644]
test/testutil/main.c
test/testutil/stanza.c
test/testutil/test_cleanup.c [new file with mode: 0644]
test/testutil/test_main.c [deleted file]
test/testutil/tu_local.h
test/threadstest.c
test/time_offset_test.c
test/tls13encryptiontest.c
test/tls13secretstest.c
test/uitest.c
test/v3ext.c
test/v3nametest.c
test/verify_extra_test.c
test/wpackettest.c
test/x509_check_cert_pkey_test.c
test/x509_dup_cert_test.c
test/x509_internal_test.c
test/x509_time_test.c
test/x509aux.c