shekharpro / mb-unit

Automatically exported from code.google.com/p/mb-unit
0 stars 0 forks source link

Feature: IsolatedProcessPerAssembly Runner #441

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Some of our application level test suites require running each test
assembly in its own process so that native static initialization happens
correctly. Getting this working requires a version of the IsolatedProcess
runner that runs each of the assemblies in a new process of its own instead
of all of the assemblies in one new process.

Based on emails between Jeff and I, he was planning on adding this for the
3.0.7 release. I have a version of this as a plugin that I can move into
the main source if required. Just let me know and I will do the work and
submit a patch.

Original issue reported on code.google.com by rpro...@gmail.com on 4 May 2009 at 7:22

GoogleCodeExporter commented 8 years ago
Attached is a patch rooted in the src directory that adds a new test runner 
called
IsolatedProcessPerAssembly. It modifies the HostedTestDriverFactory, giving it 
a new
property HostPerAssembly which is set in gallio.plugin. The created 
HostedTestDriver
then acts accordingly.

Please review the change of the location of the creation of the Listener in the 
base
AggregateTestDriver. Without this move, a new Listener was created for each test
process so only the report for the last run assembly was showing up.

I also modified the Processor Architecture code so that when you run with 
multiple
processes, it will run each of those processes with the correct architecture. I 
have
added a unit test to HostedTestDriverTest for this.

Original comment by rpro...@gmail.com on 5 May 2009 at 6:16

Attachments:

GoogleCodeExporter commented 8 years ago

Original comment by jeff.br...@gmail.com on 13 May 2009 at 6:21

GoogleCodeExporter commented 8 years ago
I have applied the patch with a few minor changes.

I think your intuition about the Listener is correct and that the old code was
broken.  What worries me is that this implies other people may have been getting
incomplete test reports whenever there were multiple test partitions.  I'm 
surprised
I haven't noticed this myself...

Original comment by jeff.br...@gmail.com on 20 May 2009 at 7:49