From ffff9ee1380c0095c9627beb18a12838712d8a0e Mon Sep 17 00:00:00 2001 From: Takayuki MATSUOKA Date: Sat, 16 May 2015 14:58:27 +0900 Subject: [PATCH] Support iterative edit and testing This commit will allows iterative edit and testing to local working copy. You could iterate edit and testing by the following commands: cd /path/to/lz4 cd test make versionstest my-favorite-text-editor ../lib/lz4.c make versionstest my-favorite-text-editor ./test-lz4-versions.py make versionstest ... --- test/test-lz4-versions.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/test/test-lz4-versions.py b/test/test-lz4-versions.py index 259b19a..f157ab7 100644 --- a/test/test-lz4-versions.py +++ b/test/test-lz4-versions.py @@ -68,16 +68,17 @@ if __name__ == '__main__': os.chdir(base_dir) dst_lz4c = '{}/lz4c.{}' .format(tmp_dir, tag) # /path/to/lz4/test/lz4test/lz4c. dst_lz4c32 = '{}/lz4c32.{}'.format(tmp_dir, tag) # /path/to/lz4/test/lz4test/lz4c32. - if not os.path.isfile(dst_lz4c) or not os.path.isfile(dst_lz4c32): + if not os.path.isfile(dst_lz4c) or not os.path.isfile(dst_lz4c32) or tag == head: if tag != head: r_dir = '{}/{}'.format(tmp_dir, tag) # /path/to/lz4/test/lz4test/ os.makedirs(r_dir, exist_ok=True) os.chdir(clone_dir) git(['--work-tree=' + r_dir, 'checkout', tag, '--', '.'], False) os.chdir(r_dir + '/programs') # /path/to/lz4/lz4test//programs + make(['clean', 'lz4c', 'lz4c32'], False) else: os.chdir(programs_dir) - make(['clean', 'lz4c', 'lz4c32'], False) + make(['lz4c', 'lz4c32'], False) shutil.copy2('lz4c', dst_lz4c) shutil.copy2('lz4c32', dst_lz4c32) @@ -120,6 +121,8 @@ if __name__ == '__main__': # Decompress remained .lz4 files by all released lz4c and lz4c32 print('Decompression tests and verifications') lz4s = sorted(glob.glob('*.lz4')) + for dec in glob.glob("*.dec"): + os.remove(dec) for lz4 in lz4s: print(lz4, end=" ") for tag in tags: -- 2.7.4