return TM_ECODE_DONE;
case RUNMODE_LIST_UNITTEST:
RunUnittests(1, suri->regex_arg);
+ case RUNMODE_UNITTEST:
+ RunUnittests(0, suri->regex_arg);
#ifdef OS_WIN32
case RUNMODE_INSTALL_SERVICE:
if (SCServiceInstall(argc, argv)) {
exit(EXIT_FAILURE);
}
+ if (FinalizeRunMode(&suri, argv) != TM_ECODE_OK) {
+ exit(EXIT_FAILURE);
+ }
+
switch (StartInternalRunMode(&suri, argc, argv)) {
case TM_ECODE_DONE:
exit(EXIT_SUCCESS);
exit(EXIT_FAILURE);
}
- if (FinalizeRunMode(&suri, argv) != TM_ECODE_OK) {
- exit(EXIT_FAILURE);
- }
-
- if (suri.run_mode == RUNMODE_UNITTEST)
- RunUnittests(0, suri.regex_arg);
-
#ifdef __SC_CUDA_SUPPORT__
/* Init the CUDA environment */
SCCudaInitCudaEnvironment();