diff --git a/tests/include/tc_util.h b/tests/include/tc_util.h index 85a3e8fff16..d2b18a9ecb9 100644 --- a/tests/include/tc_util.h +++ b/tests/include/tc_util.h @@ -22,6 +22,7 @@ #include #include +#include #if defined(CONFIG_STDOUT_CONSOLE) #include @@ -98,4 +99,14 @@ (result) == TC_PASS ? "SUCCESSFUL" : "FAILED"); \ } while (0) +#define TC_CMD_DEFINE(name) \ + int cmd_##name(int argc, char *argv[]) \ + { \ + TC_START(__func__); \ + name(); \ + TC_END_RESULT(TC_PASS); \ + return 0; \ + } + +#define TC_CMD_ITEM(name) {STRINGIFY(name), cmd_##name, "none"} #endif /* __TC_UTIL_H__ */