[v3,1/8] app/test: add new macros for various test types
Commit Message
Rather than just registering all tests using a single generic macro,
add macros which identify the test as being of a particular type.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
app/test/test.h | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
@@ -190,7 +190,7 @@ struct test_command {
void add_test_command(struct test_command *t);
-/* Register a test function with its command string */
+/* Register a test function with its command string. Should not be used directly */
#define REGISTER_TEST_COMMAND(cmd, func) \
static struct test_command test_struct_##cmd = { \
.command = RTE_STR(cmd), \
@@ -201,4 +201,11 @@ void add_test_command(struct test_command *t);
add_test_command(&test_struct_##cmd); \
}
+/* Register a test function as a particular type.
+ * These can be used to build up test suites automatically
+ */
+#define REGISTER_FAST_TEST(cmd, no_huge, ASan, func) REGISTER_TEST_COMMAND(cmd, func)
+#define REGISTER_PERF_TEST REGISTER_TEST_COMMAND
+#define REGISTER_DRIVER_TEST REGISTER_TEST_COMMAND
+
#endif