app/test: convert all tests to register system
[dpdk.git] / app / test / test_distributor.c
index 7648ed1..b29bef8 100644 (file)
@@ -503,7 +503,7 @@ quit_workers(struct rte_distributor *d, struct rte_mempool *p)
 
 #define MBUF_SIZE (2048 + sizeof(struct rte_mbuf) + RTE_PKTMBUF_HEADROOM)
 
-int
+static int
 test_distributor(void)
 {
        static struct rte_distributor *d;
@@ -581,15 +581,9 @@ err:
        return -1;
 }
 
-#else
-
-#include <stdio.h>
-
-int
-test_distributor(void)
-{
-       printf("Distributor is not enabled in configuration\n");
-       return 0;
-}
-
+static struct test_command distributor_cmd = {
+       .command = "distributor_autotest",
+       .callback = test_distributor,
+};
+REGISTER_TEST_COMMAND(distributor_cmd);
 #endif