main.c 988 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  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. #include "../testutil.h"
  10. #include "output.h"
  11. #include "tu_local.h"
  12. int main(int argc, char *argv[])
  13. {
  14. int ret = EXIT_FAILURE;
  15. int setup_res;
  16. test_open_streams();
  17. if (!global_init()) {
  18. test_printf_stderr("Global init failed - aborting\n");
  19. return ret;
  20. }
  21. if (!setup_test_framework(argc, argv))
  22. goto end;
  23. if ((setup_res = setup_tests()) > 0) {
  24. ret = run_tests(argv[0]);
  25. cleanup_tests();
  26. opt_check_usage();
  27. } else if (setup_res == 0) {
  28. opt_help(test_get_options());
  29. }
  30. end:
  31. ret = pulldown_test_framework(ret);
  32. test_close_streams();
  33. return ret;
  34. }