#include "compiler.h"
+#include "command-line.h"
+
/* Overview
* ========
*
*/
typedef void (*ovstest_func)(int argc, char *argv[]);
-void ovstest_register(const char *test_name, ovstest_func f);
+
+void ovstest_register(const char *test_name, ovs_cmdl_handler f);
/* Usage
* =====
* OVSTEST_REGISTER("my-test", my_test_main);
*/
#define OVSTEST_REGISTER(name, function) \
+ static void \
+ ovstest_wrapper_##function##__(struct ovs_cmdl_context *ctx) \
+ { \
+ function(ctx->argc, ctx->argv); \
+ } \
OVS_CONSTRUCTOR(register_##function) { \
- ovstest_register(name, function); \
+ ovstest_register(name, ovstest_wrapper_##function##__); \
}
#endif