test: skip tests when missing requirements
[dpdk.git] / app / test / test_compressdev.c
index 8d6dbf0..cf78775 100644 (file)
@@ -5,6 +5,7 @@
 #include <zlib.h>
 #include <math.h>
 #include <stdlib.h>
+#include <unistd.h>
 
 #include <rte_cycles.h>
 #include <rte_malloc.h>
@@ -133,8 +134,8 @@ testsuite_setup(void)
        unsigned int i;
 
        if (rte_compressdev_count() == 0) {
-               RTE_LOG(ERR, USER1, "Need at least one compress device\n");
-               return TEST_FAILED;
+               RTE_LOG(WARNING, USER1, "Need at least one compress device\n");
+               return TEST_SKIPPED;
        }
 
        RTE_LOG(NOTICE, USER1, "Running tests on device %s\n",