Open
Bug 844279
Opened 11 years ago
Updated 2 years ago
Integrate GTest with TestHarness.h
Categories
(Testing :: GTest, defect)
Tracking
(Not tracked)
NEW
People
(Reporter: BenWa, Unassigned)
References
Details
Attachments
(1 file, 1 obsolete file)
24.76 KB,
patch
|
Details | Diff | Splinter Review |
This was original planned with bug 767231 but I reduced to scope to speed up the landing. This still needs to be done. See attachment 635578 [details] [diff] [review] in bug 767231 for a WIP.
Comment 1•11 years ago
|
||
Assignee: nobody → brian
Status: NEW → ASSIGNED
Comment 2•11 years ago
|
||
Attachment #793088 -
Attachment is obsolete: true
Comment 3•11 years ago
|
||
Now that I look at this, there is not much to it. ASSERT_NSRESULT_SUCCEEDED and ASSERT_NSRESULT_FAILED seem useful and the automatic logging configuration seems useful. The part that is missing is the use of ScopedXPCOM to start up and shut down XPCOM. I am nervous about the idea of starting up XPCOM and shutting it down multiple times in the same process, especially since nothing else seems to do that. In the old version of this patch, main() instantiated a ScopedXPCOM instance that lived across all the invocations of all the tests. That had the advantage of avoiding multiple instantiations of XPCOM but it had the disadvantage of reducing the isolation of each test from the others. Now, there's the further complication that main() is already provided by the non-XPCOM GTestRunner so it is not trivial to just add it to main(), especially since we don't want non-XPCOM GTests to start up or shut down XPCOM.
Reporter | ||
Comment 4•11 years ago
|
||
(In reply to Brian Smith (:briansmith, was :bsmith@mozilla.com) from comment #3) > Now that I look at this, there is not much to it. ASSERT_NSRESULT_SUCCEEDED > and ASSERT_NSRESULT_FAILED seem useful and the automatic logging > configuration seems useful. > > The part that is missing is the use of ScopedXPCOM to start up and shut down > XPCOM. I am nervous about the idea of starting up XPCOM and shutting it down > multiple times in the same process, especially since nothing else seems to > do that. Right, initially I wanted to do something like that but someone pointed out that this likely would be stable. Not a fan of the overhead of starting a new gecko process per test either (great for flaky tests though ^-^). Thus GTest currently gets a global ScopedXPCOM pointer. Ignore the bad name for it: http://mxr.mozilla.org/mozilla-central/source/testing/gtest/mozilla/GTestRunner.cpp#85
Updated•10 years ago
|
Assignee: brian → nobody
Updated•6 years ago
|
Component: General → GTest
Comment 6•6 years ago
|
||
No assignee, updating the status.
Comment 7•6 years ago
|
||
No assignee, updating the status.
Comment 8•6 years ago
|
||
No assignee, updating the status.
Updated•2 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•