diff options
Diffstat (limited to 'test/ectest.c')
-rw-r--r-- | test/ectest.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/test/ectest.c b/test/ectest.c index c6e60acb57..85bb46212b 100644 --- a/test/ectest.c +++ b/test/ectest.c @@ -1430,15 +1430,13 @@ static const char rnd_seed[] = "string to make the random number generator think it has randomness"; #endif -int test_main(int argc, char *argv[]) +int setup_tests(void) { - int result = EXIT_SUCCESS; #ifndef OPENSSL_NO_EC - crv_len = EC_get_builtin_curves(NULL, 0); if (!TEST_ptr(curves = OPENSSL_malloc(sizeof(*curves) * crv_len)) || !TEST_true(EC_get_builtin_curves(curves, crv_len))) - return EXIT_FAILURE; + return 0; RAND_seed(rnd_seed, sizeof rnd_seed); /* or BN_generate_prime may fail */ @@ -1453,9 +1451,11 @@ int test_main(int argc, char *argv[]) # endif ADD_ALL_TESTS(internal_curve_test, crv_len); ADD_ALL_TESTS(internal_curve_test_method, crv_len); +#endif + return 1; +} - result = run_tests(argv[0]); +void cleanup_tests(void) +{ OPENSSL_free(curves); -#endif - return result; } |