Closed
Bug 981190
Opened 12 years ago
Closed 12 years ago
Mochitest on device, device should restore previous profile after a run
Categories
(Testing :: Mozbase, defect)
Testing
Mozbase
Tracking
(Not tracked)
RESOLVED
FIXED
mozilla31
People
(Reporter: onecyrenus, Assigned: jgraham)
References
Details
Attachments
(2 files, 3 obsolete files)
|
1.07 KB,
patch
|
Details | Diff | Splinter Review | |
|
2.35 KB,
patch
|
ahal
:
review+
|
Details | Diff | Splinter Review |
Currently: After you run mochitests on device the profile is not easy to restore.
You have to go onto the phone and delete user.js.
| Reporter | ||
Comment 1•12 years ago
|
||
Resets the profile so the device returns to normal after a run.
Attachment #8387959 -
Flags: review?(ahalberstadt)
| Reporter | ||
Comment 2•12 years ago
|
||
just realized this was in mozilla central, running a try run as well.
Attachment #8387959 -
Attachment is obsolete: true
Attachment #8387959 -
Flags: review?(ahalberstadt)
Attachment #8387963 -
Flags: review?(ahalberstadt)
| Reporter | ||
Comment 3•12 years ago
|
||
https://tbpl.mozilla.org/?tree=Try&rev=293fa464cfee, will see how it runs.
Comment 4•12 years ago
|
||
Comment on attachment 8387963 [details] [diff] [review]
bug981190.patch
Review of attachment 8387963 [details] [diff] [review]:
-----------------------------------------------------------------
This would delete a users changes if they had a customized version of user.js prior to running mochitests. I think what you want to do is delete the backup_file in an else clause here:
http://mxr.mozilla.org/mozilla-central/source/testing/mozbase/mozrunner/mozrunner/remote.py#85
Also while you're modifying this area of code, would you mind changing the dm.shellCheckOutput(['dd', ...]) commands to use dm.copyTree()? Thanks!
Attachment #8387963 -
Flags: review?(ahalberstadt) → review-
| Reporter | ||
Comment 5•12 years ago
|
||
Ahal, actually i think the usability is a bit differt.
The user.js is already backed up if one previously existed
http://mxr.mozilla.org/mozilla-central/source/testing/mozbase/mozrunner/mozrunner/remote.py#331
The use case i am addressing here is if one doesn't exist, we place a user.js there for testing, and it doesn't get removed.
In the case where the file has been backed up and there is an orig file then
http://mxr.mozilla.org/mozilla-central/source/testing/mozbase/mozrunner/mozrunner/remote.py#85
yes this case will work we will move the orig --> user.js .. at least that is the way i read the code.
can do on the copyTree
| Reporter | ||
Comment 6•12 years ago
|
||
https://tbpl.mozilla.org/?tree=Try&rev=df7cf04abd1f
Updated the patch to use copyTree
Attachment #8387963 -
Attachment is obsolete: true
Attachment #8389652 -
Flags: review?(ahalberstadt)
Comment 7•12 years ago
|
||
Comment on attachment 8389652 [details] [diff] [review]
bug981190.patch
Review of attachment 8389652 [details] [diff] [review]:
-----------------------------------------------------------------
Oh I see why my suggestion wasn't working.. we only add the file to backup_files if an original exists already: http://mxr.mozilla.org/mozilla-central/source/testing/mozbase/mozrunner/mozrunner/remote.py#56
I still have to r- this because you have self.user_js in RemoteRunner.cleanup() which doesn't have a user_js property. Please move it to B2GRunner.cleanup() (before the RemoteRunner version gets called).
Attachment #8389652 -
Flags: review?(ahalberstadt) → review-
| Reporter | ||
Comment 8•12 years ago
|
||
moved this, B2GRunner definitely makes more sense.
Attachment #8389652 -
Attachment is obsolete: true
Attachment #8390039 -
Flags: review?(ahalberstadt)
Comment 9•12 years ago
|
||
Comment on attachment 8390039 [details] [diff] [review]
bug981190.patch
I think you forgot to qref or something, this is the same patch as last time :)
Attachment #8390039 -
Flags: review?(ahalberstadt)
| Assignee | ||
Comment 10•12 years ago
|
||
| Assignee | ||
Comment 11•12 years ago
|
||
Er, sorry that needed more description (moz-git-tools n00b error) :)
I ran into the same problem before I saw this bug and made a patch using an alternate approach; this will store a list of all backed up files that have no original to restore and remove the added file during cleanup.
Comment 12•12 years ago
|
||
Comment on attachment 8390651 [details] [diff] [review]
Remove all added files in cleanup
Review of attachment 8390651 [details] [diff] [review]:
-----------------------------------------------------------------
Thanks lets do this as it's more generic.
Attachment #8390651 -
Flags: review+
Updated•12 years ago
|
Status: NEW → ASSIGNED
Component: Mochitest → Mozbase
OS: Mac OS X → All
QA Contact: hskupin
Hardware: x86 → All
Comment 13•12 years ago
|
||
Assignee: nobody → james
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla31
You need to log in
before you can comment on or make changes to this bug.
Description
•