[mozdevice] Add 'memtotal' to getInfo with implementation in DeviceManagerADB

RESOLVED FIXED in mozilla36

Status

Testing
Mozbase
RESOLVED FIXED
3 years ago
3 years ago

People

(Reporter: davehunt, Assigned: davehunt, Mentored)

Tracking

unspecified
mozilla36
ARM
Gonk (Firefox OS)
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

(Assignee)

Description

3 years ago
As per bug 1073021 comment 6, let's add a 'memtotal' directive to DeviceManager.getInfo [1]. This will return the total amount of memory available on the device. For DeviceManagerADB [2] we can run |adb shell cat /proc/meminfo| and return the value associated with MemTotal

[1] http://mozbase.readthedocs.org/en/latest/mozdevice.html#mozdevice.DeviceManager.getInfo
[2] http://hg.mozilla.org/mozilla-central/file/2399d1ae89e9/testing/mozbase/mozdevice/mozdevice/devicemanagerADB.py#l499
(Assignee)

Updated

3 years ago
Mentor: dave.hunt@gmail.com
(Assignee)

Comment 1

3 years ago
Created attachment 8503275 [details] [diff] [review]
Add a memtotal directive to getInfo for ADB. v1.0
Assignee: nobody → dave.hunt
Status: NEW → ASSIGNED
Attachment #8503275 - Flags: review?(wlachance)
Comment on attachment 8503275 [details] [diff] [review]
Add a memtotal directive to getInfo for ADB. v1.0

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

::: testing/mozbase/mozdevice/mozdevice/devicemanager.py
@@ +111,5 @@
>            - `uptimemillis` - uptime of the device in milliseconds (NOT supported on all implementations)
>            - `systime` - system time of the device
>            - `screen` - screen resolution
>            - `memory` - memory stats
> +          - `memtotal` - total memory available on the device

can you give an example of what value might be returned here? I know the other properties don't have this, but I think it would be helpful from a documentation perspective
Attachment #8503275 - Flags: review?(wlachance) → review+
(Assignee)

Updated

3 years ago
Depends on: 1081167
(Assignee)

Comment 3

3 years ago
Created attachment 8504000 [details] [diff] [review]
Add a memtotal directive to getInfo for ADB. v1.1

Added example and carried r+. This version of the patch is based on the patch from bug 1081167, which will land soon. I'll mark this as checkin-needed once it's ready.
Attachment #8503275 - Attachment is obsolete: true
Attachment #8504000 - Flags: review+
Flags: needinfo?(dave.hunt)
(Assignee)

Updated

3 years ago
Flags: needinfo?(dave.hunt)
Keywords: checkin-needed
https://hg.mozilla.org/integration/mozilla-inbound/rev/16706b686cec
Keywords: checkin-needed
Backed out for B2G cpptest permafail.
https://hg.mozilla.org/integration/mozilla-inbound/rev/307181c1de8e

https://treeherder.mozilla.org/ui/logviewer.html#?job_id=2990585&repo=mozilla-inbound
Nevermind, wasn't your fault. Re-landed :)
https://hg.mozilla.org/integration/mozilla-inbound/rev/da9a33e93832
https://hg.mozilla.org/mozilla-central/rev/da9a33e93832
Status: ASSIGNED → RESOLVED
Last Resolved: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla36
You need to log in before you can comment on or make changes to this bug.