Closed
Bug 875921
Opened 13 years ago
Closed 11 years ago
skip_if_b2g is broken on Marionette client
Categories
(Remote Protocol :: Marionette, defect)
Remote Protocol
Marionette
Tracking
(Not tracked)
RESOLVED
DUPLICATE
of bug 1108714
People
(Reporter: mbu, Unassigned)
Details
(Whiteboard: [runner][affects=b2g])
Attachments
(1 file)
|
4.45 KB,
patch
|
Details | Diff | Splinter Review |
User Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.160 Safari/537.22
Steps to reproduce:
I put the decorator @skip_if_b2g, above of my class declaration. When I launch unit tests from Marionette client, with the option --type=browser
Actual results:
The test class with the decorator 'skip_if_b2g' is also skipped
Expected results:
With the option --type=browser, the tests should not be skipped.
Updated•13 years ago
|
Status: UNCONFIRMED → NEW
Ever confirmed: true
| Reporter | ||
Comment 1•13 years ago
|
||
For this bug, i think there is a problem of scope for the decorator. When debugging, i realize that the condition to skip the class ( if not hasattr(self.marionette, 'b2g') or not self.marionette.b2g ) could never work because, on the top of a class, we can't get the attribute of marionette object, at this time of the execution.
So, i put the function "skip_if_b2g" in runtests.py to get type value and check if type contain b2g value.
This is just a proposition, maybe i miss something in the runner for getting the value type option on the top of a test class.
Attachment #756205 -
Flags: review?(mdas)
Comment 2•13 years ago
|
||
I'm thinking about this one, there might be a better way around it. Also, the way it currently detects if it's a b2g instance or not is not through the CLI, it checks by connecting to marionette and verifies it. We can do that in a class decorator, by instantiating the class, then checking its marionette session, then either returning the instance or throwing an error... but that's in theory.
| Reporter | ||
Comment 3•13 years ago
|
||
Yep, i'll thinking of that.
The difficulties is the scope when we decorate a class .. I'll try to find a better way.
This way (attachment) are not very pretty, but it seems to work..
Comment 4•13 years ago
|
||
Comment on attachment 756205 [details] [diff] [review]
fix skip_if_b2g decorator on runner
Review of attachment 756205 [details] [diff] [review]:
-----------------------------------------------------------------
I'm going to punt on this review until the alternative is investigated
Attachment #756205 -
Flags: review?(mdas)
Updated•12 years ago
|
Whiteboard: [runner]
Updated•12 years ago
|
Whiteboard: [runner] → [runner][affects=b2g]
Updated•11 years ago
|
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → DUPLICATE
Updated•3 years ago
|
Product: Testing → Remote Protocol
You need to log in
before you can comment on or make changes to this bug.
Description
•