Have a way to detect android_version for marionette-webapi tests

RESOLVED FIXED in Firefox 43

Status

Testing
Marionette
RESOLVED FIXED
3 years ago
3 years ago

People

(Reporter: hsinyi, Assigned: jdai)

Tracking

unspecified
mozilla43
Points:
---

Firefox Tracking Flags

(firefox43 fixed)

Details

Attachments

(2 attachments, 2 obsolete attachments)

(Reporter)

Description

3 years ago
As [1], it's useful if there's a way to detect android_version in manifest of marionette-webapi tests

[1] https://dxr.mozilla.org/mozilla-central/source/dom/media/tests/mochitest/mochitest.ini#3
This feels like something it would make sense to return as part of the capabilities when you start a new session.

Comment 2

3 years ago
mochitest [1] and xpcshell [2] supports detecting android_version in manifest, maybe marionette-webapi tests can use the same way (I am not sure).

[1] https://dxr.mozilla.org/mozilla-central/source/testing/mochitest/runtestsremote.py#493-499
[2] https://dxr.mozilla.org/mozilla-central/source/testing/xpcshell/remotexpcshelltests.py#215-218
(In reply to Edgar Chen [:edgar][:echen] from comment #2)
> mochitest [1] and xpcshell [2] supports detecting android_version in
> manifest, maybe marionette-webapi tests can use the same way (I am not sure).

Okay, so you can already sort of do that through calling executeScript with something like `return runEmulatorCmd(["getprop", "ro.build.version.sdk"])` I should think.
(Assignee)

Comment 4

3 years ago
Created attachment 8653296 [details] [diff] [review]
Part 1: Detect android_version for marionette-webapi tests.

It works on my local machine. Due to bug 1188330, I will provide a try link when TC marionette-webapi fixed.
(Reporter)

Comment 5

3 years ago
(In reply to John Dai[:johnz][:jdai] from comment #4)
> Created attachment 8653296 [details] [diff] [review]
> Detect android_version for marionette-webapi tests.
> 
> It works on my local machine. Due to bug 1188330, I will provide a try link
> when TC marionette-webapi fixed.

(Y)
(Assignee)

Comment 6

3 years ago
Created attachment 8653390 [details] [diff] [review]
Part 2: Update testcase to apply android_version filter.
Assignee: nobody → jdai
(Assignee)

Updated

3 years ago
Attachment #8653296 - Attachment description: Detect android_version for marionette-webapi tests. → Part1: Detect android_version for marionette-webapi tests.
(Assignee)

Updated

3 years ago
Attachment #8653296 - Attachment description: Part1: Detect android_version for marionette-webapi tests. → Part 1: Detect android_version for marionette-webapi tests.
Attachment #8653296 - Flags: review?(ato)
(Assignee)

Updated

3 years ago
Attachment #8653390 - Attachment description: Update testcase to apply android_version filter. → Part 2: Update testcase to apply android_version filter.
Attachment #8653390 - Flags: review?(echen)
Comment on attachment 8653296 [details] [diff] [review]
Part 1: Detect android_version for marionette-webapi tests.

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

Looks mostly good to me.  Although please consider using MozReview next time.

::: testing/marionette/client/marionette/runner/base.py
@@ +795,5 @@
> +            # can be conditional on android_version.
> +            androidVersion = dm.shellCheckOutput(['getprop', 'ro.build.version.sdk'])
> +            self.logger.info(
> +                "Android sdk version '%s'; will use this to filter manifests" %
> +                str(androidVersion))

Coercing to string is implicit
Attachment #8653296 - Flags: review?(ato) → review+

Comment 9

3 years ago
Comment on attachment 8653390 [details] [diff] [review]
Part 2: Update testcase to apply android_version filter.

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

Nice, thank you.
Attachment #8653390 - Flags: review?(echen) → review+
(Assignee)

Comment 10

3 years ago
(In reply to Andreas Tolfsen (:ato) from comment #8)
> Comment on attachment 8653296 [details] [diff] [review]
> Part 1: Detect android_version for marionette-webapi tests.
> 
> Review of attachment 8653296 [details] [diff] [review]:
> -----------------------------------------------------------------
> 
> Looks mostly good to me.  Although please consider using MozReview next time.
> 

Okay, I will, thanks for the review.

> ::: testing/marionette/client/marionette/runner/base.py
> @@ +795,5 @@
> > +            # can be conditional on android_version.
> > +            androidVersion = dm.shellCheckOutput(['getprop', 'ro.build.version.sdk'])
> > +            self.logger.info(
> > +                "Android sdk version '%s'; will use this to filter manifests" %
> > +                str(androidVersion))
> 
> Coercing to string is implicit

Will do.
(Assignee)

Comment 11

3 years ago
Created attachment 8658028 [details] [diff] [review]
Part 1: Detect android_version for marionette-webapi tests. r=ato
Attachment #8653296 - Attachment is obsolete: true
Attachment #8658028 - Flags: review+
(Assignee)

Comment 12

3 years ago
Created attachment 8658029 [details] [diff] [review]
Part 2: Update testcase to apply android_version filter. r=echen
Attachment #8653390 - Attachment is obsolete: true
Attachment #8658029 - Flags: review+
(Assignee)

Updated

3 years ago
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/298d7dcbda70
https://hg.mozilla.org/mozilla-central/rev/08960e6b65c3
Status: NEW → RESOLVED
Last Resolved: 3 years ago
status-firefox43: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla43

Updated

3 years ago
Blocks: 1203037
You need to log in before you can comment on or make changes to this bug.