]> git.droids-corp.org - dpdk.git/blobdiff - test/test/test_power.c
test: skip when required lib not available
[dpdk.git] / test / test / test_power.c
index d601a2730add40342404d93d4bf0bb084f49b84e..a0ee219830ff1b0e95c5e820c993ba95ce51c94a 100644 (file)
 
 #include "test.h"
 
+#ifndef RTE_LIBRTE_POWER
+
+static int
+test_power(void)
+{
+       printf("Power management library not supported, skipping test\n");
+       return TEST_SKIPPED;
+}
+
+#else
+
 #include <rte_power.h>
 
 static int
@@ -74,5 +85,6 @@ fail_all:
        rte_power_unset_env();
        return -1;
 }
+#endif
 
 REGISTER_TEST_COMMAND(power_autotest, test_power);