Closed Bug 1197370 Opened 9 years ago Closed 6 years ago

Add chown method to adb.py

Categories

(Testing :: Mozbase, defect)

defect
Not set
normal

Tracking

(firefox64 fixed)

RESOLVED FIXED
mozilla64
Tracking Status
firefox64 --- fixed

People

(Reporter: bc, Assigned: egao)

Details

Attachments

(1 file)

chown has potentially different syntax depending on the version of android. The usage messages for older versions is Usage: chown <USER>[.GROUP] <FILE1> [FILE2] ... while newer versions say Usage: chown <USER>[:GROUP] <FILE1> [FILE2] ...

It does appear that some versions of chown supports the -R recurse flag while others do not. It would be good to implement this as a command in adb.py so that we can hide these implementation differences. Detection in the ADBDevice constructor in a similar fashion to that used for ls might be appropriate.
Assignee: nobody → egao
- added method for ADBDevice class called chown()
- when initializing ADBDevice class, check if recursive flag is supported
- added handling for recursive and non-recursive flags
- added handling for situation where recursive is desired but -R flag is not supported
- added unit tests to exercise each code path, checking if expected values are being returned
Attachment #9015639 - Attachment description: ./mach lint Bug 1197370 - Add chown method to adb.py r?bc → Bug 1197370 - Add chown method to adb.py r?bc
Attachment #9015639 - Attachment description: Bug 1197370 - Add chown method to adb.py r?bc → Bug 1197370 - Add chown method to adb.py, refactor chmod r?bc
Pushed by gmierz2@outlook.com:
https://hg.mozilla.org/integration/autoland/rev/53dfca556ff1
Add chown method to adb.py, refactor chmod r=bc
https://hg.mozilla.org/mozilla-central/rev/53dfca556ff1
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla64
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: