Re: gtests that start XPCOM

2014-10-23 Thread Benoit Girard
Like Ted mentions GTest doesn't support running test in parallel -in the same process-, you have to launch multiple processes which the ./mach gtest command helps you do. Currently GTest has a ScopedXPCOM thing. I'm not sure exactly what this implies however:

gtests that start XPCOM

2014-10-22 Thread Benjamin Smedberg
Is there a mechanism for running single gtests that start XPCOM? With the current gtest mechanism, normal gtests can't start XPCOM (NS_InitXPCOM, event loops, component manager, etc) for various reasons: * gtests are run in parallel and XPCOM has globals and thread-locals which don't allow

Re: gtests that start XPCOM

2014-10-22 Thread Ted Mielczarek
On 10/22/2014 9:29 AM, Benjamin Smedberg wrote: Is there a mechanism for running single gtests that start XPCOM? Not that I know of currently. The gtest runner explicitly starts XPCOM before running tests[1]. With the current gtest mechanism, normal gtests can't start XPCOM (NS_InitXPCOM

Re: gtests that start XPCOM

2014-10-22 Thread Mike Hommey
On Wed, Oct 22, 2014 at 09:29:05AM -0400, Benjamin Smedberg wrote: Is there a mechanism for running single gtests that start XPCOM? With the current gtest mechanism, normal gtests can't start XPCOM (NS_InitXPCOM, event loops, component manager, etc) for various reasons: * gtests are run

Re: gtests that start XPCOM

2014-10-22 Thread Eric Rescorla
On Wed, Oct 22, 2014 at 4:05 PM, Ted Mielczarek t...@mielczarek.org wrote: On 10/22/2014 9:29 AM, Benjamin Smedberg wrote: Is there a mechanism for running single gtests that start XPCOM? Not that I know of currently. The gtest runner explicitly starts XPCOM before running tests[1

Re: gtests that start XPCOM

2014-10-22 Thread Kyle Huey
On Wed, Oct 22, 2014 at 6:29 AM, Benjamin Smedberg benja...@smedbergs.us wrote: Is there a mechanism for running single gtests that start XPCOM? With the current gtest mechanism, normal gtests can't start XPCOM (NS_InitXPCOM, event loops, component manager, etc) for various reasons: * gtests

Re: gtests that start XPCOM

2014-10-22 Thread Benjamin Smedberg
On 10/22/2014 10:49 AM, Kyle Huey wrote: I've been wanting this too. I was thinking about just making the gtest harness itself start XPCOM. - Kyle I don't think that's quite right. 1) We'd have to serialize a bunch of tests 2) it would be really easy for tests to interfere with eachother.