- Timestamp:
- 2006-12-06T13:34:15Z (18 years ago)
- Branches:
- master
- Children:
- 7bcdde3
- Parents:
- 6a90967
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
tests/check.c
r6a90967 r3b4cc8f 38 38 Suite *md5_suite(void); 39 39 40 int main ( void)40 int main (int argc, char **argv) 41 41 { 42 42 int nf; 43 SRunner *sr = srunner_create(util_suite()); 43 SRunner *sr; 44 GOptionContext *pc; 45 gboolean no_fork = FALSE; 46 gboolean verbose = FALSE; 47 GOptionEntry options[] = { 48 {"no-fork", 'n', 0, G_OPTION_ARG_NONE, &no_fork, "Don't fork" }, 49 {"verbose", 'v', 0, G_OPTION_ARG_NONE, &verbose, "Be verbose", NULL }, 50 { NULL } 51 }; 52 int i; 53 54 pc = g_option_context_new(""); 55 g_option_context_add_main_entries(pc, options, NULL); 56 57 if(!g_option_context_parse(pc, &argc, &argv, NULL)) 58 return 1; 59 60 g_option_context_free(pc); 61 62 63 sr = srunner_create(util_suite()); 44 64 srunner_add_suite(sr, nick_suite()); 45 65 srunner_add_suite(sr, md5_suite()); 46 srunner_run_all (sr, CK_NORMAL); 66 if (no_fork) 67 srunner_set_fork_status(sr, CK_NOFORK); 68 srunner_run_all (sr, verbose?CK_VERBOSE:CK_NORMAL); 47 69 nf = srunner_ntests_failed(sr); 48 70 srunner_free(sr);
Note: See TracChangeset
for help on using the changeset viewer.