aboutsummaryrefslogtreecommitdiffstats
path: root/test_utils
diff options
context:
space:
mode:
Diffstat (limited to 'test_utils')
-rw-r--r--test_utils/test_common.h3
-rw-r--r--test_utils/test_main.c15
2 files changed, 18 insertions, 0 deletions
diff --git a/test_utils/test_common.h b/test_utils/test_common.h
index 1425dd84b7df..dd7e41016d52 100644
--- a/test_utils/test_common.h
+++ b/test_utils/test_common.h
@@ -329,6 +329,9 @@ int canLrzip(void);
/* Return true if this platform can run the "lz4" program. */
int canLz4(void);
+/* Return true if this platform can run the "zstd" program. */
+int canZstd(void);
+
/* Return true if this platform can run the "lzip" program. */
int canLzip(void);
diff --git a/test_utils/test_main.c b/test_utils/test_main.c
index 0e1413693f4a..0e8cc9fc56a2 100644
--- a/test_utils/test_main.c
+++ b/test_utils/test_main.c
@@ -2319,6 +2319,21 @@ canLz4(void)
}
/*
+ * Can this platform run the zstd program?
+ */
+int
+canZstd(void)
+{
+ static int tested = 0, value = 0;
+ if (!tested) {
+ tested = 1;
+ if (systemf("zstd -V %s", redirectArgs) == 0)
+ value = 1;
+ }
+ return (value);
+}
+
+/*
* Can this platform run the lzip program?
*/
int