X-Git-Url: https://git.tokkee.org/?p=sysdb.git;a=blobdiff_plain;f=t%2Flibsysdb_test.c;h=96bb9076cf16f14e6b4afe79de8a3bdec6d54181;hp=ab241492ea77db4bccf276676cfc8e46a49d5d62;hb=3ba81224dac4d31ea5ad651db569543825ea5078;hpb=dd8f31b9ac7c9bdcc0675cb00325163c2d146c30 diff --git a/t/libsysdb_test.c b/t/libsysdb_test.c index ab24149..96bb907 100644 --- a/t/libsysdb_test.c +++ b/t/libsysdb_test.c @@ -25,24 +25,55 @@ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include +#if HAVE_CONFIG_H +# include "config.h" +#endif /* HAVE_CONFIG_H */ #include "libsysdb_test.h" +#include +#include +#include + int main(void) { int failed = 0; + size_t i; + + suite_creator_t creators[] = { + { core_data_suite, NULL }, + { core_object_suite, NULL }, + { core_store_suite, NULL }, + { core_store_lookup_suite, NULL }, + { core_time_suite, NULL }, + { fe_conn_suite, NULL }, + { fe_parser_suite, NULL }, + { fe_sock_suite, NULL }, + { util_channel_suite, NULL }, + { util_dbi_suite, NULL }, + { util_llist_suite, NULL }, + { util_strbuf_suite, NULL }, + }; + + putenv("TZ=UTC"); + + for (i = 0; i < SDB_STATIC_ARRAY_LEN(creators); ++i) { + SRunner *sr; + Suite *s; + + if (creators[i].msg) + printf("%s\n", creators[i].msg); - SRunner *sr; - Suite *s; + if (!creators[i].creator) + continue; - /* t/utils/llist_test */ - s = util_llist_suite(); - sr = srunner_create(s); - srunner_run_all(sr, CK_NORMAL); - failed += srunner_ntests_failed(sr); - srunner_free(sr); + s = creators[i].creator(); + sr = srunner_create(s); + srunner_run_all(sr, CK_NORMAL); + failed += srunner_ntests_failed(sr); + srunner_free(sr); + } return failed; } /* main */