示例#1
0
文件: main.c 项目: cedral/openssl
int main(int argc, char *argv[])
{
    int ret = EXIT_FAILURE;

    test_open_streams();

    if (!global_init()) {
        test_printf_stderr("Global init failed - aborting\n");
        return ret;
    }

    arg_count = argc - 1;
    args = argv;

    setup_test_framework();

    if (setup_tests())
        ret = run_tests(argv[0]);
    cleanup_tests();
    check_arg_usage();

    ret = pulldown_test_framework(ret);
    test_close_streams();
    return ret;    
}
示例#2
0
文件: imager_test.c 项目: bakiez/pmem
int main(int argc, char **argv) {
  int status = EXIT_FAILURE;

  if (init_tests() == EXIT_FAILURE) {
    ERROR_LOG("Failed to initialize imager tests");
    goto error;
  }
  utest_run("getting the memory map", test_get_mmap());
  utest_run("creating a raw image", test_dump_memory_raw());
  utest_run("creating an elf image", test_dump_memory_elf());
  utest_run("creating a mach-o image", test_dump_memory_macho());
  utest_summary();
  if (cleanup_tests() == EXIT_FAILURE) {
    ERROR_LOG("Failed to release test resources");
    goto error;
  }
  status = EXIT_SUCCESS;
error:
  return status;
}