Closed Bug 1078274 Opened 6 years ago Closed 6 years ago

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

Categories

(Testing :: Mozbase, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
mozilla36

People

(Reporter: davehunt, Assigned: davehunt, Mentored)

References

Details

Attachments

(1 file, 1 obsolete file)

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
Mentor: dave.hunt
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+
Depends on: 1081167
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)
Flags: needinfo?(dave.hunt)
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/da9a33e93832
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla36
You need to log in before you can comment on or make changes to this bug.