int main (int argc, char* argv[]) { int num_failed = 0; setTestDataDirectory(); SRunner *runner = srunner_create(create_suite_GroupsExtension()); srunner_add_suite(runner, create_suite_WriteGroupsExtension()); srunner_add_suite(runner, create_suite_ReadGroupsExtension()); if (argc > 1 && !strcmp(argv[1], "-nofork")) { srunner_set_fork_status( runner, CK_NOFORK ); } srunner_run_all(runner, CK_NORMAL); num_failed = srunner_ntests_failed(runner); srunner_free(runner); return num_failed; }
int main(void) { int number_failed; Suite *s = coord_system_suite(); SRunner *sr = srunner_create(s); srunner_add_suite(sr, linear_algebra_suite()); srunner_run_all(sr, CK_NORMAL); number_failed = srunner_ntests_failed(sr); srunner_free(sr); return (number_failed == 0) ? EXIT_SUCCESS : EXIT_FAILURE; }
int main(void){ SRunner *sr; int num_failed; sr = srunner_create(NULL); srunner_add_suite(sr,am_queue_suite()); srunner_run_all(sr, CK_VERBOSE); num_failed = srunner_ntests_failed(sr); srunner_free(sr); return (num_failed == 0) ? EXIT_SUCCESS : EXIT_FAILURE; }
void setup (void) { Suite *s = make_sub_suite(); SRunner *sr = srunner_create(s); init_master_tests_lineno(); init_signal_strings(); srunner_add_suite(sr, make_sub2_suite()); srunner_run_all(sr, CK_VERBOSE); tr_fail_array = srunner_failures(sr); tr_all_array = srunner_results(sr); sub_nfailed = srunner_ntests_failed(sr); sub_ntests = srunner_ntests_run(sr); }
int main(void) { SRunner *sr = srunner_create(gt_gtf_suite()); srunner_add_suite (sr, gt_gtf_suite()); // add logging to xml srunner_set_xml(sr, "reports/check-test-gtf.xml"); // Run the suites srunner_run_all(sr,CK_NORMAL); uint32_t num_test_failed = srunner_ntests_failed(sr); srunner_free(sr); // Return unit tests return (num_test_failed==0) ? EXIT_SUCCESS : EXIT_FAILURE; }
int main (int argc, char **argv) { SRunner *srunner; int nf; srunner = srunner_create (create_lm_parser_valid_suite ()); srunner_add_suite (srunner, create_lm_parser_invalid_suite ()); srunner_run_all (srunner, CK_NORMAL); nf = srunner_ntests_failed (srunner); return (nf == 0) ? EXIT_SUCCESS : EXIT_FAILURE; }
int main() { int number_failed; SRunner *sr; sr = srunner_create(queue_suite()); srunner_add_suite(sr, astar_suite()); srunner_add_suite(sr, explore_suite()); srunner_add_suite(sr, maze_suite()); srunner_add_suite(sr, localization_suite()); srunner_add_suite(sr, movement_suite()); srunner_add_suite(sr, race_suite()); srunner_add_suite(sr, return_suite()); srunner_add_suite(sr, validate_path_suite()); srunner_run_all(sr, CK_NORMAL); number_failed = srunner_ntests_failed(sr); srunner_free(sr); return (number_failed == 0) ? EXIT_SUCCESS : EXIT_FAILURE; }
int main(int argc, char **argv) { BOOL verbose; int number_failed; SRunner *sr; printf("Bioplib Tests\n"); /* Setup */ verbose = (argc > 1 && !strncmp(argv[1],"-v",2)) ? TRUE : FALSE; sr = srunner_create(NULL); /* Add test Suites */ srunner_add_suite(sr, parseresspec_suite()); srunner_add_suite(sr, inpdbzone_suite()); srunner_add_suite(sr, findzone_suite()); srunner_add_suite(sr, getpdbchainlabels_suite()); srunner_add_suite(sr, readpdbml_suite()); srunner_add_suite(sr, writepdbml_suite()); srunner_add_suite(sr, wholepdb_suite()); srunner_add_suite(sr, conect_suite()); srunner_add_suite(sr, header_suite()); /* add suites here... */ /* Run tests */ if(verbose) { srunner_run_all(sr, CK_VERBOSE); } else { srunner_run_all(sr, CK_NORMAL); } number_failed = srunner_ntests_failed (sr); srunner_free(sr); return((number_failed == 0) ? EXIT_SUCCESS : EXIT_FAILURE); }
int main (void) { int num_failed; setTestDataDirectory(); SRunner *runner = srunner_create( create_suite_UtilsUnit() ); srunner_add_suite( runner, create_suite_UtilsUnitDefinition () ); srunner_add_suite( runner, create_suite_UnitFormulaFormatter () ); srunner_add_suite( runner, create_suite_UnitFormulaFormatter1() ); srunner_add_suite( runner, create_suite_FormulaUnitsData() ); srunner_add_suite( runner, create_suite_DerivedUnitDefinition() ); srunner_add_suite( runner, create_suite_UnitFormulaFormatter2() ); srunner_add_suite( runner, create_suite_CalcUnitDefinition() ); srunner_add_suite( runner, create_suite_UnitFormulaFormatter3() ); #ifdef TRACE_MEMORY srunner_set_fork_status(runner, CK_NOFORK); #endif srunner_run_all(runner, CK_NORMAL); num_failed = srunner_ntests_failed(runner); #ifdef TRACE_MEMORY if (MemTrace_getNumLeaks() > 0) { MemTrace_printLeaks(stdout); } MemTrace_printStatistics(stdout); #endif srunner_free(runner); safe_free(TestDataDirectory); return num_failed; }
int main (void) { int number_failed = 0; o_set_log_file ("check_oml2.log"); SRunner* sr = srunner_create (omlvalue_suite()); srunner_add_suite (sr, bswap_suite ()); srunner_add_suite (sr, mbuf_suite ()); srunner_add_suite (sr, cbuf_suite ()); srunner_add_suite (sr, marshal_suite ()); srunner_add_suite (sr, api_suite ()); srunner_add_suite (sr, writers_suite ()); srunner_add_suite (sr, filters_suite ()); srunner_add_suite (sr, util_suite ()); srunner_add_suite (sr, log_suite ()); srunner_run_all (sr, CK_NORMAL); number_failed += srunner_ntests_failed (sr); srunner_free (sr); return (number_failed == 0) ? EXIT_SUCCESS : EXIT_FAILURE; }
int main () { int number_failed = 0; SRunner * sr = srunner_create (makeGraphInitSuite ()); srunner_add_suite (sr, makeGraphWorldBaseSuite ()); logSetLevel (E_ALL ^ E_DEBUG); srunner_run_all (sr, CK_NORMAL); number_failed = srunner_ntests_failed (sr); srunner_free (sr); return (number_failed == 0) ? EXIT_SUCCESS : EXIT_FAILURE; }
int main(void) { int nf; Suite *s; SRunner *sr; fpu_words = get_fpu_endian(); check_version_compatible(); s = test_cl_suite(); sr = srunner_create(s); #ifdef CHECK_HAVE_LOOPS srunner_add_suite(sr, test_cli_suite()); #else printf("*** Warning ***: your check version is too old,\nseveral important tests will not execute\n"); #endif srunner_add_suite(sr, test_jsnorm_suite()); srunner_add_suite(sr, test_str_suite()); srunner_add_suite(sr, test_regex_suite()); srunner_add_suite(sr, test_disasm_suite()); srunner_add_suite(sr, test_uniq_suite()); srunner_add_suite(sr, test_matchers_suite()); srunner_add_suite(sr, test_htmlnorm_suite()); srunner_add_suite(sr, test_bytecode_suite()); srunner_set_log(sr, "test.log"); if(freopen("test-stderr.log","w+",stderr) == NULL) { fputs("Unable to redirect stderr!\n",stderr); } cl_debug(); srunner_run_all(sr, CK_NORMAL); nf = srunner_ntests_failed(sr); srunner_free(sr); return (nf == 0) ? EXIT_SUCCESS : EXIT_FAILURE; }
int main(void) { int number_failed; SRunner *sr; if (g_getenv("PURPLE_CHECK_DEBUG")) purple_debug_set_enabled(TRUE); /* Make g_return_... functions fatal, ALWAYS. * As this is the test code, this is NOT controlled * by PURPLE_FATAL_ASSERTS. */ g_log_set_always_fatal(G_LOG_LEVEL_CRITICAL); sr = srunner_create (master_suite()); srunner_add_suite(sr, cipher_suite()); srunner_add_suite(sr, jabber_caps_suite()); srunner_add_suite(sr, jabber_digest_md5_suite()); srunner_add_suite(sr, jabber_jutil_suite()); srunner_add_suite(sr, jabber_scram_suite()); srunner_add_suite(sr, oscar_util_suite()); srunner_add_suite(sr, yahoo_util_suite()); srunner_add_suite(sr, util_suite()); srunner_add_suite(sr, xmlnode_suite()); /* make this a libpurple "ui" */ purple_check_init(); srunner_run_all (sr, CK_NORMAL); number_failed = srunner_ntests_failed (sr); srunner_free (sr); purple_core_quit(); return (number_failed == 0) ? EXIT_SUCCESS : EXIT_FAILURE; }
int main (void) { int num_fail; Suite *main, *socket; SRunner *sr; main = main_suite (); socket = socket_suite (); sr = srunner_create (main); srunner_add_suite (sr, socket); srunner_run_all (sr, CK_VERBOSE); num_fail = srunner_ntests_failed (sr); srunner_free (sr); return (num_fail == 0) ? EXIT_SUCCESS : EXIT_FAILURE; }
int main (void) { int number_failed = 0; o_set_log_file ("check_liboml2_oml.log"); SRunner* sr = srunner_create (omlvalue_suite()); srunner_add_suite (sr, bswap_suite ()); srunner_add_suite (sr, mbuf_suite ()); srunner_add_suite (sr, cbuf_suite ()); srunner_add_suite (sr, writers_suite ()); srunner_add_suite (sr, filters_suite ()); srunner_add_suite (sr, api_suite ()); srunner_add_suite (sr, config_suite ()); /* The log_suite has to be last, lest it messes up logging for suites * following it */ srunner_add_suite (sr, log_suite ()); srunner_run_all (sr, CK_ENV); number_failed += srunner_ntests_failed (sr); srunner_free (sr); return (number_failed == 0) ? EXIT_SUCCESS : EXIT_FAILURE; }
void setup (void) { Suite *s = make_sub_suite(); SRunner *sr = srunner_create(s); init_signal_strings(); /* * Create file that will contain the line numbers of the failures * in check_check_sub.c, as they occur. */ line_num_failures_file_name = tempnam(NULL, "check_error_linenums_"); line_num_failures = fopen(line_num_failures_file_name, "w+b"); srunner_add_suite(sr, make_sub2_suite()); srunner_run_all(sr, CK_VERBOSE); tr_fail_array = srunner_failures(sr); tr_all_array = srunner_results(sr); sub_nfailed = srunner_ntests_failed(sr); sub_ntests = srunner_ntests_run(sr); }
/* start the test run */ gint main (gint argc, gchar ** argv) { gint nf; SRunner *sr; setup_log_base (argc, argv); setup_log_capture (); bt_check_init (); sr = srunner_create (bml_core_suite ()); srunner_add_suite (sr, bml_class_suite ()); srunner_set_xml (sr, get_suite_log_filename ()); srunner_run_all (sr, CK_NORMAL); nf = srunner_ntests_failed (sr); srunner_free (sr); collect_logs (nf == 0); return (nf == 0) ? EXIT_SUCCESS : EXIT_FAILURE; }
int main(void) { Suite *s1 = suite_create("All"); SRunner *sr = srunner_create(s1); int number_failed; int EXIT_SUCCESS = 0; int EXIT_FAILURE = 1; srunner_add_suite (sr, makeCalculatorSuite()); srunner_add_suite (sr, makeRomanNumeralsSorterSuite()); srunner_add_suite (sr, makeRomanNumeralsConverterSuite()); srunner_add_suite (sr, makeRomanNumeralsReducerSuite()); srunner_add_suite (sr, makeRomanNumeralsExpanderSuite()); srunner_add_suite (sr, makeCommonUtilsSuite()); srunner_add_suite (sr, makeAcceptanceSuite()); srunner_run_all(sr, CK_ENV); number_failed = srunner_ntests_failed(sr); srunner_free(sr); return number_failed == 0 ? EXIT_SUCCESS : EXIT_FAILURE; }
int main (void) { int number_failed = 0; o_set_log_file ("check_libshared.oml.log"); SRunner *sr = srunner_create (mstring_suite ()); srunner_add_suite (sr, base64_suite ()); srunner_add_suite (sr, json_suite ()); srunner_add_suite (sr, string_utils_suite ()); srunner_add_suite (sr, util_suite ()); srunner_add_suite (sr, headers_suite ()); srunner_add_suite (sr, marshal_suite ()); srunner_run_all (sr, CK_ENV); number_failed += srunner_ntests_failed (sr); srunner_free (sr); return (number_failed == 0) ? EXIT_SUCCESS : EXIT_FAILURE; }
int main (int argc, char* argv[]) { int num_failed = 0; SRunner *runner = srunner_create(create_suite_XMLAttributes()); srunner_add_suite(runner, create_suite_CopyAndClone()); srunner_add_suite(runner, create_suite_XMLNamespaces()); srunner_add_suite(runner, create_suite_XMLTriple()); srunner_add_suite(runner, create_suite_XMLToken()); srunner_add_suite(runner, create_suite_XMLToken_newSetters()); srunner_add_suite(runner, create_suite_XMLNode()); srunner_add_suite(runner, create_suite_XMLNode_newSetters()); srunner_add_suite(runner, create_suite_XMLError()); srunner_add_suite(runner, create_suite_XMLError_C()); srunner_add_suite(runner, create_suite_XMLErrorLog()); srunner_add_suite(runner, create_suite_XMLInputStream()); srunner_add_suite(runner, create_suite_XMLOutputStream()); srunner_add_suite(runner, create_suite_XMLAttributes_C()); srunner_add_suite(runner, create_suite_XMLExceptions()); if (argc > 1 && !strcmp(argv[1], "-nofork")) { srunner_set_fork_status( runner, CK_NOFORK ); } srunner_run_all(runner, CK_NORMAL); num_failed = srunner_ntests_failed(runner); srunner_free(runner); return num_failed; }
int main(UNUSED int argc, UNUSED char *argv[]) { int nfail; SRunner *sr; sr = srunner_create(blank_suite()); srunner_add_suite(sr, main_suite()); srunner_add_suite(sr, opts_suite()); srunner_add_suite(sr, dynbuf_suite()); srunner_add_suite(sr, cert_suite()); srunner_add_suite(sr, cachemgr_suite()); srunner_add_suite(sr, cachefkcrt_suite()); srunner_add_suite(sr, cachetgcrt_suite()); srunner_add_suite(sr, cachedsess_suite()); srunner_add_suite(sr, cachessess_suite()); srunner_add_suite(sr, ssl_suite()); srunner_add_suite(sr, sys_suite()); srunner_add_suite(sr, base64_suite()); srunner_add_suite(sr, url_suite()); srunner_add_suite(sr, util_suite()); srunner_add_suite(sr, pxythrmgr_suite()); srunner_run_all(sr, CK_NORMAL); nfail = srunner_ntests_failed(sr); srunner_free(sr); return !nfail ? EXIT_SUCCESS : EXIT_FAILURE; }
int main (void) { int num_failed; setTestDataDirectory(); SRunner *runner = srunner_create( create_suite_Point() ); srunner_add_suite( runner, create_suite_Dimensions () ); srunner_add_suite( runner, create_suite_BoundingBox () ); srunner_add_suite( runner, create_suite_LineSegment () ); srunner_add_suite( runner, create_suite_CubicBezier () ); srunner_add_suite( runner, create_suite_Curve () ); srunner_add_suite( runner, create_suite_GraphicalObject () ); srunner_add_suite( runner, create_suite_CompartmentGlyph () ); srunner_add_suite( runner, create_suite_SpeciesGlyph () ); srunner_add_suite( runner, create_suite_ReactionGlyph () ); srunner_add_suite( runner, create_suite_SpeciesReferenceGlyph () ); srunner_add_suite( runner, create_suite_TextGlyph () ); srunner_add_suite( runner, create_suite_Layout () ); srunner_add_suite( runner, create_suite_LayoutCreation () ); srunner_add_suite( runner, create_suite_LayoutFormatter () ); srunner_add_suite( runner, create_suite_SBMLHandler () ); srunner_add_suite( runner, create_suite_LayoutWriting () ); /* srunner_add_suite( runner, create_suite_Misc () ); */ #ifdef TRACE_MEMORY srunner_set_fork_status(runner, CK_NOFORK); #endif srunner_run_all(runner, CK_NORMAL); num_failed = srunner_ntests_failed(runner); #ifdef TRACE_MEMORY if (MemTrace_getNumLeaks() > 0) { MemTrace_printLeaks(stdout); } MemTrace_printStatistics(stdout); #endif srunner_free(runner); return num_failed; }
int main(void) { int ret; Suite *s; SRunner *srunner; s = suite_create("mastersuite"); srunner = srunner_create(s); /* Add all testsuites to the master suite. */ srunner_add_suite(srunner, suite_core()); srunner_add_suite(srunner, suite_driver_all()); srunner_add_suite(srunner, suite_input_all()); srunner_add_suite(srunner, suite_input_binary()); srunner_add_suite(srunner, suite_output_all()); srunner_add_suite(srunner, suite_transform_all()); srunner_add_suite(srunner, suite_session()); srunner_add_suite(srunner, suite_strutil()); srunner_add_suite(srunner, suite_version()); srunner_add_suite(srunner, suite_device()); srunner_add_suite(srunner, suite_trigger()); srunner_run_all(srunner, CK_VERBOSE); ret = srunner_ntests_failed(srunner); srunner_free(srunner); return (ret == 0) ? EXIT_SUCCESS : EXIT_FAILURE; }
int main (int argc, char* argv[]) { int num_failed; setTestDataDirectory(); SRunner *runner = srunner_create( create_suite_CVTerms() ); srunner_add_suite( runner, create_suite_CVTerms_newSetters () ); srunner_add_suite( runner, create_suite_ModelHistory () ); srunner_add_suite( runner, create_suite_Date_newSetters () ); srunner_add_suite( runner, create_suite_ModelCreator_newSetters () ); srunner_add_suite( runner, create_suite_ModelHistory_newSetters () ); srunner_add_suite( runner, create_suite_CopyAndClone () ); srunner_add_suite( runner, create_suite_RDFAnnotation () ); srunner_add_suite( runner, create_suite_RDFAnnotation2() ); srunner_add_suite( runner, create_suite_Validation () ); srunner_add_suite( runner, create_suite_RDFAnnotation_C () ); srunner_add_suite( runner, create_suite_L3ModelHistory () ); if (argc > 1 && !strcmp(argv[1], "-nofork")) { srunner_set_fork_status( runner, CK_NOFORK ); } srunner_run_all(runner, CK_NORMAL); num_failed = srunner_ntests_failed(runner); srunner_free(runner); return num_failed; }
int main (int argc, char** argv) { int number_failed; SRunner *sr ; Suite *getdns_general_suite(void); Suite *getdns_general_sync_suite(void); Suite *getdns_address_suite(void); Suite *getdns_address_sync_suite(void); Suite *getdns_hostname_suite(void); Suite *getdns_hostname_sync_suite(void); Suite *getdns_context_create_suite(void); Suite *getdns_context_destroy_suite(void); Suite *getdns_cancel_callback_suite(void); Suite *getdns_list_get_length_suite(void); Suite *getdns_list_get_dict_suite(void); Suite *getdns_list_get_list_suite(void); Suite *getdns_list_get_int_suite(void); Suite *getdns_list_get_data_type_suite(void); Suite *getdns_list_get_bindata_suite(void); Suite *getdns_dict_get_names_suite(void); Suite *getdns_dict_get_data_type_suite(void); Suite *getdns_dict_get_dict_suite(void); Suite *getdns_dict_get_list_suite(void); Suite *getdns_dict_get_dict_suite(void); Suite *getdns_dict_get_bindata_suite(void); Suite *getdns_dict_get_int_suite(void); Suite *getdns_dict_destroy_suite(void); Suite *getdns_dict_set_dict_suite(void); Suite *getdns_dict_set_list_suite(void); Suite *getdns_dict_set_bindata_suite(void); Suite *getdns_dict_set_int_suite(void); Suite *getdns_convert_ulabel_to_alabel_suite(void); Suite *getdns_convert_alabel_to_ulabel_suite(void); Suite *getdns_pretty_print_dict_suite(void); Suite *getdns_display_ip_address_suite(void); Suite *getdns_context_set_context_update_callback_suite(void); Suite *getdns_context_set_upstream_recursive_servers_suite(void); Suite *getdns_service_suite(void); Suite *getdns_service_sync_suite(void); Suite *getdns_context_set_timeout_suite(void); Suite *getdns_transport_suite(void); sr = srunner_create(getdns_general_suite()); srunner_add_suite(sr, getdns_general_sync_suite()); srunner_add_suite(sr, getdns_address_suite()); srunner_add_suite(sr, getdns_address_sync_suite()); srunner_add_suite(sr, getdns_hostname_suite()); srunner_add_suite(sr, getdns_hostname_sync_suite()); srunner_add_suite(sr, getdns_context_create_suite()); srunner_add_suite(sr, getdns_context_destroy_suite()); srunner_add_suite(sr, getdns_cancel_callback_suite()); srunner_add_suite(sr, getdns_list_get_length_suite()); srunner_add_suite(sr, getdns_list_get_data_type_suite()); srunner_add_suite(sr, getdns_list_get_dict_suite()); srunner_add_suite(sr, getdns_list_get_list_suite()); srunner_add_suite(sr, getdns_list_get_int_suite()); srunner_add_suite(sr, getdns_list_get_bindata_suite()); srunner_add_suite(sr, getdns_dict_get_names_suite()); srunner_add_suite(sr, getdns_dict_get_data_type_suite()); srunner_add_suite(sr, getdns_dict_get_dict_suite()); srunner_add_suite(sr, getdns_dict_get_list_suite()); srunner_add_suite(sr, getdns_dict_get_bindata_suite()); srunner_add_suite(sr, getdns_dict_get_int_suite()); srunner_add_suite(sr, getdns_dict_destroy_suite()); srunner_add_suite(sr, getdns_dict_set_dict_suite()); srunner_add_suite(sr, getdns_dict_set_list_suite()); srunner_add_suite(sr, getdns_dict_set_bindata_suite()); srunner_add_suite(sr, getdns_dict_set_int_suite()); srunner_add_suite(sr, getdns_convert_ulabel_to_alabel_suite()); srunner_add_suite(sr, getdns_convert_alabel_to_ulabel_suite()); srunner_add_suite(sr, getdns_pretty_print_dict_suite()); srunner_add_suite(sr,getdns_display_ip_address_suite()); srunner_add_suite(sr,getdns_context_set_context_update_callback_suite()); srunner_add_suite(sr,getdns_context_set_timeout_suite()); srunner_add_suite(sr,getdns_context_set_upstream_recursive_servers_suite()); srunner_add_suite(sr,getdns_service_suite()); srunner_add_suite(sr,getdns_service_sync_suite()); srunner_add_suite(sr,getdns_transport_suite()); srunner_run_all(sr, CK_NORMAL); number_failed = srunner_ntests_failed(sr); srunner_free(sr); return (number_failed == 0) ? EXIT_SUCCESS : EXIT_FAILURE; }
int main(void) { int number_failed; Suite *s = edc_suite(); SRunner *sr = srunner_create(s); srunner_set_xml(sr, "test_results.xml"); srunner_add_suite(sr, dgnss_management_test_suite()); srunner_add_suite(sr, baseline_test_suite()); srunner_add_suite(sr, amb_kf_test_suite()); srunner_add_suite(sr, observation_test_suite()); srunner_add_suite(sr, ambiguity_test_suite()); srunner_add_suite(sr, rtcm3_suite()); srunner_add_suite(sr, bits_suite()); srunner_add_suite(sr, memory_pool_suite()); srunner_add_suite(sr, coord_system_suite()); srunner_add_suite(sr, linear_algebra_suite()); srunner_add_suite(sr, filter_utils_suite()); srunner_add_suite(sr, ephemeris_suite()); srunner_add_suite(sr, set_suite()); srunner_set_fork_status(sr, CK_NOFORK); srunner_run_all(sr, CK_NORMAL); number_failed = srunner_ntests_failed(sr); srunner_free(sr); return (number_failed == 0) ? EXIT_SUCCESS : EXIT_FAILURE; }
int main (int argc, char* argv[]) { int num_failed; setTestDataDirectory(); SRunner *runner = srunner_create( create_suite_ReadSBML () ); srunner_add_suite( runner, create_suite_SBMLValidatorAPI () ); srunner_add_suite( runner, create_suite_RenameIDs () ); srunner_add_suite( runner, create_suite_RemoveFromParent () ); srunner_add_suite( runner, create_suite_GetMultipleObjects () ); srunner_add_suite( runner, create_suite_WriteSBML () ); srunner_add_suite( runner, create_suite_WriteL3SBML () ); srunner_add_suite( runner, create_suite_WriteL3V2SBML () ); srunner_add_suite( runner, create_suite_AlgebraicRule () ); srunner_add_suite( runner, create_suite_AssignmentRule () ); srunner_add_suite( runner, create_suite_Compartment () ); srunner_add_suite( runner, create_suite_L3_Compartment () ); srunner_add_suite( runner, create_suite_Compartment_newSetters () ); srunner_add_suite( runner, create_suite_CompartmentType () ); srunner_add_suite( runner, create_suite_CompartmentType_newSetters () ); srunner_add_suite( runner, create_suite_CompartmentVolumeRule () ); srunner_add_suite( runner, create_suite_Constraint () ); srunner_add_suite( runner, create_suite_Constraint_newSetters () ); srunner_add_suite( runner, create_suite_Delay () ); srunner_add_suite( runner, create_suite_Event () ); srunner_add_suite( runner, create_suite_L3_Event () ); srunner_add_suite( runner, create_suite_Event_newSetters () ); srunner_add_suite( runner, create_suite_EventAssignment () ); srunner_add_suite( runner, create_suite_EventAssignment_newSetters () ); srunner_add_suite( runner, create_suite_FunctionDefinition () ); srunner_add_suite( runner, create_suite_FunctionDefinition_newSetters () ); srunner_add_suite( runner, create_suite_InitialAssignment () ); srunner_add_suite( runner, create_suite_InitialAssignment_newSetters () ); srunner_add_suite( runner, create_suite_KineticLaw () ); srunner_add_suite( runner, create_suite_KineticLaw_newSetters () ); srunner_add_suite( runner, create_suite_L3_KineticLaw () ); srunner_add_suite( runner, create_suite_ListOf () ); srunner_add_suite( runner, create_suite_Model () ); srunner_add_suite( runner, create_suite_L3_Model () ); srunner_add_suite( runner, create_suite_Model_newSetters () ); srunner_add_suite( runner, create_suite_ModifierSpeciesReference () ); srunner_add_suite( runner, create_suite_Parameter () ); srunner_add_suite( runner, create_suite_L3_Parameter () ); srunner_add_suite( runner, create_suite_L3_LocalParameter () ); srunner_add_suite( runner, create_suite_Parameter_newSetters () ); srunner_add_suite( runner, create_suite_ParameterRule () ); srunner_add_suite( runner, create_suite_Priority () ); srunner_add_suite( runner, create_suite_RateRule () ); srunner_add_suite( runner, create_suite_Reaction () ); srunner_add_suite( runner, create_suite_L3_Reaction () ); srunner_add_suite( runner, create_suite_Reaction_newSetters () ); srunner_add_suite( runner, create_suite_Rule () ); srunner_add_suite( runner, create_suite_Rule_newSetters () ); srunner_add_suite( runner, create_suite_SBase () ); srunner_add_suite( runner, create_suite_SBase_newSetters () ); srunner_add_suite( runner, create_suite_Species () ); srunner_add_suite( runner, create_suite_L3_Species () ); srunner_add_suite( runner, create_suite_Species_newSetters () ); srunner_add_suite( runner, create_suite_SpeciesReference () ); srunner_add_suite( runner, create_suite_L3_SpeciesReference () ); srunner_add_suite( runner, create_suite_SpeciesReference_newSetters () ); srunner_add_suite( runner, create_suite_SpeciesConcentrationRule () ); srunner_add_suite( runner, create_suite_SpeciesType () ); srunner_add_suite( runner, create_suite_SpeciesType_newSetters () ); srunner_add_suite( runner, create_suite_StoichiometryMath () ); srunner_add_suite( runner, create_suite_Trigger () ); srunner_add_suite( runner, create_suite_L3Trigger () ); srunner_add_suite( runner, create_suite_Unit () ); srunner_add_suite( runner, create_suite_L3_Unit () ); srunner_add_suite( runner, create_suite_Unit_newSetters () ); srunner_add_suite( runner, create_suite_UnitDefinition () ); srunner_add_suite( runner, create_suite_UnitDefinition_newSetters () ); srunner_add_suite( runner, create_suite_UnitKind () ); srunner_add_suite( runner, create_suite_CopyAndClone () ); srunner_add_suite( runner, create_suite_SBMLConvert () ); srunner_add_suite( runner, create_suite_SBMLConvertStrict () ); srunner_add_suite( runner, create_suite_SBMLConvertFromL3V2 () ); srunner_add_suite( runner, create_suite_SBMLDocument () ); srunner_add_suite( runner, create_suite_SBMLError () ); srunner_add_suite( runner, create_suite_TestReadFromFile1 () ); srunner_add_suite( runner, create_suite_TestReadFromFile2 () ); srunner_add_suite( runner, create_suite_TestReadFromFile3 () ); srunner_add_suite( runner, create_suite_TestReadFromFile4 () ); srunner_add_suite( runner, create_suite_TestReadFromFile5 () ); srunner_add_suite( runner, create_suite_TestReadFromFile6 () ); srunner_add_suite( runner, create_suite_TestReadFromFile7 () ); srunner_add_suite( runner, create_suite_TestReadFromFile8 () ); srunner_add_suite( runner, create_suite_TestReadFromFile9 () ); srunner_add_suite( runner, create_suite_TestReadFromFileL2V5 () ); srunner_add_suite( runner, create_suite_TestReadFromFileL3V2 () ); srunner_add_suite( runner, create_suite_TestReadFromFileL3V2_1 () ); srunner_add_suite( runner, create_suite_TestReadFromFileL3V2_2 () ); srunner_add_suite( runner, create_suite_TestReadFromFileL3V2_3 () ); srunner_add_suite( runner, create_suite_TestReadFromFileL3V2_4 () ); srunner_add_suite( runner, create_suite_TestReadFromFileL3V2_5 () ); srunner_add_suite( runner, create_suite_TestReadFromFileL3V2_6 () ); srunner_add_suite( runner, create_suite_TestConsistencyChecks () ); srunner_add_suite( runner, create_suite_ParentObject () ); srunner_add_suite( runner, create_suite_AncestorObject () ); srunner_add_suite( runner, create_suite_TestInternalConsistencyChecks () ); srunner_add_suite( runner, create_suite_HasReqdAtt () ); srunner_add_suite( runner, create_suite_HasReqdElements () ); srunner_add_suite( runner, create_suite_SBMLNamespaces () ); srunner_add_suite( runner, create_suite_SyntaxChecker () ); srunner_add_suite( runner, create_suite_SBMLConstructorException () ); srunner_add_suite( runner, create_suite_SBMLTransforms () ); srunner_add_suite( runner, create_suite_GetMultipleObjects () ); srunner_add_suite( runner, create_suite_LevelCompatibility () ); srunner_add_suite( runner, create_suite_SBase_IdName () ); srunner_add_suite( runner, create_suite_Attributes () ); #ifdef TRACE_MEMORY srunner_set_fork_status(runner, CK_NOFORK); #else if (argc > 1 && !strcmp(argv[1], "-nofork")) { srunner_set_fork_status( runner, CK_NOFORK ); } #endif srunner_run_all(runner, CK_NORMAL); num_failed = srunner_ntests_failed(runner); #ifdef TRACE_MEMORY if (MemTrace_getNumLeaks() > 0) { MemTrace_printLeaks(stdout); } MemTrace_printStatistics(stdout); #endif srunner_free(runner); safe_free(TestDataDirectory); return num_failed; }
int main(int argc, char *argv[]) { SRunner *sr; int_t failed = 0; time_t prog_start, test_start, test_end; if (process_kill(PLACER("magmad", 18), SIGTERM, 10) < 0) { log_unit("Another instance of the Magma Daemon is already running and refuses to die."); exit(EXIT_FAILURE); } // Setup prog_start = time(NULL); // Updates the location of the config file if it was specified on the command line. check_args_parse(argc, argv); if (do_virus_check && !virus_check_data_path) { virus_check_data_path = ns_dupe(VIRUS_CHECK_DATA_PATH); } if (do_tank_check && !tank_check_data_path) { tank_check_data_path = ns_dupe(TANK_CHECK_DATA_PATH); } if (do_dspam_check && !dspam_check_data_path) { dspam_check_data_path = ns_dupe(DSPAM_CHECK_DATA_PATH); } /*if (do_virus_check) printf("doing virus check: [%s]\n", !virus_check_data_path ? "NONE" : virus_check_data_path); else printf ("skipping virus check\n"); if (do_tank_check) printf("doing tank check: [%s]\n", !tank_check_data_path ? "NONE" : tank_check_data_path); else printf ("skipping tank check\n"); if (do_dspam_check) printf("doing dspam check: [%s]\n", !dspam_check_data_path ? "NONE" : dspam_check_data_path); else printf ("skipping dspam check\n"); printf("config file: [%s]\n", magma.config.file); exit(EXIT_SUCCESS);*/ if (!process_start()) { log_unit("Initialization error. Exiting.\n"); status_set(-1); process_stop(); exit(EXIT_FAILURE); } // Only during development... cache_flush(); // Unit Test Config sr = srunner_create(suite_check_magma()); // Add the suites. srunner_add_suite(sr, suite_check_core()); srunner_add_suite(sr, suite_check_provide()); srunner_add_suite(sr, suite_check_network()); srunner_add_suite(sr, suite_check_objects()); srunner_add_suite(sr, suite_check_users()); // If were being run under Valgrind, we need to disable forking and increase the default timeout. // Under Valgrind, forked checks appear to improperly timeout. if (RUNNING_ON_VALGRIND == 0 && (failed = running_on_debugger()) == 0) { log_unit("Not being traced or profiled...\n"); srunner_set_fork_status (sr, CK_FORK); case_timeout = RUN_TEST_CASE_TIMEOUT; } else { // Trace detection attempted was thwarted. if (failed == -1) log_unit("Trace detection was thwarted.\n"); else log_unit("Tracing or debugging is active...\n"); srunner_set_fork_status (sr, CK_NOFORK); case_timeout = PROFILE_TEST_CASE_TIMEOUT; } // Execute log_unit("--------------------------------------------------------------------------\n"); test_start = time(NULL); srunner_run_all(sr, CK_SILENT); test_end = time(NULL); // Output timing. log_unit("--------------------------------------------------------------------------\n"); log_unit("%-63.63s %9lus\n", "TEST DURATION:", test_end - test_start); log_unit("%-63.63s %9lus\n", "TOTAL DURATION:", test_end - prog_start); // Summary log_unit("--------------------------------------------------------------------------\n"); failed = srunner_ntests_failed(sr); srunner_print(sr, CK_NORMAL); // The Check Output Ending log_unit("--------------------------------------------------------------------------\n"); // Cleanup and free the resources allocated by the check code. status_set(-1); srunner_free(sr); ns_cleanup(virus_check_data_path); ns_cleanup(tank_check_data_path); ns_cleanup(dspam_check_data_path); // Cleanup and free the resources allocated by the magma code. process_stop(); system_init_umask(); exit((failed == 0) ? EXIT_SUCCESS : EXIT_FAILURE); }
int main(int argc, char *argv[]) { const char *log_file = "api-tests.log"; int nfailed = 0; SRunner *runner = NULL; char *requested = NULL; runner = srunner_create(NULL); /* XXX This log name should be set outside this code, e.g. via environment * variable or command-line option. */ srunner_set_log(runner, log_file); requested = getenv("PR_TEST_SUITE"); if (requested) { Suite *suite; suite = tests_get_suite(requested); if (suite) { srunner_add_suite(runner, suite); } else { fprintf(stderr, "No such test suite ('%s') requested via PR_TEST_SUITE\n", requested); return EXIT_FAILURE; } } else { register unsigned int i; for (i = 0; suites[i].name; i++) { Suite *suite; suite = (suites[i].get_suite)(); if (suite) { srunner_add_suite(runner, suite); } } } /* Configure the Trace API to write to stderr. */ pr_trace_use_stderr(TRUE); requested = getenv("PR_TEST_NOFORK"); if (requested) { srunner_set_fork_status(runner, CK_NOFORK); } srunner_run_all(runner, CK_NORMAL); nfailed = srunner_ntests_failed(runner); if (runner) srunner_free(runner); if (nfailed != 0) { fprintf(stderr, "-------------------------------------------------\n"); fprintf(stderr, " FAILED %d %s\n\n", nfailed, nfailed != 1 ? "tests" : "test"); fprintf(stderr, " Please send email to:\n\n"); fprintf(stderr, " [email protected]\n\n"); fprintf(stderr, " containing the `%s' file (in the tests/ directory)\n", log_file); fprintf(stderr, " and the output from running `proftpd -V'\n"); fprintf(stderr, "-------------------------------------------------\n"); return EXIT_FAILURE; } return EXIT_SUCCESS; }
int main (void) { int num_failed; setTestDataDirectory(); SRunner *runner = srunner_create( create_suite_ASTNode() ); srunner_add_suite( runner, create_suite_FormulaFormatter () ); srunner_add_suite( runner, create_suite_FormulaParser () ); srunner_add_suite( runner, create_suite_L3FormulaFormatter () ); srunner_add_suite( runner, create_suite_L3FormulaParser () ); srunner_add_suite( runner, create_suite_L3FormulaParserC () ); srunner_add_suite( runner, create_suite_FormulaTokenizer () ); srunner_add_suite( runner, create_suite_ReadMathML () ); srunner_add_suite( runner, create_suite_WriteMathML () ); srunner_add_suite( runner, create_suite_WriteMathMLFromAST () ); srunner_add_suite( runner, create_suite_TestReadFromFile1() ); srunner_add_suite( runner, create_suite_TestReadFromFile2() ); srunner_add_suite( runner, create_suite_TestValidASTNode() ); /* srunner_set_fork_status(runner, CK_NOFORK); */ srunner_run_all(runner, CK_NORMAL); num_failed = srunner_ntests_failed(runner); srunner_free(runner); return num_failed; }