diff options
author | josh.macdonald <jmacd@users.noreply.github.com> | 2009-10-24 01:13:46 +0000 |
---|---|---|
committer | josh.macdonald <jmacd@users.noreply.github.com> | 2009-10-24 01:13:46 +0000 |
commit | 8681251a19d6a845a725fba60eb0a4c9fa3c375c (patch) | |
tree | 4bf7e0ec84e4d4516958a3cd52c594f828f729cd /xdelta3 | |
parent | 80c9e15bc657b623c19cda6af2778dacd906be81 (diff) |
Move and re-invigorate the regtest, fix 1 harmless compiler warning
Diffstat (limited to 'xdelta3')
-rw-r--r-- | xdelta3/Makefile | 6 | ||||
-rw-r--r-- | xdelta3/setup.py | 2 | ||||
-rwxr-xr-x | xdelta3/testing/xdelta3-regtest.py (renamed from xdelta3/xdelta3-regtest.py) | 21 | ||||
-rw-r--r-- | xdelta3/xdelta3-main.h | 3 | ||||
-rw-r--r-- | xdelta3/xdelta3.c | 2 | ||||
-rw-r--r-- | xdelta3/xdelta3.h | 15 |
6 files changed, 26 insertions, 23 deletions
diff --git a/xdelta3/Makefile b/xdelta3/Makefile index 3a5c6b0..47fea85 100644 --- a/xdelta3/Makefile +++ b/xdelta3/Makefile | |||
@@ -8,7 +8,7 @@ PYVER = 2.5 | |||
8 | 8 | ||
9 | ifeq ("$(CYGWIN)", "") | 9 | ifeq ("$(CYGWIN)", "") |
10 | SWIGTGT = xdelta3module.so | 10 | SWIGTGT = xdelta3module.so |
11 | PYTGT = build/lib.linux-i686-$(PYVER)/xdelta3main.so | 11 | PYTGT = build/lib.macosx-10.5-i386-2.5/xdelta3main.so |
12 | else | 12 | else |
13 | SWIGTGT = xdelta3module.dll | 13 | SWIGTGT = xdelta3module.dll |
14 | PYTGT = build/lib.cygwin-1.5.24-i686-$(PYVER)/xdelta3main.dll | 14 | PYTGT = build/lib.cygwin-1.5.24-i686-$(PYVER)/xdelta3main.dll |
@@ -57,13 +57,13 @@ CFLAGS= -Wall -Wshadow -fno-builtin | |||
57 | WFLAGS= -Wextra -Wsign-compare -Wconversion -Wextra -Wno-unused-parameter | 57 | WFLAGS= -Wextra -Wsign-compare -Wconversion -Wextra -Wno-unused-parameter |
58 | 58 | ||
59 | # $Format: "REL=$Xdelta3Version$" $ | 59 | # $Format: "REL=$Xdelta3Version$" $ |
60 | REL=3.0v | 60 | REL=3.0wRC11 |
61 | 61 | ||
62 | RELDIR = xdelta$(REL) | 62 | RELDIR = xdelta$(REL) |
63 | 63 | ||
64 | EXTRA = Makefile COPYING linkxd3lib.c badcopy.c xdelta3.swig \ | 64 | EXTRA = Makefile COPYING linkxd3lib.c badcopy.c xdelta3.swig \ |
65 | draft-korn-vcdiff.txt xdelta3.vcproj badcopy.vcproj \ | 65 | draft-korn-vcdiff.txt xdelta3.vcproj badcopy.vcproj \ |
66 | xdelta3-regtest.py xdelta3-test.py setup.py \ | 66 | testing/xdelta3-regtest.py xdelta3-test.py setup.py \ |
67 | examples/Makefile examples/small_page_test.c \ | 67 | examples/Makefile examples/small_page_test.c \ |
68 | examples/README examples/encode_decode_test.c \ | 68 | examples/README examples/encode_decode_test.c \ |
69 | examples/compare_test.c examples/speed_test.c \ | 69 | examples/compare_test.c examples/speed_test.c \ |
diff --git a/xdelta3/setup.py b/xdelta3/setup.py index 7fa4b0c..32b20cf 100644 --- a/xdelta3/setup.py +++ b/xdelta3/setup.py | |||
@@ -50,7 +50,7 @@ xdelta3_ext = Extension('xdelta3main', | |||
50 | ]) | 50 | ]) |
51 | 51 | ||
52 | # $Format: "REL='$Xdelta3Version$'" $ | 52 | # $Format: "REL='$Xdelta3Version$'" $ |
53 | REL='3.0v' | 53 | REL='3.0wRC1' |
54 | 54 | ||
55 | # This provides xdelta3.main(), which calls the xdelta3 command-line main() | 55 | # This provides xdelta3.main(), which calls the xdelta3 command-line main() |
56 | # from python. | 56 | # from python. |
diff --git a/xdelta3/xdelta3-regtest.py b/xdelta3/testing/xdelta3-regtest.py index f9a11bd..3c5bfd6 100755 --- a/xdelta3/xdelta3-regtest.py +++ b/xdelta3/testing/xdelta3-regtest.py | |||
@@ -20,6 +20,7 @@ | |||
20 | 20 | ||
21 | import os, sys, math, re, time, types, array, random | 21 | import os, sys, math, re, time, types, array, random |
22 | import xdelta3 | 22 | import xdelta3 |
23 | import xdelta3main | ||
23 | 24 | ||
24 | #RCSDIR = '/mnt/polaroid/Polaroid/orbit_linux/home/jmacd/PRCS' | 25 | #RCSDIR = '/mnt/polaroid/Polaroid/orbit_linux/home/jmacd/PRCS' |
25 | #RCSDIR = '/tmp/PRCS_read_copy' | 26 | #RCSDIR = '/tmp/PRCS_read_copy' |
@@ -29,6 +30,7 @@ import xdelta3 | |||
29 | #SAMPLEDIR = "C:/sample_data/Wesnoth/tar" | 30 | #SAMPLEDIR = "C:/sample_data/Wesnoth/tar" |
30 | 31 | ||
31 | #RCSDIR = '/Users/jmacd/src/ftp.kernel.org/pub/scm/linux/kernel/bkcvs/linux-2.4/net/x25' | 32 | #RCSDIR = '/Users/jmacd/src/ftp.kernel.org/pub/scm/linux/kernel/bkcvs/linux-2.4/net/x25' |
33 | RCSDIR = '/Users/jmacd/src/ftp.kernel.org/pub/scm/linux/kernel/bkcvs/linux-2.4/fs' | ||
32 | RCSDIR = '/Users/jmacd/src/ftp.kernel.org' | 34 | RCSDIR = '/Users/jmacd/src/ftp.kernel.org' |
33 | 35 | ||
34 | # | 36 | # |
@@ -900,7 +902,7 @@ class RandomTest: | |||
900 | #end | 902 | #end |
901 | 903 | ||
902 | def __str__(self): | 904 | def __str__(self): |
903 | decodestr = ' %.6f' % self.decodetime | 905 | decodestr = ' %s' % self.decodetime |
904 | return 'time %.6f%s size %d%s << %s >>%s' % ( | 906 | return 'time %.6f%s size %d%s << %s >>%s' % ( |
905 | self.time(), ((self.time_pos != None) and (" (%s)" % self.time_pos) or ""), | 907 | self.time(), ((self.time_pos != None) and (" (%s)" % self.time_pos) or ""), |
906 | self.size(), ((self.size_pos != None) and (" (%s)" % self.size_pos) or ""), | 908 | self.size(), ((self.size_pos != None) and (" (%s)" % self.size_pos) or ""), |
@@ -998,8 +1000,8 @@ def RunTestLoop(rand, generator, rounds): | |||
998 | #end | 1000 | #end |
999 | #end | 1001 | #end |
1000 | 1002 | ||
1001 | GraphResults('expt%d' % rnum, results) | 1003 | #GraphResults('expt%d' % rnum, results) |
1002 | GraphSummary('sum%d' % rnum, results) | 1004 | #GraphSummary('sum%d' % rnum, results) |
1003 | 1005 | ||
1004 | # re-test some fraction | 1006 | # re-test some fraction |
1005 | configs = [r.config() for r in results[0:int(MAX_RESULTS * KEEP_P)]] | 1007 | configs = [r.config() for r in results[0:int(MAX_RESULTS * KEEP_P)]] |
@@ -1186,7 +1188,7 @@ def GraphSummary(desc, results_ignore): | |||
1186 | syn = ScoreTests(syn) | 1188 | syn = ScoreTests(syn) |
1187 | #print 'smap is %s' % (smap,) | 1189 | #print 'smap is %s' % (smap,) |
1188 | #print 'syn is %s' % (' and '.join([str(x) for x in syn])) | 1190 | #print 'syn is %s' % (' and '.join([str(x) for x in syn])) |
1189 | GraphResults(summary, syn) | 1191 | #GraphResults(summary, syn) |
1190 | #end | 1192 | #end |
1191 | #end | 1193 | #end |
1192 | 1194 | ||
@@ -1196,19 +1198,20 @@ if __name__ == "__main__": | |||
1196 | os.mkdir(TMPDIR) | 1198 | os.mkdir(TMPDIR) |
1197 | 1199 | ||
1198 | rcsf = GetTestRcsFiles() | 1200 | rcsf = GetTestRcsFiles() |
1199 | #generator = rcsf.Generator() | 1201 | generator = rcsf.Generator() |
1200 | 1202 | ||
1201 | #sample = SampleDataTest([SAMPLEDIR]) | 1203 | #sample = SampleDataTest([SAMPLEDIR]) |
1202 | #generator = sample.Generator() | 1204 | #generator = sample.Generator() |
1203 | 1205 | ||
1204 | #rand = random.Random(135135135135135) | 1206 | rand = random.Random(135135135135135) |
1205 | #RunTestLoop(rand, generator, TEST_ROUNDS) | 1207 | RunTestLoop(rand, generator, TEST_ROUNDS) |
1206 | 1208 | ||
1207 | #RunSpeedTest() | 1209 | #RunSpeedTest() |
1208 | 1210 | ||
1211 | #x3r = rcsf.AllPairsByDate(Xdelta3RunClass(['-1', '-3', '-6'])) | ||
1209 | #x3r = rcsf.AllPairsByDate(Xdelta3RunClass(['-9'])) | 1212 | #x3r = rcsf.AllPairsByDate(Xdelta3RunClass(['-9'])) |
1210 | x3r = rcsf.AllPairsByDate(Xdelta3RunClass(['-9', '-S', 'djw'])) | 1213 | #x3r = rcsf.AllPairsByDate(Xdelta3RunClass(['-9', '-S', 'djw'])) |
1211 | x3r = rcsf.AllPairsByDate(Xdelta3RunClass(['-1', '-S', 'djw'])) | 1214 | #x3r = rcsf.AllPairsByDate(Xdelta3RunClass(['-1', '-S', 'djw'])) |
1212 | #x3r = rcsf.AllPairsByDate(Xdelta3RunClass(['-9', '-T'])) | 1215 | #x3r = rcsf.AllPairsByDate(Xdelta3RunClass(['-9', '-T'])) |
1213 | 1216 | ||
1214 | #x1r = rcsf.AllPairsByDate(Xdelta1RunClass()) | 1217 | #x1r = rcsf.AllPairsByDate(Xdelta1RunClass()) |
diff --git a/xdelta3/xdelta3-main.h b/xdelta3/xdelta3-main.h index 60d645d..ea9353d 100644 --- a/xdelta3/xdelta3-main.h +++ b/xdelta3/xdelta3-main.h | |||
@@ -1,5 +1,6 @@ | |||
1 | /* xdelta 3 - delta compression tools and library | 1 | /* xdelta 3 - delta compression tools and library |
2 | * Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, | 2 | * Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, |
3 | * 2008, 2009 | ||
3 | * Joshua P. MacDonald | 4 | * Joshua P. MacDonald |
4 | * | 5 | * |
5 | * This program is free software; you can redistribute it and/or modify | 6 | * This program is free software; you can redistribute it and/or modify |
@@ -374,7 +375,7 @@ static int | |||
374 | main_version (void) | 375 | main_version (void) |
375 | { | 376 | { |
376 | /* $Format: " DP(RINT \"Xdelta version $Xdelta3Version$, Copyright (C) 2007, 2008, Joshua MacDonald\n\");" $ */ | 377 | /* $Format: " DP(RINT \"Xdelta version $Xdelta3Version$, Copyright (C) 2007, 2008, Joshua MacDonald\n\");" $ */ |
377 | DP(RINT "Xdelta version 3.0u, Copyright (C) 2007, 2008, Joshua MacDonald\n"); | 378 | DP(RINT "Xdelta version 3.0wRC1, Copyright (C) 2007, 2008, Joshua MacDonald\n"); |
378 | DP(RINT "Xdelta comes with ABSOLUTELY NO WARRANTY.\n"); | 379 | DP(RINT "Xdelta comes with ABSOLUTELY NO WARRANTY.\n"); |
379 | DP(RINT "This is free software, and you are welcome to redistribute it\n"); | 380 | DP(RINT "This is free software, and you are welcome to redistribute it\n"); |
380 | DP(RINT "under certain conditions; see \"COPYING\" for details.\n"); | 381 | DP(RINT "under certain conditions; see \"COPYING\" for details.\n"); |
diff --git a/xdelta3/xdelta3.c b/xdelta3/xdelta3.c index 3dbb923..d0cf2b1 100644 --- a/xdelta3/xdelta3.c +++ b/xdelta3/xdelta3.c | |||
@@ -5085,7 +5085,7 @@ XD3_TEMPLATE(xd3_string_match_) (xd3_stream *stream) | |||
5085 | 5085 | ||
5086 | const uint8_t *inp; | 5086 | const uint8_t *inp; |
5087 | uint32_t scksum = 0; | 5087 | uint32_t scksum = 0; |
5088 | uint32_t scksum_state; | 5088 | uint32_t scksum_state = 0; |
5089 | uint32_t lcksum = 0; | 5089 | uint32_t lcksum = 0; |
5090 | usize_t sinx; | 5090 | usize_t sinx; |
5091 | usize_t linx; | 5091 | usize_t linx; |
diff --git a/xdelta3/xdelta3.h b/xdelta3/xdelta3.h index c6226c1..9ee90d6 100644 --- a/xdelta3/xdelta3.h +++ b/xdelta3/xdelta3.h | |||
@@ -1024,14 +1024,13 @@ int xd3_decode_memory (const uint8_t *input, | |||
1024 | usize_t avail_output, | 1024 | usize_t avail_output, |
1025 | int flags); | 1025 | int flags); |
1026 | 1026 | ||
1027 | /* This function encodes an in-memory input. Everything else about | 1027 | /* This function encodes an in-memory input. The output array must be |
1028 | * the xd3_stream is configurable. The output array must be large | 1028 | * large enough to hold the output or else ENOSPC is returned. The |
1029 | * enough to hold the output or else ENOSPC is returned. The source | 1029 | * source (if any) should be set using xd3_set_source() with a |
1030 | * (if any) should be set using xd3_set_source() with a single-block | 1030 | * single-block xd3_source. This calls the underlying non-blocking |
1031 | * xd3_source. This calls the underlying non-blocking interface, | 1031 | * interface, xd3_encode_input(), handling the necessary input/output |
1032 | * xd3_encode_input(), handling the necessary input/output states. | 1032 | * states. This method be considered a reference for any application |
1033 | * This method be considered a reference for any application using | 1033 | * using xd3_encode_input() directly. |
1034 | * xd3_encode_input() directly. | ||
1035 | * | 1034 | * |
1036 | * xd3_stream stream; | 1035 | * xd3_stream stream; |
1037 | * xd3_config config; | 1036 | * xd3_config config; |