app/test: convert all tests to register system
[dpdk.git] / app / test / test_table.c
index 970d15c..33e2efc 100644 (file)
  */
 
 
-#ifndef RTE_LIBRTE_TABLE
-
-#include "test.h"
-
-int
-test_table(void)
-{
-       return 0;
-}
-
-#else
+#ifdef RTE_LIBRTE_TABLE
 
 #include <rte_byteorder.h>
 #include <rte_hexdump.h>
@@ -156,7 +146,7 @@ app_init_rings(void)
 
 }
 
-int
+static int
 test_table(void)
 {
        int status, failures;
@@ -217,4 +207,9 @@ test_table(void)
        return 0;
 }
 
+static struct test_command table_cmd = {
+       .command = "table_autotest",
+       .callback = test_table,
+};
+REGISTER_TEST_COMMAND(table_cmd);
 #endif