From b33b92113666ce1e40971d59e82e8be68c8360da Mon Sep 17 00:00:00 2001 From: Karl Chen Date: Tue, 25 Nov 2003 01:49:39 +0000 Subject: [PATCH] *** empty log message *** svn path=/trunk/boinc/; revision=2677 --- find-working-cvs | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100755 find-working-cvs diff --git a/find-working-cvs b/find-working-cvs new file mode 100755 index 0000000000..baeb8641a7 --- /dev/null +++ b/find-working-cvs @@ -0,0 +1,33 @@ +#!/usr/bin/env python + +# $Id$ + +# Brute-force find at what point in time the automated tests stopped working. +# You better be using ccache! + +# TODO: do a binary search instead of linear search. + +range = ['2003-10-01', '2003-11-10'] + +import os, time + +def ptime(t): + return time.mktime(time.strptime(t, '%Y-%m-%d')) + +def doit(d): + print 'trying', d + dir = '/tmp/t.' + d + os.system('cvs co -D %s -d %s boinc' % (d,dir)) + os.chdir(dir) + if 0 == os.system('./configure && make && cd test && ./test_uc.py'): + raise SystemExit('Woohoo! %s' %d) + +range = map(ptime, range) + +t = range[1] +tmin = range[0] + +while t > tmin: + d = time.strftime('%Y-%m-%d', time.localtime(t)) + doit(d) + t -= 86400