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