Closed
Bug 888526
Opened 11 years ago
Closed 11 years ago
use the profile dir instead of the bin dir for contentpref xpcshell tests
Categories
(Toolkit :: General, defect)
Tracking
()
RESOLVED
FIXED
mozilla25
People
(Reporter: mihneadb, Assigned: mihneadb)
References
Details
Attachments
(1 file, 3 obsolete files)
2.88 KB,
patch
|
ted
:
review+
|
Details | Diff | Splinter Review |
No description provided.
Assignee | ||
Comment 1•11 years ago
|
||
Assignee: nobody → mihneadb
Assignee | ||
Updated•11 years ago
|
Attachment #769253 -
Flags: review?(ehsan)
Comment 2•11 years ago
|
||
Comment on attachment 769253 [details] [diff] [review] use do_get_profile Review of attachment 769253 [details] [diff] [review]: ----------------------------------------------------------------- Hmm, I'm not sure if I'm the best reviewer for this patch. The bug doesn't really describe what the problem is and how this patch tries to fix it, which doesn't help much either...
Attachment #769253 -
Flags: review?(ehsan)
Assignee | ||
Comment 3•11 years ago
|
||
This is needed so we can run xpcshell tests concurrently. Currently this is not possible for the contentpref tests because they use the bin directory which is shared. This patch makes them use the profile dir which is individual to every test that is running.
Assignee | ||
Comment 4•11 years ago
|
||
Attachment #772821 -
Flags: review?(ted)
Assignee | ||
Updated•11 years ago
|
Attachment #769253 -
Attachment is obsolete: true
Assignee | ||
Comment 5•11 years ago
|
||
try run: https://tbpl.mozilla.org/?tree=Try&rev=b9ab7fd28b73
Comment 6•11 years ago
|
||
Why are you limiting this to runningInParent then?
Assignee | ||
Comment 7•11 years ago
|
||
I can only call do_get_profile when runningInParent and there is only one ipc test (so no concurrency issues atm). I could change the function so that when not runningInParent it uses the XPCSHELL_TEST_PROFILE_DIR env variable. Is that ok?
Comment 8•11 years ago
|
||
(In reply to comment #7) > I can only call do_get_profile when runningInParent and there is only one ipc > test (so no concurrency issues atm). > I could change the function so that when not runningInParent it uses the > XPCSHELL_TEST_PROFILE_DIR env variable. Is that ok? I think we should just use do_get_profile() unconditionally.
Assignee | ||
Comment 9•11 years ago
|
||
(In reply to :Ehsan Akhgari (needinfo? me!) from comment #8) > (In reply to comment #7) > > I can only call do_get_profile when runningInParent and there is only one ipc > > test (so no concurrency issues atm). > > I could change the function so that when not runningInParent it uses the > > XPCSHELL_TEST_PROFILE_DIR env variable. Is that ok? > > I think we should just use do_get_profile() unconditionally. Well as I said, that is not possible :). http://mxr.mozilla.org/mozilla-central/source/testing/xpcshell/head.js#927
Comment 10•11 years ago
|
||
Comment on attachment 772821 [details] [diff] [review] use the profile dir Review of attachment 772821 [details] [diff] [review]: ----------------------------------------------------------------- ::: toolkit/components/contentprefs/tests/unit/head_contentPrefs.js @@ +85,5 @@ > */ > getProfileDir: function ContentPrefTest_getProfileDir() { > + if (runningInParent) { > + return do_get_profile(); > + } It seems like this is not going to do the right thing if it's running in a child process. Does this code get run in a child process? If so, you should fix it to work properly there. If not, then you can probably do a lot more code removal in this test. ::: toolkit/components/contentprefs/tests/unit_ipc/xpcshell.ini @@ +2,5 @@ > head = head_contentPrefs.js > tail = tail_contentPrefs.js > > +# it these tests run in parallel you need to make getProfileDirectory > +# return the correct profile in the _child_ process I don't think putting a comment here is sufficient. We should fix the test.
Attachment #772821 -
Flags: review?(ted) → review-
Assignee | ||
Updated•11 years ago
|
Attachment #772821 -
Attachment is obsolete: true
Assignee | ||
Comment 12•11 years ago
|
||
Forgot to revert the manifest file.
Attachment #774286 -
Flags: review?(ted)
Assignee | ||
Updated•11 years ago
|
Attachment #774284 -
Attachment is obsolete: true
Attachment #774284 -
Flags: review?(ted)
Assignee | ||
Comment 13•11 years ago
|
||
try run: https://tbpl.mozilla.org/?tree=Try&rev=1d95bf4a7a89
Comment 14•11 years ago
|
||
Comment on attachment 774286 [details] [diff] [review] use the profile dir instead of the bin dir for contentpref xpcshell tests, Review of attachment 774286 [details] [diff] [review]: ----------------------------------------------------------------- If this works then it's fine. I'm sure there's more code that could be removed, but it's not terribly important.
Attachment #774286 -
Flags: review?(ted) → review+
Assignee | ||
Updated•11 years ago
|
Keywords: checkin-needed
Comment 15•11 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/90b078a81eef
Flags: in-testsuite-
Keywords: checkin-needed
Comment 16•11 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/90b078a81eef
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla25
You need to log in
before you can comment on or make changes to this bug.
Description
•