Closed Bug 541410 Opened 12 years ago Closed 12 years ago
.py to mozilla-central
devicemanager.py is a script that interfaces with the SUT agent (which lives on the device). This acts as a telnet manager and provides some basic APIs for doing common file, process, and device transactions. Currently this will live in mozilla-central/build/ and cvs:/mozilla/testing/performance/talos/.
devicemanager.py is a library for accessing a SUT driver on a remote device.
Attachment #425070 - Flags: review?(ctalbert)
Comment on attachment 425070 [details] [diff] [review] latest version of device manager Have comments on devicemanager. It looks good. Mostly, I'm just advocating some code cleanup and removal of a bit of cruft that crept in there over time. r+ with these nits Here are the comments: device mgr.patch the unzip command uses windows slashes we should change that to / I think that getDirectory isn't needed anymore in deviceagent and I think that will only work for filenames of form <foo>.<blah> So it could fail on linux or on android where we will have <foo>.<bar>.<baz> style names why do we need both launch process and fireprocess? I see the difference but I think we use fireprocess across the board don't we? Let's remove the code in removeDir and use the prune command in bmoss's agent instead. It will push this down onto the device and will make this api much more robust. in dirExists - we should remove the commented out line. Do we need the line above it that matches \\ and turns them to \\\\? If we assume (and I think we should) that we only get / style paths then this seems superfluous. Even if we are creating directory paths for the sutagent on the device, I think the sutagent should be in charge of slash flipping insanity so we can push that complexity downstream and just use / here. Init should default to 20701, because we need to standardize on bmoss's agent. Bmoss's agent is the one we'll use as it does android and it will be the pattern going forward for new agents. We should get rid of dirslash - it's an unnecessary obfuscation of the code, because it just defaults to '/'. If we were to read that value from the device, then it would be a meaningful parameter. But we only use it in some places and not others, so it is confusing. Also, if we are pushing all the slash craziness to the agent, then I don't think we need it. We can just use / everywhere and make our lives simpler.
Attachment #425070 - Flags: review?(ctalbert) → review+
fixed all of the nits. The one thing that is still pending: rmdr: this is being added to the test-agent.exe as a 'rm -Rf'. Currently rmdr will remove an empty directory. Running through tryserver again to double check that things are ok before requesting a commit to m-c.
Attachment #425070 - Attachment is obsolete: true
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.