{ "test_memory_flags", no_action },
{ "test_file_prefix", no_action },
{ "test_no_huge_flag", no_action },
+#ifdef RTE_LIBRTE_TIMER
{ "timer_secondary_spawn_wait", test_timer_secondary },
+#endif
};
if (recursive_call == NULL)
ret = 0;
out:
+#ifdef RTE_LIBRTE_TIMER
+ rte_timer_subsystem_finalize();
+#endif
rte_eal_cleanup();
return ret;
}
printf(" + Test Suite : %s\n", suite->suite_name);
}
- if (suite->setup)
- if (suite->setup() != 0) {
+ if (suite->setup) {
+ test_success = suite->setup();
+ if (test_success != 0) {
/*
- * setup failed, so count all enabled tests and mark
- * them as failed
+ * setup did not pass, so count all enabled tests and
+ * mark them as failed/skipped
*/
while (suite->unit_test_cases[total].testcase) {
- if (!suite->unit_test_cases[total].enabled)
+ if (!suite->unit_test_cases[total].enabled ||
+ test_success == TEST_SKIPPED)
skipped++;
else
failed++;
}
goto suite_summary;
}
+ }
printf(" + ------------------------------------------------------- +\n");
test_success = suite->unit_test_cases[total].testcase();
if (test_success == TEST_SUCCESS)
succeeded++;
+ else if (test_success == TEST_SKIPPED)
+ skipped++;
else if (test_success == -ENOTSUP)
unsupported++;
else
if (test_success == TEST_SUCCESS)
status = "succeeded";
+ else if (test_success == TEST_SKIPPED)
+ status = "skipped";
else if (test_success == -ENOTSUP)
status = "unsupported";
else
last_test_result = failed;
if (failed)
- return -1;
-
- return 0;
+ return TEST_FAILED;
+ if (total == skipped)
+ return TEST_SKIPPED;
+ return TEST_SUCCESS;
}