app/test: convert all tests to register system
[dpdk.git] / app / test / test_lpm.c
index 05f0a93..087d97a 100644 (file)
@@ -1332,7 +1332,7 @@ perf_test(void)
  * Do all unit and performance tests.
  */
 
-int
+static int
 test_lpm(void)
 {
        unsigned i;
@@ -1349,13 +1349,9 @@ test_lpm(void)
        return global_status;
 }
 
-#else /* RTE_LIBRTE_LPM */
-
-int
-test_lpm(void)
-{
-       printf("The LPM library is not included in this build\n");
-       return 0;
-}
-
+static struct test_command lpm_cmd = {
+       .command = "lpm_autotest",
+       .callback = test_lpm,
+};
+REGISTER_TEST_COMMAND(lpm_cmd);
 #endif /* RTE_LIBRTE_LPM */