void RegisterAllModules();
void TmqhSetup (void);
-int RunUnittests(int list_unittests, char *regex_arg)
+/**
+ * Run or list unittests
+ *
+ * \param list_unittests If set to 1, list unittests. Run them if set to 0.
+ * \param regex_arg A regular expression to select unittests to run
+ *
+ * This function is terminal and will call exit after being called.
+ */
+
+void RunUnittests(int list_unittests, char *regex_arg)
{
#ifdef UNITTESTS
/* Initializations for global vars, queues, etc (memsets, mutex init..) */
RunModeListRunmodes();
return TM_ECODE_DONE;
case RUNMODE_LIST_UNITTEST:
- {
- int ret = RunUnittests(1, suri->regex_arg);
- if (ret == TM_ECODE_OK)
- return TM_ECODE_DONE;
- else
- return ret;
- }
+ RunUnittests(1, suri->regex_arg);
#ifdef OS_WIN32
case RUNMODE_INSTALL_SERVICE:
if (SCServiceInstall(argc, argv)) {
}
if (suri.run_mode == RUNMODE_UNITTEST)
- return RunUnittests(0, suri.regex_arg);
+ RunUnittests(0, suri.regex_arg);
#ifdef __SC_CUDA_SUPPORT__
/* Init the CUDA environment */