Closed Bug 1036374 Opened 10 years ago Closed 10 years ago

Adding a binary search algorithm for bisection of failing tests

Categories

(Testing :: Mochitest, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
mozilla33

People

(Reporter: vaibhav1994, Assigned: vaibhav1994, Mentored)

References

(Blocks 1 open bug)

Details

Attachments

(1 file, 1 obsolete file)

Right now we have a reverse search algorithm for bisection of mochitests. Reverse search does well when the previous tests causing the failure are quite close to the failing test, however binary search algorithm will do better when the previous tests causing the failure will be far away.
Assignee: nobody → vaibhavmagarwal
Depends on: 1036372
Blocks: 1036372
No longer depends on: 1036372
Attached patch binarysearch.patch (obsolete) — Splinter Review
The binary search algorithm to determine the cause of failing test. 
Try run: https://tbpl.mozilla.org/?tree=Try&rev=0a6914b91de6
Attachment #8453155 - Flags: review?(jmaher)
Comment on attachment 8453155 [details] [diff] [review]
binarysearch.patch

Review of attachment 8453155 [details] [diff] [review]:
-----------------------------------------------------------------

overall this looks great.  Just a single suggestion for cleaning up your code ever so slightly.

::: testing/mochitest/bisection.py
@@ +160,5 @@
> +            return self.contents['testsToRun']
> +        if self.contents['loop'] == 1:
> +            self.contents['loop'] += 1
> +            self.contents['testsToRun'] = [self.contents['tests'][-1]]
> +            return self.contents['testsToRun']

if self.contents['loop'] <= 1:  #assuming this cannot be -1
    self.contents['testsToRun'] = [self.contents['tests']]
    if self.contents['loop'] == 1:
        self.contents['testsToRun'] = [self.contents['tests'][-1]]
    self.contents['loop'] += 1
    return self.contents['testsToRun']
Attachment #8453155 - Flags: review?(jmaher) → review+
Fixed the nit pointed by jmaher in reverse search and binary search. Thanks!
Attachment #8453155 - Attachment is obsolete: true
Attachment #8453280 - Flags: review+
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/ab7e8e8c1e00
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla33
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: