# ##########################################################################
# LZ4 tests - Makefile
-# Copyright (C) Yann Collet 2011-2015
+# Copyright (C) Takayuki Matsuoka - Yann Collet 2011-2015
#
# GPL v2 License
#
# - LZ4 source repository : https://github.com/Cyan4973/lz4
# - LZ4 public forum : https://groups.google.com/forum/#!forum/lz4c
# ##########################################################################
-# versionstest : Compatibility test between all LZ4 versions
+# versionstest : Compatibility test between LZ4 versions stored on Github (r116+)
# ##########################################################################
PYTHON?= python3
shutil.copy2(base_dir + '/' + test_dat_src, tmp_dir + '/' + test_dat)
# Retrieve all release tags
+ print('Retrieve all release tags :')
os.chdir(clone_dir)
tags = [head] + get_git_tags()
+ print(tags);
# Build all release lz4c and lz4c32
for tag in tags:
shutil.copy2('lz4c32', dst_lz4c32)
# Compress test.dat by all released lz4c and lz4c32
+ print('Compress test.dat by all released lz4c and lz4c32')
os.chdir(tmp_dir)
for lz4 in glob.glob("*.lz4"):
os.remove(lz4)
proc(['./lz4c32.' + tag, '-1fz', test_dat, test_dat + '_1_32_' + tag + '.lz4'])
proc(['./lz4c32.' + tag, '-9fz', test_dat, test_dat + '_9_32_' + tag + '.lz4'])
+ print('Full list of compressed files')
+ lz4s = sorted(glob.glob('*.lz4'))
+ for lz4 in lz4s:
+ print(lz4 + ' : ' + repr(os.path.getsize(lz4)))
+
# Remove duplicated .lz4 files
lz4s = sorted(glob.glob('*.lz4'))
for i, lz4 in enumerate(lz4s):
if filecmp.cmp(lz4, lz4t):
os.remove(lz4t)
+ print('Enumerate only different compressed files')
+ lz4s = sorted(glob.glob('*.lz4'))
+ for lz4 in lz4s:
+ print(lz4 + ' : ' + repr(os.path.getsize(lz4)))
+
# Decompress remained .lz4 files by all released lz4c and lz4c32
+ print('Decompression tests and verifications')
lz4s = sorted(glob.glob('*.lz4'))
for lz4 in lz4s:
+ print(lz4, end=" ", flush=True)
for tag in tags:
+ print(tag, end=" ", flush=True)
proc(['./lz4c.' + tag, '-df', lz4, lz4 + '_d64_' + tag + '.dec'])
proc(['./lz4c32.' + tag, '-df', lz4, lz4 + '_d32_' + tag + '.dec'])
+ print(' OK')
# Compare all '.dec' files with test_dat
decs = glob.glob('*.dec')
else:
os.remove(dec)
- lz4s = sorted(glob.glob('*.lz4'))
- for lz4 in lz4s:
- print(lz4)
-
if error_code != 0:
print('ERROR')