diff options
author | Yann Collet <yann.collet.73@gmail.com> | 2015-05-15 14:51:07 (GMT) |
---|---|---|
committer | Yann Collet <yann.collet.73@gmail.com> | 2015-05-15 14:51:07 (GMT) |
commit | cdb136d9606753e314c318c9dbb27b6699d04571 (patch) | |
tree | 37f282557375fa600cda261fe976e4fc27c9360c /test/test-lz4-versions.py | |
parent | c779c8004c890b61791fd8c96afa62dccd7ed507 (diff) | |
download | lz4-cdb136d9606753e314c318c9dbb27b6699d04571.zip lz4-cdb136d9606753e314c318c9dbb27b6699d04571.tar.gz lz4-cdb136d9606753e314c318c9dbb27b6699d04571.tar.bz2 |
cosmetic changes, 2nd try
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') |