summaryrefslogtreecommitdiff
blob: e4d11f7d902109059b853ac3de136c9f2bba26de (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
https://github.com/zeevt/csnappy/pull/40

From 60ac30054eae4bbc50f90f8228ac53d014400619 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com>
Date: Thu, 16 Dec 2021 14:24:26 +0100
Subject: [PATCH] Fix parallel tests by only testing the current optimization
 level

https://github.com/zeevt/csnappy/issues/39
--- a/Makefile
+++ b/Makefile
@@ -34,25 +34,14 @@ check_leaks: cl_tester
 	LD_LIBRARY_PATH=. valgrind --leak-check=full --show-reachable=yes ./cl_tester -c <testdata/urls.10K >/dev/null
 	LD_LIBRARY_PATH=. valgrind --leak-check=full --show-reachable=yes ./cl_tester -S d
 
-check_unaligned_uint64:
+check_unaligned_uint64: cl_tester
 	gzip -dc <testdata/unaligned_uint64_test.snappy.gz >testdata/unaligned_uint64_test.snappy
 	gzip -dc <testdata/unaligned_uint64_test.bin.gz >testdata/unaligned_uint64_test.bin
-	EXTRA_TEST_CFLAGS="-O0" make check_unaligned_uint64_extra_cflags
-	EXTRA_TEST_CFLAGS="-O1" make check_unaligned_uint64_extra_cflags
-	EXTRA_TEST_CFLAGS="-O2" make check_unaligned_uint64_extra_cflags
-	EXTRA_TEST_CFLAGS="-O3" make check_unaligned_uint64_extra_cflags
-	EXTRA_TEST_CFLAGS="-O2 -march=native" make check_unaligned_uint64_extra_cflags
-	EXTRA_TEST_CFLAGS="-O3 -march=native" make check_unaligned_uint64_extra_cflags
-	rm -f testdata/unaligned_uint64_test.snappy testdata/unaligned_uint64_test.bin
-
-check_unaligned_uint64_extra_cflags:
-	make clean
-	make cl_tester
 	rm -f tmp
 	LD_LIBRARY_PATH=. ./cl_tester -d testdata/unaligned_uint64_test.snappy tmp
-	diff testdata/unaligned_uint64_test.bin tmp >/dev/null && echo "${EXTRA_TEST_CFLAGS} ok"
-	make clean
+	diff testdata/unaligned_uint64_test.bin tmp >/dev/null && echo "Unaligned test is ok"
 	rm -f tmp
+	rm -f testdata/unaligned_uint64_test.snappy testdata/unaligned_uint64_test.bin
 
 libcsnappy.so: csnappy_compress.c csnappy_decompress.c csnappy_internal.h csnappy_internal_userspace.h
 	$(CC) $(CFLAGS) $(EXTRA_TEST_CFLAGS) -fPIC -DPIC -c -o csnappy_compress.o csnappy_compress.c