diff options
author | Martin Pitt <martinpitt@users.noreply.github.com> | 2017-04-21 21:36:56 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-04-21 21:36:56 +0200 |
commit | 56744c037da0ba2032fba0c7ac116317bb5ae4ae (patch) | |
tree | db0347ca9acff034003a7d947fd9e77729affa41 /src/journal | |
parent | 301fb51922d435d5f5ef02d234dc7a271ecca930 (diff) | |
parent | 62cc1c55cb6909c9b0065bf55940bc5a5780f67b (diff) |
Merge pull request #5756 from keszybz/make-cleanups
Various meson-independent cleanups from the meson patchset
Diffstat (limited to 'src/journal')
-rw-r--r-- | src/journal/test-compress-benchmark.c | 7 | ||||
-rw-r--r-- | src/journal/test-compress.c | 6 |
2 files changed, 13 insertions, 0 deletions
diff --git a/src/journal/test-compress-benchmark.c b/src/journal/test-compress-benchmark.c index 6f6d71435d..4fb93ded73 100644 --- a/src/journal/test-compress-benchmark.c +++ b/src/journal/test-compress-benchmark.c @@ -30,6 +30,8 @@ typedef int (compress_t)(const void *src, uint64_t src_size, void *dst, typedef int (decompress_t)(const void *src, uint64_t src_size, void **dst, size_t *dst_alloc_size, size_t* dst_size, size_t dst_max); +#if defined(HAVE_XZ) || defined(HAVE_LZ4) + static usec_t arg_duration = 2 * USEC_PER_SEC; static size_t arg_start; @@ -151,8 +153,10 @@ static void test_compress_decompress(const char* label, const char* type, 100 - compressed * 100. / total, skipped); } +#endif int main(int argc, char *argv[]) { +#if defined(HAVE_XZ) || defined(HAVE_LZ4) const char *i; log_set_max_level(LOG_INFO); @@ -177,4 +181,7 @@ int main(int argc, char *argv[]) { #endif } return 0; +#else + return EXIT_TEST_SKIP; +#endif } diff --git a/src/journal/test-compress.c b/src/journal/test-compress.c index 44a2cf5217..92108a84b3 100644 --- a/src/journal/test-compress.c +++ b/src/journal/test-compress.c @@ -54,6 +54,7 @@ typedef int (decompress_sw_t)(const void *src, uint64_t src_size, typedef int (compress_stream_t)(int fdf, int fdt, uint64_t max_bytes); typedef int (decompress_stream_t)(int fdf, int fdt, uint64_t max_size); +#if defined(HAVE_XZ) || defined(HAVE_LZ4) static void test_compress_decompress(int compression, compress_blob_t compress, decompress_blob_t decompress, @@ -203,6 +204,7 @@ static void test_compress_stream(int compression, assert_se(unlink(pattern) == 0); assert_se(unlink(pattern2) == 0); } +#endif #ifdef HAVE_LZ4 static void test_lz4_decompress_partial(void) { @@ -247,6 +249,7 @@ static void test_lz4_decompress_partial(void) { #endif int main(int argc, char *argv[]) { +#if defined(HAVE_XZ) || defined(HAVE_LZ4) const char text[] = "text\0foofoofoofoo AAAA aaaaaaaaa ghost busters barbarbar FFF" "foofoofoofoo AAAA aaaaaaaaa ghost busters barbarbar FFF"; @@ -312,4 +315,7 @@ int main(int argc, char *argv[]) { #endif return 0; +#else + return EXIT_TEST_SKIP; +#endif } |