tile: fix build
[dpdk.git] / app / test / test_resource.c
index 1e85040..a3a82f1 100644 (file)
@@ -85,6 +85,7 @@ static int test_resource_c(void)
        return 0;
 }
 
+#ifdef RTE_APP_TEST_RESOURCE_TAR
 REGISTER_LINKED_RESOURCE(test_resource_tar);
 
 static int test_resource_tar(void)
@@ -111,6 +112,8 @@ static int test_resource_tar(void)
        return 0;
 }
 
+#endif /* RTE_APP_TEST_RESOURCE_TAR */
+
 static int test_resource(void)
 {
        if (test_resource_dpdk())
@@ -119,14 +122,12 @@ static int test_resource(void)
        if (test_resource_c())
                return -1;
 
+#ifdef RTE_APP_TEST_RESOURCE_TAR
        if (test_resource_tar())
                return -1;
+#endif /* RTE_APP_TEST_RESOURCE_TAR */
 
        return 0;
 }
 
-static struct test_command resource_cmd = {
-       .command = "resource_autotest",
-       .callback = test_resource,
-};
-REGISTER_TEST_COMMAND(resource_cmd);
+REGISTER_TEST_COMMAND(resource_autotest, test_resource);