1 /* 2 * Copyright 2016-2023 The OpenSSL Project Authors. All Rights Reserved. 3 * 4 * Licensed under the Apache License 2.0 (the "License"). You may not use 5 * this file except in compliance with the License. You can obtain a copy 6 * in the file LICENSE in the source distribution or at 7 * https://www.openssl.org/source/license.html 8 */ 9 10 #include "../testutil.h" 11 #include "output.h" 12 #include "tu_local.h" 13 14 main(int argc,char * argv[])15int main(int argc, char *argv[]) 16 { 17 int ret = EXIT_FAILURE; 18 int setup_res; 19 int gi_ret; 20 21 gi_ret = global_init(); 22 23 test_open_streams(); 24 25 if (!gi_ret) { 26 test_printf_stderr("Global init failed - aborting\n"); 27 return ret; 28 } 29 30 if (!setup_test_framework(argc, argv)) 31 goto end; 32 33 if ((setup_res = setup_tests()) > 0) { 34 ret = run_tests(argv[0]); 35 cleanup_tests(); 36 opt_check_usage(); 37 } else if (setup_res == 0) { 38 opt_help(test_get_options()); 39 } 40 end: 41 ret = pulldown_test_framework(ret); 42 test_close_streams(); 43 return ret; 44 } 45