2 # xdelta 3 - delta compression tools and library
3 # Copyright (C) 2003, 2006, 2007, 2008. Joshua P. MacDonald
5 # This program is free software; you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License as published by
7 # the Free Software Foundation; either version 2 of the License, or
8 # (at your option) any later version.
10 # This program is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 # GNU General Public License for more details.
15 # You should have received a copy of the GNU General Public License
16 # along with this program; if not, write to the Free Software
17 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 # TODO: test 1.5 vs. greedy
21 import os, sys, math, re, time, types, array, random
24 #RCSDIR = '/mnt/polaroid/Polaroid/orbit_linux/home/jmacd/PRCS'
25 #RCSDIR = '/tmp/PRCS_read_copy'
26 #SAMPLEDIR = "/tmp/WESNOTH_tmp/diff"
28 #RCSDIR = 'G:/jmacd/PRCS_copy'
29 #SAMPLEDIR = "C:/sample_data/Wesnoth/tar"
31 RCSDIR = '/Users/jmacd/src/ftp.kernel.org'
32 SAMPLEDIR = '/Users/jmacd/src/xdelta3/linux'
37 TIME_TOO_SHORT = 0.050
43 # 10 = fast 1.5 = slow
46 # How many results per round
51 # For RCS testing, what percent to select
55 MIN_RUN = 1000 * 1000 * 1
56 MAX_RUN = 1000 * 1000 * 10
63 # The first 7 args go to -C
66 CONFIG_ORDER = [ 'large_look',
100 'large_look' : lambda d: rand.choice([9, 10, 11, 12]),
101 'large_step' : lambda d: rand.choice([25, 26, 27, 28, 29, 30]),
102 'small_look' : lambda d: rand.choice([4]),
103 'small_chain' : lambda d: rand.choice([1]),
104 'small_lchain' : lambda d: rand.choice([1]),
105 'max_lazy' : lambda d: rand.choice([4, 5, 6, 7, 8, 9, 10 ]),
107 # Note: long_enough only refers to small matching and has no effect if
109 'long_enough' : lambda d: rand.choice([4]),
112 'nocompress' : lambda d: rand.choice(['false']),
115 'altcode' : lambda d: rand.choice(['false']),
118 'djw' : lambda d: rand.choice(['false']),
123 'winsize' : lambda d: 8 * (1<<20),
126 'srcwinsize' : lambda d: 64 * (1<<20),
129 'iopt' : lambda d: 0,
131 # -P only powers of two
132 'sprevsz' : lambda d: rand.choice([x * (1<<16) for x in [4]]),
137 TMPDIR = '/tmp/xd3regtest.%d' % os.getpid()
139 RUNFILE = os.path.join(TMPDIR, 'run')
140 DFILE = os.path.join(TMPDIR, 'output')
141 RFILE = os.path.join(TMPDIR, 'recon')
142 CMPTMP1 = os.path.join(TMPDIR, 'cmptmp1')
143 CMPTMP2 = os.path.join(TMPDIR, 'cmptmp2')
151 IGNORE_FILENAME = re.compile('.*\\.(gif|jpg).*')
154 RE_TOTREV = re.compile('total revisions: (\\d+)')
155 RE_BAR = re.compile('----------------------------')
156 RE_REV = re.compile('revision (.+)')
157 RE_DATE = re.compile('date: ([^;]+);.*')
159 RE_HDRSZ = re.compile('VCDIFF header size: +(\\d+)')
160 RE_EXTCOMP = re.compile('XDELTA ext comp.*')
163 return ' '.join(['%s' % x for x in c])
167 return reduce(lambda x,y: x+y, l)
170 # returns (total, mean, stddev, q2 (median),
171 # (q3-q1)/2 ("semi-interquartile range"), max-min (spread))
173 def __init__(self,l,desc):
179 self.total = SumList(l)
180 self.mean = self.total / float(self.cnt)
181 self.s = math.sqrt(SumList([(x-self.mean) *
182 (x - self.mean) for x in l]) /
185 self.q1 = l[int(self.cnt/4.0+0.5)]
186 self.q2 = l[int(self.cnt/2.0+0.5)]
187 self.q3 = l[min(self.cnt-1,int((3.0*self.cnt)/4.0+0.5))]
188 self.q4 = l[self.cnt-1]
189 self.siqr = (self.q3-self.q1)/2.0;
190 self.spread = (self.q4-self.q0)
192 self.str = '%s %s' % (desc, l[0])
194 self.str = '%s mean %.1f: 25%-ile %d %d %d %d %d' % \
195 (desc, self.mean, self.q0, self.q1, self.q2, self.q3, self.q4)
199 def RunCommand(args, ok = [0]):
200 #print 'run command %s' % (' '.join(args))
201 p = os.spawnvp(os.P_WAIT, args[0], args)
203 raise CommandError(args, 'exited %d' % p)
207 def RunCommandIO(args,infn,outfn):
210 os.dup2(os.open(infn,os.O_RDONLY),0)
211 os.dup2(os.open(outfn,os.O_CREAT|os.O_TRUNC|os.O_WRONLY),1)
212 os.execvp(args[0], args)
215 o = os.WEXITSTATUS(s[1])
216 if not os.WIFEXITED(s[1]) or o != 0:
217 raise CommandError(args, 'exited %d' % o)
223 def __init__(self, target, source, runnable,
224 skip_trials = SKIP_TRIALS,
225 min_trials = MIN_TRIALS,
226 max_trials = MAX_TRIALS,
227 min_stddev_pct = MIN_STDDEV_PCT):
230 self.runnable = runnable
232 self.skip_trials = skip_trials
233 self.min_trials = min(min_trials, max_trials)
234 self.max_trials = max_trials
235 self.min_stddev_pct = min_stddev_pct
237 self.encode_time = self.DoTest(DFILE,
238 lambda x: x.Encode(self.target,
240 self.encode_size = runnable.EncodeSize(DFILE)
242 self.decode_time = self.DoTest(RFILE,
243 lambda x: x.Decode(DFILE,
246 runnable.Verify(self.target, RFILE)
249 def DoTest(self, fname, func):
259 start_time = time.time()
260 start_clock = time.clock()
264 total_clock = (time.clock() - start_clock)
265 total_time = (time.time() - start_time)
267 elap_time = max(total_time, 0.0000001)
268 elap_clock = max(total_clock, 0.0000001)
272 # skip some of the first trials
273 if trials > self.skip_trials:
274 measured.append((elap_clock, elap_time))
275 #print 'measurement total: %.1f ms' % (total_time * 1000.0)
278 if trials < (self.skip_trials + self.min_trials):
279 #print 'continue: need more trials: %d' % trials
284 if self.skip_trials + self.min_trials <= 2:
285 measured = measured + measured;
289 time_stat = StatList([x[1] for x in measured], 'elap time')
290 sp = float(time_stat.s) / float(time_stat.mean)
292 # what if MAX_TRIALS is exceeded?
293 too_many = (trials - self.skip_trials) >= self.max_trials
294 good = (100.0 * sp) < self.min_stddev_pct
295 if done or too_many or good:
296 trials = trials - self.skip_trials
297 if not done and not good:
298 #print 'too many trials: %d' % trials
300 #clock = StatList([x[0] for x in measured], 'elap clock')
307 def Decimals(start, end):
311 r = range(step, step * 10, step)
320 # This tests the raw speed of 0-byte inputs
322 for L in Decimals(MIN_RUN, MAX_RUN):
323 SetFileSize(RUNFILE, L)
325 trx = TimedTest(RUNFILE, None, Xdelta3Runner(['-W', str(1<<20)]))
326 ReportSpeed(L, trx, '1MB ')
328 trx = TimedTest(RUNFILE, None, Xdelta3Runner(['-W', str(1<<19)]))
329 ReportSpeed(L, trx, '512k')
331 trx = TimedTest(RUNFILE, None, Xdelta3Runner(['-W', str(1<<18)]))
332 ReportSpeed(L, trx, '256k')
334 trm = TimedTest(RUNFILE, None, Xdelta3Mod1(RUNFILE))
335 ReportSpeed(L, trm, 'swig')
337 trg = TimedTest(RUNFILE, None, GzipRun1())
338 ReportSpeed(L,trg,'gzip')
342 def SetFileSize(F,L):
343 fd = os.open(F, os.O_CREAT | os.O_WRONLY)
345 assert os.fstat(fd).st_size == L
349 def ReportSpeed(L,tr,desc):
350 print '%s run length %u: size %u: time %.3f ms: decode %.3f ms' % \
353 tr.encode_time.mean * 1000.0,
354 tr.decode_time.mean * 1000.0)
357 class Xdelta3RunClass:
358 def __init__(self, extra):
363 return ' '.join(self.extra)
367 return Xdelta3Runner(self.extra)
372 # Use "forkexec" to get special command-line only features like
373 # external compression support.
374 def __init__(self, extra, forkexec=False):
375 self.forkexec = forkexec
379 def Encode(self, target, source, output):
387 args = args + [target, output]
391 def Decode(self, input, source, output):
398 args = args + [input, output]
402 def Verify(self, target, recon):
403 if target[-3:] == ".gz":
404 RunCommandIO(('gzip', '-dc'), target, CMPTMP1)
405 RunCommandIO(('gzip', '-dc'), recon, CMPTMP2)
406 RunCommand(('cmp', CMPTMP1, CMPTMP2))
408 RunCommand(('cmp', target, recon))
411 def EncodeSize(self, output):
412 return os.stat(output).st_size
415 def Main(self, args):
418 RunCommand(['../xdelta3'] + args)
420 xdelta3.xd3_main_cmdline(args)
422 raise CommandError(args, "xdelta3.main exception: %s" % e)
428 def __init__(self, file):
429 self.target_data = open(file, 'r').read()
432 def Encode(self, ignore1, ignore2, ignore3):
433 r1, encoded = xdelta3.xd3_encode_memory(self.target_data, None, 1000000, 1<<10)
435 raise CommandError('memory', 'encode failed: %s' % r1)
437 self.encoded = encoded
440 def Decode(self, ignore1, ignore2, ignore3):
441 r2, data1 = xdelta3.xd3_decode_memory(self.encoded, None, len(self.target_data))
443 raise CommandError('memory', 'decode failed: %s' % r1)
448 def Verify(self, ignore1, ignore2):
449 if self.target_data != self.decoded:
450 raise CommandError('memory', 'bad decode')
454 def EncodeSize(self, ignore1):
455 return len(self.encoded)
460 def Encode(self, target, source, output):
461 assert source == None
462 RunCommandIO(['gzip', '-cf'], target, output)
465 def Decode(self, input, source, output):
466 assert source == None
467 RunCommandIO(['gzip', '-dcf'], input, output)
470 def Verify(self, target, recon):
471 RunCommand(('cmp', target, recon))
474 def EncodeSize(self, output):
475 return os.stat(output).st_size
479 class Xdelta1RunClass:
485 return Xdelta1Runner()
490 def Encode(self, target, source, output):
491 assert source != None
492 args = ['xdelta1', 'delta', '-q', source, target, output]
493 RunCommand(args, [0, 1])
496 def Decode(self, input, source, output):
497 assert source != None
498 args = ['xdelta1', 'patch', '-q', input, source, output]
499 # Note: for dumb historical reasons, xdelta1 returns 1 or 0
503 def Verify(self, target, recon):
504 RunCommand(('cmp', target, recon))
507 def EncodeSize(self, output):
508 return os.stat(output).st_size
513 class SkipRcsException:
514 def __init__(self,reason):
519 class NotEnoughVersions:
526 def __init__(self,cmd,str):
527 if type(cmd) is types.TupleType or \
528 type(cmd) is types.ListType:
529 cmd = reduce(lambda x,y: '%s %s' % (x,y),cmd)
531 print 'command was: ',cmd
532 print 'command failed: ',str
533 print 'have fun debugging'
538 def __init__(self,vstr):
541 def __cmp__(self,other):
542 return cmp(self.date, other.date)
545 return str(self.vstr)
551 def __init__(self, fname):
554 self.state = HEAD_STATE
557 def SetTotRev(self,s):
562 self.rev = RcsVersion(s)
563 if len(self.versions) >= self.totrev:
564 raise SkipRcsException('too many versions (in log messages)')
566 self.versions.append(self.rev)
573 def Match(self, line, state, rx, gp, newstate, f):
574 if state == self.state:
580 self.state = newstate
588 f = os.popen('rlog '+self.fname, "r")
591 if self.Match(l, HEAD_STATE, RE_TOTREV, 1, BAR_STATE, self.SetTotRev):
593 elif self.Match(l, BAR_STATE, RE_BAR, 1, REV_STATE, None):
595 elif self.Match(l, REV_STATE, RE_REV, 1, DATE_STATE, self.Rev):
597 elif self.Match(l, DATE_STATE, RE_DATE, 1, BAR_STATE, self.Date):
609 st = os.stat(self.fname)
610 self.rcssize = st.st_size
612 if self.totrev != len(self.versions):
613 raise SkipRcsException('wrong version count')
618 def Checkout(self,n):
620 out = open(self.Verf(n), "w")
621 cmd = 'co -ko -p%s %s' % (v.vstr, self.fname)
625 err) = os.popen3(cmd, "r")
629 total = total + len(buf)
641 raise CommandError(cmd, 'checkout failed: %s\n%s\n%s' % (v.vstr, self.fname, estr))
648 return self.versions[n].date
652 return self.versions[n].vstr
656 return os.path.join(TMPDIR, 'input.%d' % n)
659 def FilePairsByDate(self, runclass):
661 raise NotEnoughVersions()
668 for v in range(0,self.totrev-1):
670 os.remove(self.Verf(v-1))
673 if os.stat(self.Verf(v)).st_size < MIN_SIZE or \
674 os.stat(self.Verf(v+1)).st_size < MIN_SIZE:
678 result = TimedTest(self.Verf(v+1),
682 target_size = os.stat(self.Verf(v+1)).st_size
684 ntrials.append(result)
687 os.remove(self.Verf(self.totrev-1))
688 os.remove(self.Verf(self.totrev-2))
692 def AppendVersion(self, f, n):
694 rf = open(self.Verf(n), "r")
711 dents = os.listdir(dir)
716 full = os.path.join(dir, dent)
717 if os.path.isdir(full):
719 elif dent[len(dent)-2:] == ",v":
720 rcsfiles.append(RcsFile(full))
725 self.subdirs = self.subdirs + subdirs
726 self.rcsfiles = self.rcsfiles + rcsfiles
727 self.others = self.others + others
731 def Crawl(self, dir):
734 s1 = self.Scan1(subdirs[0])
735 subdirs = subdirs[1:] + s1
741 for rf in self.rcsfiles:
745 raise SkipRcsException('too few versions (< 2)')
747 except SkipRcsException, e:
748 #print 'skipping file %s: %s' % (rf.fname, e.reason)
749 self.skipped.append(rf)
756 def AllPairsByDate(self, runclass):
759 for rf in self.rcsfiles:
761 results = results + rf.FilePairsByDate(runclass)
762 except SkipRcsException:
763 print 'file %s has compressed versions: skipping' % (rf.fname)
764 except NotEnoughVersions:
765 print 'testing %s on %s: not enough versions' % (runclass, rf.fname)
770 self.ReportPairs(runclass, results)
774 def ReportPairs(self, name, results):
779 encode_time += r.encode_time.mean
780 decode_time += r.decode_time.mean
781 encode_size += r.encode_size
783 print '%s rcs: encode %.2f s: decode %.2f s: size %d' % \
784 (name, encode_time, decode_time, encode_size)
787 def MakeBigFiles(self, rand):
788 f1 = open(TMPDIR + "/big.1", "w")
789 f2 = open(TMPDIR + "/big.2", "w")
791 for file in self.rcsfiles:
792 if len(file.versions) < 2:
794 population.append(file)
798 fcount = int(len(population) * FILE_P)
800 for file in rand.sample(population, fcount):
801 m = IGNORE_FILENAME.match(file.fname)
805 r1, r2 = rand.sample(xrange(0, len(file.versions)), 2)
806 f1sz += file.AppendVersion(f1, r1)
807 f2sz += file.AppendVersion(f2, r2)
808 #m.update('%s,%s,%s ' % (file.fname[len(RCSDIR):],
809 #file.Vstr(r1), file.Vstr(r2)))
811 testkey = 'rcs%d' % self.biground
812 self.biground = self.biground + 1
814 print '%s; source %u bytes; target %u bytes' % (testkey, f1sz, f2sz)
817 return (TMPDIR + "/big.1",
823 return lambda rand: self.MakeBigFiles(rand)
827 # find a set of RCS files for testing
828 def GetTestRcsFiles():
831 if len(rcsf.rcsfiles) == 0:
832 raise CommandError('', 'no RCS files')
835 print "rcsfiles: rcsfiles %d; subdirs %d; others %d; skipped %d" % (
840 print StatList([x.rcssize for x in rcsf.rcsfiles], "rcssize").str
841 print StatList([x.totrev for x in rcsf.rcsfiles], "totrev").str
845 class SampleDataTest:
846 def __init__(self, dirs):
855 p = os.path.join(d, e)
864 for x in xrange(len(files)):
865 for y in xrange(len(files)):
866 self.pairs.append((files[x], files[y],
867 '%s-%s' % (files[x], files[y])))
872 print "Sample data test using %d file pairs in %s" % (
873 len(self.pairs), dirs_in)
877 return lambda rand: rand.choice(self.pairs)
881 # configs are represented as a list of values,
882 # program takes a list of strings:
883 def ConfigToArgs(config):
885 ','.join([str(x) for x in config[0:SOFT_CONFIG_CNT]])]
886 for i in range(SOFT_CONFIG_CNT, len(CONFIG_ORDER)):
887 key = CONFIG_ARGMAP[CONFIG_ORDER[i]]
889 if val == 'true' or val == 'false':
891 args.append('%s' % key)
894 args.append('%s=%s' % (key, val))
902 def __init__(self, tnum, tinput, config, syntuple = None):
903 self.mytinput = tinput[2]
904 self.myconfig = config
908 self.runtime = syntuple[0]
909 self.compsize = syntuple[1]
910 self.decodetime = None
912 args = ConfigToArgs(config)
913 result = TimedTest(tinput[1], tinput[0], Xdelta3Runner(args))
915 self.runtime = result.encode_time.mean
916 self.compsize = result.encode_size
917 self.decodetime = result.decode_time.mean
923 self.score_pos = None
927 decodestr = ' %s' % self.decodetime
928 return 'time %.6f%s size %d%s << %s >>%s' % (
929 self.time(), ((self.time_pos != None) and
930 (" (%s)" % self.time_pos) or ""),
931 self.size(), ((self.size_pos != None) and
932 (" (%s)" % self.size_pos) or ""),
933 c2str(self.config()),
958 def PosInAlist(l, e):
959 for i in range(0, len(l)):
967 # Generates a set of num_results test configurations, given the list of
969 def RandomTestConfigs(rand, input_configs, num_results):
971 outputs = input_configs[:]
972 have_set = dict([(c,c) for c in input_configs])
974 # Compute a random configuration
978 for key in CONFIG_ORDER:
979 val = cmap[key] = (INPUT_SPEC(rand)[key])(cmap)
985 while len(outputs) < num_results:
987 for i in xrange(100):
989 if have_set.has_key(c):
996 print 'stopped looking for configs at %d' % len(outputs)
1005 def RunOptimizationLoop(rand, generator, rounds):
1007 for rnum in xrange(rounds):
1008 configs = RandomTestConfigs(rand, configs, MAX_RESULTS)
1009 tinput = generator(rand)
1011 for x in xrange(len(configs)):
1012 t = RandomTest(x, tinput, configs[x])
1013 print 'Round %d test %d: %s' % (rnum, x, t)
1016 results = ScoreTests(tests)
1020 if not test_all_config_results.has_key(c):
1021 test_all_config_results[c] = [r]
1023 test_all_config_results[c].append(r)
1027 #GraphResults('expt%d' % rnum, results)
1028 #GraphSummary('sum%d' % rnum, results)
1030 # re-test some fraction
1031 configs = [r.config() for r in results[0:int(MAX_RESULTS * KEEP_P)]]
1036 test_all_config_results = {}
1038 def ScoreTests(results):
1043 t_min = float(min([test.time() for test in results]))
1044 #t_max = float(max([test.time() for test in results]))
1045 s_min = float(min([test.size() for test in results]))
1046 #s_max = float(max([test.size() for test in results]))
1048 for test in results:
1050 # Hyperbolic function. Smaller scores still better
1051 red = 0.999 # minimum factors for each dimension are 1/1000
1052 test.score = ((test.size() - s_min * red) *
1053 (test.time() - t_min * red))
1055 scored.append((test.score, test))
1056 timed.append((test.time(), test))
1057 sized.append((test.size(), test))
1068 for (score, test) in scored:
1070 test.score_pos = pos
1073 scored = [x[1] for x in scored]
1076 test.size_pos = PosInAlist(sized, test)
1077 test.time_pos = PosInAlist(timed, test)
1083 print 'H-Score: %0.9f %s' % (test.score, test)
1089 def GraphResults(desc, results):
1090 f = open("data-%s.csv" % desc, "w")
1092 f.write("%0.9f\t%d\t# %s\n" % (r.time(), r.size(), r))
1095 os.system("./plot.sh data-%s.csv plot-%s.jpg" % (desc, desc))
1098 def GraphSummary(desc, results_ignore):
1102 # drops duplicate test/config pairs (TODO: don't retest them)
1103 for config, cresults in test_all_config_results.items():
1104 input_config_map = {}
1106 for test in cresults:
1107 assert test.config() == config
1108 test_population += 1
1110 if not input_config_map.has_key(key):
1111 input_config_map[key] = {}
1113 if input_config_map[key].has_key(config):
1114 print 'skipping repeat test %s vs. %s' % (input_config_map[key][config], test)
1117 input_config_map[key][config] = test
1120 config_ordered.append(uniq)
1123 # sort configs descending by number of tests
1124 config_ordered.sort(lambda x, y: len(y) - len(x))
1126 print 'population %d: %d configs %d results' % \
1128 len(config_ordered),
1129 len(config_ordered[0]))
1131 if config_ordered[0] == 1:
1135 # a map from test-key to test-list w/ various configs
1137 osize = len(config_ordered)
1139 for i in xrange(len(config_ordered)):
1140 config = config_ordered[i][0].config()
1141 config_tests = config_ordered[i]
1143 #print '%s has %d tested inputs' % (config, len(config_tests))
1145 if len(input_set) == 0:
1146 input_set = dict([(t.tinput(), [t]) for t in config_tests])
1150 # a map from test-key to test-list w/ various configs
1152 for r in config_tests:
1154 if input_set.has_key(t):
1155 update_set[t] = input_set[t] + [r]
1157 #print 'config %s does not have test %s' % (config, t)
1162 if len(update_set) <= 1:
1166 input_set = update_set
1168 # continue if there are more w/ the same number of inputs
1169 if i < (len(config_ordered) - 1) and \
1170 len(config_ordered[i + 1]) == len(config_tests):
1174 # synthesize results for multi-test inputs
1177 # map of config to sum(various test-keys)
1179 for (key, tests) in input_set.items():
1180 if config_num == None:
1181 # config_num should be the same in all elements
1182 config_num = len(tests)
1183 smap = dict([(r.config(),
1188 # compuate the per-config sum of time/size
1189 assert config_num == len(tests)
1190 smap = dict([(r.config(),
1191 (smap[r.config()][0] + r.time(),
1192 smap[r.config()][1] + r.size()))
1201 if len(input_set) == osize:
1205 summary = '%s-%d' % (desc, len(input_set))
1206 osize = len(input_set)
1208 print 'generate %s w/ %d configs' % (summary, config_num)
1209 syn = [RandomTest(0, (None, None, summary), config,
1210 syntuple = (smap[config][0], smap[config][1]))
1211 for config in smap.keys()]
1212 syn = ScoreTests(syn)
1213 #print 'smap is %s' % (smap,)
1214 #print 'syn is %s' % (' and '.join([str(x) for x in syn]))
1215 #GraphResults(summary, syn)
1219 def RunRegressionTest(pairs, rounds):
1227 print "Args %s" % (args)
1228 for (file1, file2, testkey) in pairs:
1229 ttest = TimedTest(file1, file2, Xdelta3Runner(args, forkexec=True),
1233 print "Source %s\nTarget %s\nEncode %s\nDecode %s\nSize %s\n\n" % (
1235 ttest.encode_time.str,
1236 ttest.decode_time.str,
1241 if __name__ == "__main__":
1243 RunCommand(['rm', '-rf', TMPDIR])
1246 #rcsf = GetTestRcsFiles()
1247 #generator = rcsf.Generator()
1249 sample = SampleDataTest([SAMPLEDIR])
1250 generator = sample.Generator()
1252 rand = random.Random(135135135135135)
1254 RunRegressionTest(sample.pairs, TEST_ROUNDS)
1258 # the idea below is to add the default configurations and
1259 # xdelta1 to the optimization loop:
1260 #x3r = rcsf.AllPairsByDate(Xdelta3RunClass(['-1', '-3', '-6']))
1261 #x3r = rcsf.AllPairsByDate(Xdelta3RunClass(['-9']))
1262 #x3r = rcsf.AllPairsByDate(Xdelta3RunClass(['-9', '-S', 'djw']))
1263 #x3r = rcsf.AllPairsByDate(Xdelta3RunClass(['-1', '-S', 'djw']))
1264 #x3r = rcsf.AllPairsByDate(Xdelta3RunClass(['-9', '-T']))
1265 #x1r = rcsf.AllPairsByDate(Xdelta1RunClass())
1267 except CommandError:
1270 RunCommand(['rm', '-rf', TMPDIR])