def bisect(self, good, bad, testcondition=None, args_for_condition=[]): #Call hg bisect with initial params, set up building environment (mozconfig) #Support for using dates if self.testBinaries: self.setupTests() badDate = re.search(r'(\d\d\d\d-\d\d-\d\d)', good) goodDate = re.search(r'(\d\d\d\d-\d\d-\d\d)', bad) if badDate != None and goodDate != None: badDate = badDate.group(1) goodDate = goodDate.group(1) good = self.changesetFromDay( goodDate) #Get first changeset from this day bad = self.changesetFromDay( badDate, oldest=False) #Get last changeset from that day if not (bad and good): print "Invalid date range." quit() #Since they entered dates, lets give them info about the changeset range print "Bisecting on changeset range " + str( good)[:12] + " to " + str(bad)[:12] #Get the actual changesets that we will be using good = hgId(good, self.hgPrefix) bad = hgId(bad, self.hgPrefix) if good and bad and self.validate(good, bad): #Valid changesets, so do the bisection subprocess.call(self.hgPrefix + ["bisect", "--reset"]) setUpdate = captureStdout(self.hgPrefix + ["up", bad]) setBad = captureStdout(self.hgPrefix + ["bisect", "--bad"]) setGood = captureStdout(self.hgPrefix + ["bisect", "--good", good]) print str(setUpdate) print str(setBad) print str(setGood) self.check_done(setGood) # Set mozconfig self.mozconfigure() # Call recursive bisection! self.bisectRecurse(testcondition=testcondition, args_for_condition=args_for_condition) else: print "Invalid values. Please check your changeset revision numbers." print "If the problem persists, try running mozcommitbuilder with the -f flag."
def bisect(self,good,bad, testcondition=None, args_for_condition=[]): #Call hg bisect with initial params, set up building environment (mozconfig) #Support for using dates if self.testBinaries: self.setupTests() badDate = re.search(r'(\d\d\d\d-\d\d-\d\d)',good) goodDate = re.search(r'(\d\d\d\d-\d\d-\d\d)',bad) if badDate != None and goodDate != None: badDate = badDate.group(1) goodDate = goodDate.group(1) good = self.changesetFromDay(goodDate) #Get first changeset from this day bad = self.changesetFromDay(badDate, oldest=False) #Get last changeset from that day if not (bad and good): print "Invalid date range." quit() #Since they entered dates, lets give them info about the changeset range print "Bisecting on changeset range " + str(good)[:12] + " to " + str(bad)[:12] #Get the actual changesets that we will be using good = hgId(good, self.hgPrefix) bad = hgId(bad, self.hgPrefix) if good and bad and self.validate(good, bad): #Valid changesets, so do the bisection subprocess.call(self.hgPrefix+["bisect","--reset"]) setUpdate = captureStdout(self.hgPrefix+["up",bad]) setBad = captureStdout(self.hgPrefix+["bisect","--bad"]) setGood = captureStdout(self.hgPrefix+["bisect","--good",good]) print str(setUpdate) print str(setBad) print str(setGood) self.check_done(setGood) # Set mozconfig self.mozconfigure() # Call recursive bisection! self.bisectRecurse(testcondition=testcondition, args_for_condition=args_for_condition) else: print "Invalid values. Please check your changeset revision numbers." print "If the problem persists, try running mozcommitbuilder with the -f flag."
def bisect(self,good,bad, testfile=None, testpath=None, testcondition=None, args_for_condition=None): #Call hg bisect with initial params, set up building environment (mozconfig) #testfile is an external file, testpath is an actual mochitest good = hgId(good, self.hgPrefix) bad = hgId(bad, self.hgPrefix) if good and bad and self.validate(good, bad): #valid commit numbers, do the bisection! subprocess.call(self.hgPrefix+["bisect","--reset"]) subprocess.call(self.hgPrefix+["up",bad]) subprocess.call(self.hgPrefix+["bisect","--bad"]) subprocess.call(self.hgPrefix+["bisect","--good",good]) #Prebuild stuff here!! self.mozconfigure() self.bisectRecurse(testfile=testfile, testpath=testpath, testcondition=testcondition, args_for_condition=args_for_condition) else: print "Invalid values. Please check your changeset revision numbers."