MCPcopy Create free account
hub / github.com/OpenSIPS/opensips / run_unit_tests

Function run_unit_tests

test/unit_tests.c:55–92  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

53}
54
55int run_unit_tests(void)
56{
57 char *error;
58 void *mod_handle;
59 mod_tests_f mod_tests;
60
61 /* core tests */
62 if (!strcmp(testing_module, "core")) {
63 /* remember to update the Makefile.test OpenSIPS command-line with at
64 * least "-m2048 -M128" before stress-testing any of the allocators! */
65 //test_malloc();
66 test_cachedb();
67 test_lib_csv();
68 test_parser();
69 test_ut();
70 test_lib_digest_auth();
71 test_db();
72
73 /* module tests */
74 } else {
75 mod_handle = get_mod_handle(testing_module);
76 if (!mod_handle) {
77 LM_ERR("module not loaded / not found: '%s'\n", testing_module);
78 return -1;
79 }
80
81 mod_tests = (mod_tests_f)dlsym(mod_handle, DLSYM_PREFIX "mod_tests");
82 if ((error = (char *)dlerror())) {
83 LM_ERR("failed to locate 'mod_tests' in '%s': %s\n",
84 testing_module, error);
85 return -1;
86 }
87
88 mod_tests();
89 }
90
91 done_testing();
92}

Callers 1

main_loopFunction · 0.85

Calls 8

test_cachedbFunction · 0.85
test_lib_csvFunction · 0.85
test_parserFunction · 0.85
test_utFunction · 0.85
test_lib_digest_authFunction · 0.85
test_dbFunction · 0.85
get_mod_handleFunction · 0.85
mod_testsFunction · 0.50

Tested by

no test coverage detected