Closed Bug 758250 Opened 13 years ago Closed 13 years ago

testprofilepath.py deletes the mozmill and jsbridge extension; --profile is dangerously b0rken for mozmill (and mozbase?)

Categories

(Testing :: Mozbase, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: k0scist, Unassigned)

Details

Attachments

(2 files)

The seemingly innocuous (though thankfully disabled) testprofilepath deletes the mozmill and jsbridge extension *from the tree*! https://github.com/mozautomation/mozmill/blob/master/mutt/mutt/tests/python/testprofilepath.py After running: (mozmill)│git status # On branch master # Changes not staged for commit: # (use "git add/rm <file>..." to update what will be committed) # (use "git checkout -- <file>..." to discard changes in working directory) # # deleted: jsbridge/jsbridge/extension/chrome.manifest # deleted: jsbridge/jsbridge/extension/chrome/content/overlay.js # deleted: jsbridge/jsbridge/extension/chrome/content/overlay.xul # deleted: jsbridge/jsbridge/extension/components/cmdarg.js # deleted: jsbridge/jsbridge/extension/install.rdf # deleted: jsbridge/jsbridge/extension/resource/modules/bridge.js # deleted: jsbridge/jsbridge/extension/resource/modules/events.js # deleted: jsbridge/jsbridge/extension/resource/modules/init.js # deleted: jsbridge/jsbridge/extension/resource/modules/jsbridgefilelogger.js # deleted: jsbridge/jsbridge/extension/resource/modules/nspr-server.js # deleted: jsbridge/jsbridge/extension/resource/modules/nspr-socket.js # deleted: jsbridge/jsbridge/extension/resource/modules/nspr.js # deleted: jsbridge/jsbridge/extension/resource/modules/server.js # deleted: mozmill/mozmill/extension/build.xml # deleted: mozmill/mozmill/extension/chrome-jar.manifest # deleted: mozmill/mozmill/extension/chrome.manifest # deleted: mozmill/mozmill/extension/content/chrome.js # deleted: mozmill/mozmill/extension/content/css/fg.menu.css # deleted: mozmill/mozmill/extension/content/css/mozmill.css # deleted: mozmill/mozmill/extension/content/css/smoothness/images/ui-bg_flat_0_aaaaaa_40x100.png # deleted: mozmill/mozmill/extension/content/css/smoothness/images/ui-bg_flat_75_ffffff_40x100.png # deleted: mozmill/mozmill/extension/content/css/smoothness/images/ui-bg_glass_55_fbf9ee_1x400.png # deleted: mozmill/mozmill/extension/content/css/smoothness/images/ui-bg_glass_65_ffffff_1x400.png # deleted: mozmill/mozmill/extension/content/css/smoothness/images/ui-bg_glass_75_dadada_1x400.png # deleted: mozmill/mozmill/extension/content/css/smoothness/images/ui-bg_glass_75_e6e6e6_1x400.png # deleted: mozmill/mozmill/extension/content/css/smoothness/images/ui-bg_glass_95_fef1ec_1x400.png # deleted: mozmill/mozmill/extension/content/css/smoothness/images/ui-bg_highlight-soft_75_cccccc_1x100.png # deleted: mozmill/mozmill/extension/content/css/smoothness/images/ui-icons_222222_256x240.png # deleted: mozmill/mozmill/extension/content/css/smoothness/images/ui-icons_2e83ff_256x240.png # deleted: mozmill/mozmill/extension/content/css/smoothness/images/ui-icons_454545_256x240.png # deleted: mozmill/mozmill/extension/content/css/smoothness/images/ui-icons_888888_256x240.png # deleted: mozmill/mozmill/extension/content/css/smoothness/images/ui-icons_cd0a0a_256x240.png # deleted: mozmill/mozmill/extension/content/css/smoothness/jquery-ui-1.7.1.custom.css # deleted: mozmill/mozmill/extension/content/dx.js # deleted: mozmill/mozmill/extension/content/dxwindow.xul # deleted: mozmill/mozmill/extension/content/editor/bespin/BespinEmbedded.css # deleted: mozmill/mozmill/extension/content/editor/bespin/BespinEmbedded.js # deleted: mozmill/mozmill/extension/content/editor/bespin/BespinMain.js # deleted: mozmill/mozmill/extension/content/editor/bespin/BespinWorker.js # deleted: mozmill/mozmill/extension/content/editor/bespin/resources/screen_theme/images/bespin-s.png # deleted: mozmill/mozmill/extension/content/editor/bespin/resources/screen_theme/images/check-selected.png # deleted: mozmill/mozmill/extension/content/editor/bespin/resources/screen_theme/images/check-unselected.png # deleted: mozmill/mozmill/extension/content/editor/bespin/resources/screen_theme/images/lines.png # deleted: mozmill/mozmill/extension/content/editor/bespin/resources/screen_theme/images/radio-selected.png # deleted: mozmill/mozmill/extension/content/editor/bespin/resources/screen_theme/images/radio-unselected.png # deleted: mozmill/mozmill/extension/content/editor/bespin/resources/screen_theme/images/scroll-down.png # deleted: mozmill/mozmill/extension/conon/zipexclude.lst # no changes added to commit (use "git add" and/or "git commit -a") This is probably a mozprofile bug? In any case, it should *not* do this
Whiteboard: [mozbase]
This is *also* sufficient to delete all the things: mozmill -t src/test.js --profile=/tmp/tmpyslklm.mozrunner
Summary: testprofilepath.py deletes the mozmill and jsbridge extension → testprofilepath.py deletes the mozmill and jsbridge extension; --profile is dangerously b0rken for mozmill (and mozbase?)
Confirmed that this is a mozrunner/mozprofile bug. Steps to reproduce: 1. download http://mozqa.com/data/firefox/addons/extensions/empty.xpi 2. unzip 3. make a profile: mozprofile 4. run mozrunner against this profile, e.g: mozrunner --addon tests/empty -b `which firefox` --profile=/tmp/tmpDjVsZm.mozrunner This will delete (in this case) the tests/empty directory which contains the empty.xpi install.rdf
Component: Mozmill → Mozbase
QA Contact: mozmill → mozbase
Whiteboard: [mozbase]
Attached patch test case (deleted) — Splinter Review
The line of problem: https://github.com/mozilla/mozbase/blob/master/mozprofile/mozprofile/profile.py#L214 The question is....why does this point to the addon source at all? It should copy
Not really. The line of problem is that one: https://github.com/mozilla/mozbase/blob/master/mozprofile/mozprofile/addons.py#L40 We copy the path of the add-ons to install 1-1 to self.installed_addons. Instead we really have to extend with the install location of the addon.
Okay, I see what is going on. We need to keep track of the addons we install into the profile for addon manager cleanup: https://github.com/mozilla/mozbase/blob/master/mozprofile/mozprofile/addons.py#L217 but we also need to keep track of the source of the addons and the manifest for profile resetting: https://github.com/mozilla/mozbase/blob/master/mozprofile/mozprofile/profile.py#L93 (We might also wonder what happen if you have, say, mozmill installed in an existing profile and you additionally install it with mozprofile, but that is a follow-up bug and not part of this regression.) So we should break this into multiple pieces and write a test
Attached patch fix + test (deleted) — Splinter Review
this also fixes a few __del__ - related exceptions that weren't actually harmful, just annoying
Attachment #628146 - Flags: review?(dburns)
Comment on attachment 628146 [details] [diff] [review] fix + test >+import subprocess I can't see this import being used please remove otherwise looks good
Attachment #628146 - Flags: review?(dburns) → review+
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: