This commit allows a test to return "skipped", indicating
that it cannot be run. This is useful for PMDs which have
not been compiled due to the unavailability of dependencies,
or their explicit disabling in the build configuration.
The result printing is updated to correctly indicate if a
test has been skipped.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
last_test_result = ret;
if (ret == 0)
printf("Test OK\n");
+ else if (ret == TEST_SKIPPED)
+ printf("Test Skipped\n");
else
printf("Test Failed\n");
fflush(stdout);
#include <rte_common.h>
#include <rte_log.h>
-#define TEST_SUCCESS (0)
-#define TEST_FAILED (-1)
+#define TEST_SUCCESS EXIT_SUCCESS
+#define TEST_FAILED -1
+#define TEST_SKIPPED 77
/* Before including test.h file you can define
* TEST_TRACE_FAILURE(_file, _line, _func) macro to better trace/debug test