Added
Link Here
|
1 |
--- ../../tests/Makefile.orig 2022-08-15 22:45:31.000000000 +0000 |
2 |
+++ ../../tests/Makefile 2022-10-25 16:11:39.498501000 +0000 |
3 |
@@ -173,6 +173,7 @@ |
4 |
CAT:=cat |
5 |
DD:=dd |
6 |
DATAGEN:=./datagen |
7 |
+PATH:=../programs:$(shell pwd):$(PATH) |
8 |
|
9 |
.PHONY: list |
10 |
list: |
11 |
@@ -211,312 +212,55 @@ |
12 |
# All FPREFIX must start with `tmp`, for `make clean` |
13 |
# All tests must clean their temporary test files on successful completion, |
14 |
# and only their test files : do not employ sweeping statements such `rm tmp*` or `rm *.lz4` |
15 |
-test-lz4-sparse: FPREFIX = tmp-tls |
16 |
test-lz4-sparse: lz4 datagen |
17 |
@echo "\n ---- test sparse file support ----" |
18 |
- $(DATAGEN) -g5M -P100 > $(FPREFIX)dg5M |
19 |
- $(LZ4) -B4D $(FPREFIX)dg5M -c | $(LZ4) -dv --sparse > $(FPREFIX)cB4 |
20 |
- $(DIFF) -s $(FPREFIX)dg5M $(FPREFIX)cB4 |
21 |
- $(LZ4) -B5D $(FPREFIX)dg5M -c | $(LZ4) -dv --sparse > $(FPREFIX)cB5 |
22 |
- $(DIFF) -s $(FPREFIX)dg5M $(FPREFIX)cB5 |
23 |
- $(LZ4) -B6D $(FPREFIX)dg5M -c | $(LZ4) -dv --sparse > $(FPREFIX)cB6 |
24 |
- $(DIFF) -s $(FPREFIX)dg5M $(FPREFIX)cB6 |
25 |
- $(LZ4) -B7D $(FPREFIX)dg5M -c | $(LZ4) -dv --sparse > $(FPREFIX)cB7 |
26 |
- $(DIFF) -s $(FPREFIX)dg5M $(FPREFIX)cB7 |
27 |
- $(LZ4) $(FPREFIX)dg5M -c | $(LZ4) -dv --no-sparse > $(FPREFIX)nosparse |
28 |
- $(DIFF) -s $(FPREFIX)dg5M $(FPREFIX)nosparse |
29 |
- ls -ls $(FPREFIX)* |
30 |
- $(DATAGEN) -s1 -g1200007 -P100 | $(LZ4) | $(LZ4) -dv --sparse > $(FPREFIX)odd # Odd size file (to generate non-full last block) |
31 |
- $(DATAGEN) -s1 -g1200007 -P100 | $(DIFF) -s - $(FPREFIX)odd |
32 |
- ls -ls $(FPREFIX)odd |
33 |
- @$(RM) $(FPREFIX)* |
34 |
- @echo "\n Compatibility with Console :" |
35 |
- echo "Hello World 1 !" | $(LZ4) | $(LZ4) -d -c |
36 |
- echo "Hello World 2 !" | $(LZ4) | $(LZ4) -d | $(CAT) |
37 |
- echo "Hello World 3 !" | $(LZ4) --no-frame-crc | $(LZ4) -d -c |
38 |
- @echo "\n Compatibility with Append :" |
39 |
- $(DATAGEN) -P100 -g1M > $(FPREFIX)dg1M |
40 |
- $(CAT) $(FPREFIX)dg1M $(FPREFIX)dg1M > $(FPREFIX)2M |
41 |
- $(LZ4) -B5 -v $(FPREFIX)dg1M $(FPREFIX)c |
42 |
- $(LZ4) -d -v $(FPREFIX)c $(FPREFIX)r |
43 |
- $(LZ4) -d -v $(FPREFIX)c -c >> $(FPREFIX)r |
44 |
- ls -ls $(FPREFIX)* |
45 |
- $(DIFF) $(FPREFIX)2M $(FPREFIX)r |
46 |
- @$(RM) $(FPREFIX)* |
47 |
+ PATH=$(PATH) ./test-lz4-sparse.sh |
48 |
|
49 |
-test-lz4-contentSize: FPREFIX = tmp-lzc |
50 |
test-lz4-contentSize: lz4 datagen |
51 |
@echo "\n ---- test original size support ----" |
52 |
- $(DATAGEN) -g15M > $(FPREFIX) |
53 |
- $(LZ4) -v $(FPREFIX) -c | $(LZ4) -t |
54 |
- $(LZ4) -v --content-size $(FPREFIX) -c | $(LZ4) -d > $(FPREFIX)-dup |
55 |
- $(DIFF) $(FPREFIX) $(FPREFIX)-dup |
56 |
- $(LZ4) -f $(FPREFIX) -c > $(FPREFIX).lz4 # compressed with content size |
57 |
- $(LZ4) --content-size $(FPREFIX) -c > $(FPREFIX)-wcz.lz4 |
58 |
- ! $(DIFF) $(FPREFIX).lz4 $(FPREFIX)-wcz.lz4 # must differ, due to content size |
59 |
- $(LZ4) --content-size < $(FPREFIX) > $(FPREFIX)-wcz2.lz4 # can determine content size because stdin is just a file |
60 |
- $(DIFF) $(FPREFIX)-wcz.lz4 $(FPREFIX)-wcz2.lz4 # both must contain content size |
61 |
- $(CAT) $(FPREFIX) | $(LZ4) > $(FPREFIX)-ncz.lz4 |
62 |
- $(DIFF) $(FPREFIX).lz4 $(FPREFIX)-ncz.lz4 # both don't have content size |
63 |
- $(CAT) $(FPREFIX) | $(LZ4) --content-size > $(FPREFIX)-ncz2.lz4 # can't determine content size |
64 |
- $(DIFF) $(FPREFIX).lz4 $(FPREFIX)-ncz2.lz4 # both don't have content size |
65 |
- @$(RM) $(FPREFIX)* |
66 |
+ PATH=$(PATH) ./test-lz4-contentSize.sh |
67 |
|
68 |
-test-lz4-frame-concatenation: FPREFIX = tmp-lfc |
69 |
test-lz4-frame-concatenation: lz4 datagen |
70 |
@echo "\n ---- test frame concatenation ----" |
71 |
- @echo -n > $(FPREFIX)-empty |
72 |
- @echo hi > $(FPREFIX)-nonempty |
73 |
- $(CAT) $(FPREFIX)-nonempty $(FPREFIX)-empty $(FPREFIX)-nonempty > $(FPREFIX)-src |
74 |
- $(LZ4) -zq $(FPREFIX)-empty -c > $(FPREFIX)-empty.lz4 |
75 |
- $(LZ4) -zq $(FPREFIX)-nonempty -c > $(FPREFIX)-nonempty.lz4 |
76 |
- $(CAT) $(FPREFIX)-nonempty.lz4 $(FPREFIX)-empty.lz4 $(FPREFIX)-nonempty.lz4 > $(FPREFIX)-concat.lz4 |
77 |
- $(LZ4) -d $(FPREFIX)-concat.lz4 -c > $(FPREFIX)-result |
78 |
- $(CMP) $(FPREFIX)-src $(FPREFIX)-result |
79 |
- @$(RM) $(FPREFIX)* |
80 |
- @echo frame concatenation test completed |
81 |
+ PATH=$(PATH) ./test-lz4-frame-concatenation.sh |
82 |
|
83 |
-test-lz4-multiple: FPREFIX = tmp-tml |
84 |
test-lz4-multiple: lz4 datagen |
85 |
@echo "\n ---- test multiple files ----" |
86 |
- @$(DATAGEN) -s1 > $(FPREFIX)1 2> $(VOID) |
87 |
- @$(DATAGEN) -s2 -g100K > $(FPREFIX)2 2> $(VOID) |
88 |
- @$(DATAGEN) -s3 -g200K > $(FPREFIX)3 2> $(VOID) |
89 |
- # compress multiple files : one .lz4 per source file |
90 |
- $(LZ4) -f -m $(FPREFIX)* |
91 |
- test -f $(FPREFIX)1.lz4 |
92 |
- test -f $(FPREFIX)2.lz4 |
93 |
- test -f $(FPREFIX)3.lz4 |
94 |
- # decompress multiple files : one output file per .lz4 |
95 |
- mv $(FPREFIX)1 $(FPREFIX)1-orig |
96 |
- mv $(FPREFIX)2 $(FPREFIX)2-orig |
97 |
- mv $(FPREFIX)3 $(FPREFIX)3-orig |
98 |
- $(LZ4) -d -f -m $(FPREFIX)*.lz4 |
99 |
- $(CMP) $(FPREFIX)1 $(FPREFIX)1-orig # must be identical |
100 |
- $(CMP) $(FPREFIX)2 $(FPREFIX)2-orig |
101 |
- $(CMP) $(FPREFIX)3 $(FPREFIX)3-orig |
102 |
- # compress multiple files into stdout |
103 |
- $(CAT) $(FPREFIX)1.lz4 $(FPREFIX)2.lz4 $(FPREFIX)3.lz4 > $(FPREFIX)-concat1 |
104 |
- $(RM) $(FPREFIX)*.lz4 |
105 |
- $(LZ4) -m $(FPREFIX)1 $(FPREFIX)2 $(FPREFIX)3 -c > $(FPREFIX)-concat2 |
106 |
- test ! -f $(FPREFIX)1.lz4 # must not create .lz4 artefact |
107 |
- $(CMP) $(FPREFIX)-concat1 $(FPREFIX)-concat2 # must be equivalent |
108 |
- # decompress multiple files into stdout |
109 |
- $(RM) $(FPREFIX)-concat1 $(FPREFIX)-concat2 |
110 |
- $(LZ4) -f -m $(FPREFIX)1 $(FPREFIX)2 $(FPREFIX)3 # generate .lz4 to decompress |
111 |
- $(CAT) $(FPREFIX)1 $(FPREFIX)2 $(FPREFIX)3 > $(FPREFIX)-concat1 # create concatenated reference |
112 |
- $(RM) $(FPREFIX)1 $(FPREFIX)2 $(FPREFIX)3 |
113 |
- $(LZ4) -d -m $(FPREFIX)1.lz4 $(FPREFIX)2.lz4 $(FPREFIX)3.lz4 -c > $(FPREFIX)-concat2 |
114 |
- test ! -f $(FPREFIX)1 # must not create file artefact |
115 |
- $(CMP) $(FPREFIX)-concat1 $(FPREFIX)-concat2 # must be equivalent |
116 |
- # compress multiple files, one of which is absent (must fail) |
117 |
- ! $(LZ4) -f -m $(FPREFIX)-concat1 notHere $(FPREFIX)-concat2 # must fail : notHere not present |
118 |
- # test lz4-compressed file |
119 |
- $(LZ4) -tm $(FPREFIX)-concat1.lz4 |
120 |
- $(LZ4) -tm $(FPREFIX)-concat1.lz4 $(FPREFIX)-concat2.lz4 |
121 |
- # test multiple lz4 files, one of which is absent (must fail) |
122 |
- ! $(LZ4) -tm $(FPREFIX)-concat1.lz4 notHere.lz4 $(FPREFIX)-concat2.lz4 |
123 |
- @$(RM) $(FPREFIX)* |
124 |
+ PATH=$(PATH) ./test-lz4-multiple.sh |
125 |
|
126 |
-test-lz4-multiple-legacy: FPREFIX = tmp-lml |
127 |
test-lz4-multiple-legacy: lz4 datagen |
128 |
@echo "\n ---- test multiple files (Legacy format) ----" |
129 |
- @$(DATAGEN) -s1 > $(FPREFIX)1 2> $(VOID) |
130 |
- @$(DATAGEN) -s2 -g100K > $(FPREFIX)2 2> $(VOID) |
131 |
- @$(DATAGEN) -s3 -g200K > $(FPREFIX)3 2> $(VOID) |
132 |
- # compress multiple files using legacy format: one .lz4 per source file |
133 |
- $(LZ4) -f -l -m $(FPREFIX)* |
134 |
- test -f $(FPREFIX)1.lz4 |
135 |
- test -f $(FPREFIX)2.lz4 |
136 |
- test -f $(FPREFIX)3.lz4 |
137 |
- # decompress multiple files compressed using legacy format: one output file per .lz4 |
138 |
- mv $(FPREFIX)1 $(FPREFIX)1-orig |
139 |
- mv $(FPREFIX)2 $(FPREFIX)2-orig |
140 |
- mv $(FPREFIX)3 $(FPREFIX)3-orig |
141 |
- $(LZ4) -d -f -m $(FPREFIX)*.lz4 |
142 |
- $(LZ4) -l -d -f -m $(FPREFIX)*.lz4 # -l mustn't impact -d option |
143 |
- $(CMP) $(FPREFIX)1 $(FPREFIX)1-orig # must be identical |
144 |
- $(CMP) $(FPREFIX)2 $(FPREFIX)2-orig |
145 |
- $(CMP) $(FPREFIX)3 $(FPREFIX)3-orig |
146 |
- # compress multiple files into stdout using legacy format |
147 |
- $(CAT) $(FPREFIX)1.lz4 $(FPREFIX)2.lz4 $(FPREFIX)3.lz4 > $(FPREFIX)-concat1 |
148 |
- $(RM) $(FPREFIX)*.lz4 |
149 |
- $(LZ4) -l -m $(FPREFIX)1 $(FPREFIX)2 $(FPREFIX)3 -c > $(FPREFIX)-concat2 |
150 |
- test ! -f $(FPREFIX)1.lz4 # must not create .lz4 artefact |
151 |
- $(CMP) $(FPREFIX)-concat1 $(FPREFIX)-concat2 # must be equivalent |
152 |
- # # # decompress multiple files into stdout using legacy format |
153 |
- $(RM) $(FPREFIX)-concat1 $(FPREFIX)-concat2 |
154 |
- $(LZ4) -l -f -m $(FPREFIX)1 $(FPREFIX)2 $(FPREFIX)3 # generate .lz4 to decompress |
155 |
- $(CAT) $(FPREFIX)1 $(FPREFIX)2 $(FPREFIX)3 > $(FPREFIX)-concat1 # create concatenated reference |
156 |
- $(RM) $(FPREFIX)1 $(FPREFIX)2 $(FPREFIX)3 |
157 |
- $(LZ4) -d -m $(FPREFIX)1.lz4 $(FPREFIX)2.lz4 $(FPREFIX)3.lz4 -c > $(FPREFIX)-concat2 |
158 |
- $(LZ4) -d -l -m $(FPREFIX)1.lz4 $(FPREFIX)2.lz4 $(FPREFIX)3.lz4 -c > $(FPREFIX)-concat2 # -l mustn't impact option -d |
159 |
- test ! -f $(FPREFIX)1 # must not create file artefact |
160 |
- $(CMP) $(FPREFIX)-concat1 $(FPREFIX)-concat2 # must be equivalent |
161 |
- # # # compress multiple files, one of which is absent (must fail) |
162 |
- ! $(LZ4) -f -l -m $(FPREFIX)-concat1 notHere-legacy $(FPREFIX)-concat2 # must fail : notHere-legacy not present |
163 |
- @$(RM) $(FPREFIX)* |
164 |
+ PATH=$(PATH) ./test-lz4-multiple-legacy.sh |
165 |
|
166 |
-SKIPFILE = goldenSamples/skip.bin |
167 |
-test-lz4-skippable: FPREFIX = tmp-lsk |
168 |
-test-lz4-skippable: lz4 datagen |
169 |
+test-lz4-skippable: lz4 |
170 |
@echo "\n ---- test lz4 with skippable frames ----" |
171 |
- $(LZ4) -dc $(SKIPFILE) |
172 |
- $(LZ4) -dc < $(SKIPFILE) |
173 |
- cat $(SKIPFILE) | $(LZ4) -dc |
174 |
- echo "Hello from Valid Frame!\n" | $(LZ4) -c > $(FPREFIX).lz4 |
175 |
- cat $(SKIPFILE) $(FPREFIX).lz4 $(SKIPFILE) | $(LZ4) -dc |
176 |
- $(RM) $(FPREFIX)* |
177 |
+ PATH=$(PATH) ./test-lz4-skippable.sh |
178 |
|
179 |
-test-lz4-basic: FPREFIX = tmp-tlb |
180 |
test-lz4-basic: lz4 datagen unlz4 lz4cat |
181 |
@echo "\n ---- test lz4 basic compression/decompression ----" |
182 |
- $(DATAGEN) -g0 | $(LZ4) -v | $(LZ4) -t |
183 |
- $(DATAGEN) -g16KB | $(LZ4) -9 | $(LZ4) -t |
184 |
- $(DATAGEN) -g20KB > $(FPREFIX)-dg20k |
185 |
- $(LZ4) < $(FPREFIX)-dg20k | $(LZ4) -d > $(FPREFIX)-dec |
186 |
- $(DIFF) -q $(FPREFIX)-dg20k $(FPREFIX)-dec |
187 |
- $(LZ4) --no-frame-crc < $(FPREFIX)-dg20k | $(LZ4) -d > $(FPREFIX)-dec |
188 |
- $(DIFF) -q $(FPREFIX)-dg20k $(FPREFIX)-dec |
189 |
- $(DATAGEN) | $(LZ4) -BI | $(LZ4) -t |
190 |
- $(DATAGEN) | $(LZ4) --no-crc | $(LZ4) -t |
191 |
- $(DATAGEN) -g6M -P99 | $(LZ4) -9BD | $(LZ4) -t |
192 |
- $(DATAGEN) -g17M | $(LZ4) -9v | $(LZ4) -qt |
193 |
- $(DATAGEN) -g33M | $(LZ4) --no-frame-crc | $(LZ4) -t |
194 |
- $(DATAGEN) -g256MB | $(LZ4) -vqB4D | $(LZ4) -t --no-crc |
195 |
- @echo "hello world" > $(FPREFIX)-hw |
196 |
- $(LZ4) --rm -f $(FPREFIX)-hw $(FPREFIX)-hw.lz4 |
197 |
- test ! -f $(FPREFIX)-hw # must fail (--rm) |
198 |
- test -f $(FPREFIX)-hw.lz4 |
199 |
- $(PRGDIR)/lz4cat $(FPREFIX)-hw.lz4 | $(GREP) "hello world" |
200 |
- $(PRGDIR)/unlz4 --rm $(FPREFIX)-hw.lz4 $(FPREFIX)-hw |
201 |
- test -f $(FPREFIX)-hw |
202 |
- test ! -f $(FPREFIX)-hw.lz4 # must fail (--rm) |
203 |
- test ! -f $(FPREFIX)-hw.lz4.lz4 # must fail (unlz4) |
204 |
- $(PRGDIR)/lz4cat $(FPREFIX)-hw # pass-through mode |
205 |
- test -f $(FPREFIX)-hw |
206 |
- test ! -f $(FPREFIX)-hw.lz4 # must fail (lz4cat) |
207 |
- $(LZ4) $(FPREFIX)-hw $(FPREFIX)-hw.lz4 # creates $(FPREFIX)-hw.lz4 |
208 |
- $(PRGDIR)/lz4cat < $(FPREFIX)-hw.lz4 > $(FPREFIX)3 # checks lz4cat works with stdin (#285) |
209 |
- $(DIFF) -q $(FPREFIX)-hw $(FPREFIX)3 |
210 |
- $(PRGDIR)/lz4cat < $(FPREFIX)-hw > $(FPREFIX)2 # checks lz4cat works in pass-through mode |
211 |
- $(DIFF) -q $(FPREFIX)-hw $(FPREFIX)2 |
212 |
- cp $(FPREFIX)-hw ./-d |
213 |
- $(LZ4) --rm -- -d -d.lz4 # compresses ./d into ./-d.lz4 |
214 |
- test -f ./-d.lz4 |
215 |
- test ! -f ./-d |
216 |
- mv ./-d.lz4 ./-z |
217 |
- $(LZ4) -d --rm -- -z $(FPREFIX)4 # uncompresses ./-z into $(FPREFIX)4 |
218 |
- test ! -f ./-z |
219 |
- $(DIFF) -q $(FPREFIX)-hw $(FPREFIX)4 |
220 |
- ! $(LZ4) $(FPREFIX)2 $(FPREFIX)3 $(FPREFIX)4 # must fail: refuse to handle 3+ file names |
221 |
- $(LZ4) -f $(FPREFIX)-hw # create $(FPREFIX)-hw.lz4, for next tests |
222 |
- $(LZ4) --list $(FPREFIX)-hw.lz4 # test --list on valid single-frame file |
223 |
- $(LZ4) --list < $(FPREFIX)-hw.lz4 # test --list from stdin (file only) |
224 |
- $(CAT) $(FPREFIX)-hw >> $(FPREFIX)-hw.lz4 |
225 |
- ! $(LZ4) -f $(FPREFIX)-hw.lz4 # uncompress valid frame followed by invalid data (must fail now) |
226 |
- $(LZ4) -BX $(FPREFIX)-hw -c -q | $(LZ4) -tv # test block checksum |
227 |
- # $(DATAGEN) -g20KB generates the same file every single time |
228 |
- # cannot save output of $(DATAGEN) -g20KB as input file to lz4 because the following shell commands are run before $(DATAGEN) -g20KB |
229 |
- test "$(shell $(DATAGEN) -g20KB | $(LZ4) -c --fast | wc -c)" -lt "$(shell $(DATAGEN) -g20KB | $(LZ4) -c --fast=9 | wc -c)" # -1 vs -9 |
230 |
- test "$(shell $(DATAGEN) -g20KB | $(LZ4) -c -1 | wc -c)" -lt "$(shell $(DATAGEN) -g20KB| $(LZ4) -c --fast=1 | wc -c)" # 1 vs -1 |
231 |
- test "$(shell $(DATAGEN) -g20KB | $(LZ4) -c --fast=1 | wc -c)" -eq "$(shell $(DATAGEN) -g20KB| $(LZ4) -c --fast| wc -c)" # checks default fast compression is -1 |
232 |
- ! $(LZ4) -c --fast=0 $(FPREFIX)-dg20K # lz4 should fail when fast=0 |
233 |
- ! $(LZ4) -c --fast=-1 $(FPREFIX)-dg20K # lz4 should fail when fast=-1 |
234 |
- # High --fast values can result in out-of-bound dereferences #876 |
235 |
- $(DATAGEN) -g1M | $(LZ4) -c --fast=999999999 > /dev/null |
236 |
- # Test for #596 |
237 |
- @echo "TEST" > $(FPREFIX)-test |
238 |
- $(LZ4) -m $(FPREFIX)-test |
239 |
- $(LZ4) $(FPREFIX)-test.lz4 $(FPREFIX)-test2 |
240 |
- $(DIFF) -q $(FPREFIX)-test $(FPREFIX)-test2 |
241 |
- @$(RM) $(FPREFIX)* |
242 |
+ PATH=$(PATH) ./test-lz4-basic.sh |
243 |
|
244 |
- |
245 |
-test-lz4-dict: FPREFIX = tmp-dict |
246 |
test-lz4-dict: lz4 datagen |
247 |
@echo "\n ---- test lz4 compression/decompression with dictionary ----" |
248 |
- $(DATAGEN) -g16KB > $(FPREFIX) |
249 |
- $(DATAGEN) -g32KB > $(FPREFIX)-sample-32k |
250 |
- < $(FPREFIX)-sample-32k $(LZ4) -D $(FPREFIX) | $(LZ4) -dD $(FPREFIX) | diff - $(FPREFIX)-sample-32k |
251 |
- $(DATAGEN) -g128MB > $(FPREFIX)-sample-128m |
252 |
- < $(FPREFIX)-sample-128m $(LZ4) -D $(FPREFIX) | $(LZ4) -dD $(FPREFIX) | diff - $(FPREFIX)-sample-128m |
253 |
- touch $(FPREFIX)-sample-0 |
254 |
- < $(FPREFIX)-sample-0 $(LZ4) -D $(FPREFIX) | $(LZ4) -dD $(FPREFIX) | diff - $(FPREFIX)-sample-0 |
255 |
+ PATH=$(PATH) ./test-lz4-dict.sh |
256 |
|
257 |
- < $(FPREFIX)-sample-32k $(LZ4) -D $(FPREFIX)-sample-0 | $(LZ4) -dD $(FPREFIX)-sample-0 | diff - $(FPREFIX)-sample-32k |
258 |
- < $(FPREFIX)-sample-0 $(LZ4) -D $(FPREFIX)-sample-0 | $(LZ4) -dD $(FPREFIX)-sample-0 | diff - $(FPREFIX)-sample-0 |
259 |
- |
260 |
- @echo "\n ---- test lz4 dictionary loading ----" |
261 |
- $(DATAGEN) -g128KB > $(FPREFIX)-data-128KB |
262 |
- set -e; \ |
263 |
- for l in 0 1 4 128 32767 32768 32769 65535 65536 65537 98303 98304 98305 131071 131072 131073; do \ |
264 |
- $(DATAGEN) -g$$l > $(FPREFIX)-$$l; \ |
265 |
- $(DD) if=$(FPREFIX)-$$l of=$(FPREFIX)-$$l-tail bs=1 count=65536 skip=$$((l > 65536 ? l - 65536 : 0)); \ |
266 |
- < $(FPREFIX)-$$l $(LZ4) -D stdin $(FPREFIX)-data-128KB -c | $(LZ4) -dD $(FPREFIX)-$$l-tail | $(DIFF) - $(FPREFIX)-data-128KB; \ |
267 |
- < $(FPREFIX)-$$l-tail $(LZ4) -D stdin $(FPREFIX)-data-128KB -c | $(LZ4) -dD $(FPREFIX)-$$l | $(DIFF) - $(FPREFIX)-data-128KB; \ |
268 |
- done |
269 |
- @$(RM) $(FPREFIX)* |
270 |
- |
271 |
test-lz4hc-hugefile: lz4 datagen |
272 |
@echo "\n ---- test HC compression/decompression of huge files ----" |
273 |
- $(DATAGEN) -g4200MB | $(LZ4) -v3BD | $(LZ4) -qt |
274 |
+ PATH=$(PATH) ./test-lz4hc-hugefile.sh |
275 |
|
276 |
-test-lz4-fast-hugefile: FPREFIX = tmp-lfh |
277 |
test-lz4-fast-hugefile: lz4 datagen |
278 |
@echo "\n ---- test huge files compression/decompression ----" |
279 |
- $(DATAGEN) -g6GB | $(LZ4) -vB5D | $(LZ4) -qt |
280 |
- # test large file size [2-4] GB |
281 |
- @$(DATAGEN) -g3G -P100 | $(LZ4) -vv | $(LZ4) --decompress --force --sparse - $(FPREFIX)1 |
282 |
- @ls -ls $(FPREFIX)1 |
283 |
- @$(DATAGEN) -g3G -P100 | $(LZ4) --quiet --content-size | $(LZ4) --verbose --decompress --force --sparse - $(FPREFIX)2 |
284 |
- @ls -ls $(FPREFIX)2 |
285 |
- $(DIFF) -s $(FPREFIX)1 $(FPREFIX)2 |
286 |
- @$(RM) $(FPREFIX)* |
287 |
+ PATH=$(PATH) ./test-lz4-fast-hugefile.sh |
288 |
|
289 |
test-lz4-hugefile: test-lz4-fast-hugefile test-lz4hc-hugefile |
290 |
|
291 |
-test-lz4-testmode: FPREFIX = tmp-ltm |
292 |
test-lz4-testmode: lz4 datagen |
293 |
@echo "\n ---- bench mode ----" |
294 |
- $(LZ4) -bi0 |
295 |
- $(DATAGEN) > $(FPREFIX) |
296 |
- $(LZ4) -f $(FPREFIX) -c > $(FPREFIX).lz4 |
297 |
- $(LZ4) -bdi0 $(FPREFIX).lz4 # test benchmark decode-only mode |
298 |
- $(LZ4) -bdi0 --no-crc $(FPREFIX).lz4 # test benchmark decode-only mode |
299 |
- @echo "\n ---- test mode ----" |
300 |
- ! $(DATAGEN) | $(LZ4) -t |
301 |
- ! $(DATAGEN) | $(LZ4) -tf |
302 |
- @echo "\n ---- pass-through mode ----" |
303 |
- @echo "Why hello there " > $(FPREFIX)2.lz4 |
304 |
- ! $(LZ4) -f $(FPREFIX)2.lz4 > $(VOID) |
305 |
- ! $(DATAGEN) | $(LZ4) -dc > $(VOID) |
306 |
- ! $(DATAGEN) | $(LZ4) -df > $(VOID) |
307 |
- $(DATAGEN) | $(LZ4) -dcf > $(VOID) |
308 |
- @echo "Hello World !" > $(FPREFIX)1 |
309 |
- $(LZ4) -dcf $(FPREFIX)1 |
310 |
- @echo "from underground..." > $(FPREFIX)2 |
311 |
- $(LZ4) -dcfm $(FPREFIX)1 $(FPREFIX)2 |
312 |
- @echo "\n ---- non-existing source (must fail cleanly) ----" |
313 |
- ! $(LZ4) file-does-not-exist |
314 |
- ! $(LZ4) -f file-does-not-exist |
315 |
- ! $(LZ4) -t file-does-not-exist |
316 |
- ! $(LZ4) -fm file1-dne file2-dne |
317 |
- @$(RM) $(FPREFIX)* |
318 |
+ PATH=$(PATH) ./test-lz4-testmode.sh |
319 |
|
320 |
test-lz4-opt-parser: lz4 datagen |
321 |
@echo "\n ---- test opt-parser ----" |
322 |
- $(DATAGEN) -g16KB | $(LZ4) -12 | $(LZ4) -t |
323 |
- $(DATAGEN) -P10 | $(LZ4) -12B4 | $(LZ4) -t |
324 |
- $(DATAGEN) -g256K | $(LZ4) -12B4D | $(LZ4) -t |
325 |
- $(DATAGEN) -g512K -P25 | $(LZ4) -12BD | $(LZ4) -t |
326 |
- $(DATAGEN) -g1M | $(LZ4) -12B5 | $(LZ4) -t |
327 |
- $(DATAGEN) -g1M -s2 | $(LZ4) -12B4D | $(LZ4) -t |
328 |
- $(DATAGEN) -g2M -P99 | $(LZ4) -11B4D | $(LZ4) -t |
329 |
- $(DATAGEN) -g4M | $(LZ4) -11vq | $(LZ4) -qt |
330 |
- $(DATAGEN) -g8M | $(LZ4) -11B4 | $(LZ4) -t |
331 |
- $(DATAGEN) -g16M -P90 | $(LZ4) -11B5 | $(LZ4) -t |
332 |
- $(DATAGEN) -g32M -P10 | $(LZ4) -11B5D | $(LZ4) -t |
333 |
+ PATH=$(PATH) ./test-lz4-opt-parser.sh |
334 |
|
335 |
test-lz4-essentials : lz4 datagen test-lz4-basic test-lz4-multiple test-lz4-multiple-legacy \ |
336 |
test-lz4-frame-concatenation test-lz4-testmode \ |