int main(int argc, char *argv[]) { TCase *tc; Suite *s; SRunner *sr; int failed_count, i; 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 = suite_create("Ector"); for (i = 0; etc[i].test_case; ++i) { if (!_use_test(argc - 1, (const char **) argv + 1, etc[i].test_case)) continue; tc = tcase_create(etc[i].test_case); tcase_set_timeout(tc, 0); etc[i].build(tc); suite_add_tcase(s, tc); } sr = srunner_create(s); srunner_set_xml(sr, TESTS_BUILD_DIR "/check-results.xml"); srunner_run_all(sr, CK_ENV); failed_count = srunner_ntests_failed(sr); srunner_free(sr); return (failed_count == 0) ? EXIT_SUCCESS : EXIT_FAILURE; }
int main(int argc, char **argv) { Suite *s; SRunner *sr; int i, failed_count; eo_init(); setenv("CK_FORK", "no", 0); 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 = eo_suite_build(argc - 1, (const char **)argv + 1); sr = srunner_create(s); srunner_set_xml(sr, TESTS_BUILD_DIR "/check-results.xml"); srunner_run_all(sr, CK_ENV); failed_count = srunner_ntests_failed(sr); srunner_free(sr); eo_shutdown(); return (failed_count == 0) ? 0 : 255; }
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; } s = eina_build_suite(argc - 1, (const char **)argv + 1); sr = srunner_create(s); _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; }