int main(int argc, char **argv) { Eina_Benchmark *test; unsigned int i; if (argc != 2) return -1; _mempool_init(); eina_init(); for (i = 0; etc[i].bench_case; ++i) { test = eina_benchmark_new(etc[i].bench_case, argv[1]); if (!test) continue; etc[i].build(test); eina_benchmark_run(test); eina_benchmark_free(test); } eina_bench_e17(); eina_shutdown(); _mempool_shutdown(); return 0; }
int main(int argc, char **argv) { Suite *s; SRunner *sr; int i, failed_count; for (i = 1; i < argc; i++) if ((strcmp(argv[i], "-h") == 0) || (strcmp(argv[i], "--help") == 0)) { fprintf(stderr, "Usage:\n\t%s [test_case1 .. [test_caseN]]\n", argv[0]); _list_tests(); return 0; } else if ((strcmp(argv[i], "-l") == 0) || (strcmp(argv[i], "--list") == 0)) { _list_tests(); return 0; } putenv("EFL_RUN_IN_TREE=1"); s = eina_build_suite(argc - 1, (const char **)argv + 1); sr = srunner_create(s); srunner_set_xml(sr, TESTS_BUILD_DIR "/check-results.xml"); _mempool_init(); srunner_run_all(sr, CK_ENV); failed_count = srunner_ntests_failed(sr); srunner_free(sr); _mempool_shutdown(); return (failed_count == 0) ? 0 : 255; }