diff options
Diffstat (limited to 'test/test-lz4-versions.py')
-rw-r--r-- | test/test-lz4-versions.py | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/test/test-lz4-versions.py b/test/test-lz4-versions.py index 6605051..9b7e0c5 100644 --- a/test/test-lz4-versions.py +++ b/test/test-lz4-versions.py @@ -52,8 +52,10 @@ if __name__ == '__main__': 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: @@ -74,6 +76,7 @@ if __name__ == '__main__': 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) @@ -83,6 +86,11 @@ if __name__ == '__main__': 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): @@ -95,12 +103,21 @@ if __name__ == '__main__': 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') @@ -111,10 +128,6 @@ if __name__ == '__main__': else: os.remove(dec) - lz4s = sorted(glob.glob('*.lz4')) - for lz4 in lz4s: - print(lz4) - if error_code != 0: print('ERROR') |