summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTakayuki MATSUOKA <takayuki.matsuoka@gmail.com>2015-05-16 05:58:27 (GMT)
committerTakayuki MATSUOKA <takayuki.matsuoka@gmail.com>2015-05-20 10:59:35 (GMT)
commitffff9ee1380c0095c9627beb18a12838712d8a0e (patch)
tree63513817c89b935ada904fb0035b58f11feae9ab
parenta8fdeb46762d7dd31af49c956af3ac4e48718128 (diff)
downloadlz4-ffff9ee1380c0095c9627beb18a12838712d8a0e.zip
lz4-ffff9ee1380c0095c9627beb18a12838712d8a0e.tar.gz
lz4-ffff9ee1380c0095c9627beb18a12838712d8a0e.tar.bz2
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 ...
-rw-r--r--test/test-lz4-versions.py7
1 files 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.<TAG>
dst_lz4c32 = '{}/lz4c32.{}'.format(tmp_dir, tag) # /path/to/lz4/test/lz4test/lz4c32.<TAG>
- 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/<TAG>
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/<TAG>/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: