Adding a binary search algorithm for bisection of failing tests

RESOLVED FIXED in mozilla33

Status

Testing
Mochitest
RESOLVED FIXED
3 years ago
3 years ago

People

(Reporter: vaibhav1994, Assigned: vaibhav1994, Mentored)

Tracking

(Blocks: 1 bug)

Trunk
mozilla33
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

(Assignee)

Description

3 years ago
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)

Updated

3 years ago
Assignee: nobody → vaibhavmagarwal
(Assignee)

Updated

3 years ago
Depends on: 1036372

Updated

3 years ago
Blocks: 1036372
No longer depends on: 1036372
(Assignee)

Comment 1

3 years ago
Created attachment 8453155 [details] [diff] [review]
binarysearch.patch

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+
(Assignee)

Comment 3

3 years ago
Created attachment 8453280 [details] [diff] [review]
binarysearch.patch

Fixed the nit pointed by jmaher in reverse search and binary search. Thanks!
Attachment #8453155 - Attachment is obsolete: true
Attachment #8453280 - Flags: review+
(Assignee)

Updated

3 years ago
Keywords: checkin-needed
https://hg.mozilla.org/integration/mozilla-inbound/rev/ab7e8e8c1e00
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/ab7e8e8c1e00
Status: NEW → RESOLVED
Last Resolved: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla33
Depends on: 1103159
You need to log in before you can comment on or make changes to this bug.