Some test layers don't support being torn down in-process. To properly tear down these, the test runner starts a new sub process. When doing this, sys.stdin gets replaced with FakeInputContinueGenerator, which causes a failure when firefox is being started in BaseWindmillLayer:
lilium:/devel/launchpad/windmill-image-test> bin/test -vvv --test=test_bug_commenting --test=doc/bugwatch.txt --layer=Layer
Running tests at level 1
Running canonical.testing.layers.LaunchpadZopelessLayer tests:
Set up canonical.testing.layers.BaseLayer in 0.003 seconds.
Set up canonical.testing.layers.ZopelessLayer in 3.076 seconds.
Set up canonical.testing.layers.DatabaseLayer in 0.390 seconds.
Set up canonical.testing.layers.LibrarianLayer in 8.557 seconds.
Set up canonical.testing.layers.LaunchpadLayer in 0.000 seconds.
Set up canonical.testing.layers.LaunchpadScriptLayer in 0.003 seconds.
Set up canonical.testing.layers.LaunchpadZopelessLayer in 0.000 seconds.
Running:
lib/lp/bugs/tests/../doc/bugwatch.txt (8.557 s)
Ran 34 tests with 0 failures and 0 errors in 9.310 seconds.
Running lp.bugs.windmill.testing.BugsWindmillLayer tests:
Tear down canonical.testing.layers.LaunchpadZopelessLayer in 0.000 seconds.
Tear down canonical.testing.layers.LaunchpadScriptLayer ... not supported
Running in a subprocess.
Set up canonical.testing.layers.BaseLayer in 0.350 seconds.
Set up canonical.testing.layers.DatabaseLayer in 0.359 seconds.
Set up canonical.testing.layers.LibrarianLayer in 8.407 seconds.
Set up canonical.testing.layers.LaunchpadLayer in 0.000 seconds.
Set up canonical.testing.layers.FunctionalLayer in 5.869 seconds.
Set up canonical.testing.layers.GoogleServiceLayer in 2.735 seconds.
Set up canonical.testing.layers.LaunchpadFunctionalLayer in 0.000 seconds.
Set up canonical.testing.layers.AppServerLayer in 11.656 seconds.
Set up canonical.testing.layers.BaseWindmillLayer in 0.000 seconds.
Set up lp.bugs.windmill.testing.BugsWindmillLayer
Traceback (most recent call last):
File "/devel/launchpad/rocketfuel/eggs/zope.testing-3.8.1-py2.5.egg/zope/testing/testrunner/runner.py", line 364, in run_layer
setup_layer(options, layer, setup_layers)
File "/devel/launchpad/rocketfuel/eggs/zope.testing-3.8.1-py2.5.egg/zope/testing/testrunner/runner.py", line 629, in setup_layer
layer.setUp()
File "/devel/launchpad/windmill-image-test/lib/canonical/testing/profiled.py", line 25, in profiled_func
return func(cls, *args, **kw)
File "/devel/launchpad/windmill-image-test/lib/canonical/testing/layers.py", line 1728, in setUp
cls.shell_objects = start_windmill()
File "/devel/launchpad/rocketfuel/eggs/windmill-1.3beta3_lp_r1440-py2.5.egg/windmill/bin/admin_lib.py", line 349, in start_windmill
shell_objects = setup()
File "/devel/launchpad/rocketfuel/eggs/windmill-1.3beta3_lp_r1440-py2.5.egg/windmill/bin/admin_lib.py", line 182, in setup
shell_objects_dict['browser'] = getattr(shell_objects, browser[0].lower())()
File "/devel/launchpad/rocketfuel/eggs/windmill-1.3beta3_lp_r1440-py2.5.egg/windmill/bin/shell_objects.py", line 45, in start_firefox
controller.start()
File "/devel/launchpad/rocketfuel/eggs/windmill-1.3beta3_lp_r1440-py2.5.egg/windmill/dep/_mozrunner/runner.py", line 138, in start
self.process_handler = run_command(self.command, self.mozilla_env)
File "/devel/launchpad/rocketfuel/eggs/windmill-1.3beta3_lp_r1440-py2.5.egg/windmill/dep/_mozrunner/runner.py", line 60, in run_command
return killableprocess.Popen(cmd, preexec_fn=lambda : os.setpgid(0, 0), env=env, **kwargs)
File "/usr/lib/python2.5/subprocess.py", line 587, in __init__
errread, errwrite) = self._get_handles(stdin, stdout, stderr)
File "/usr/lib/python2.5/subprocess.py", line 938, in _get_handles
p2cread = stdin.fileno()
AttributeError: FakeInputContinueGenerator instance has no attribute 'fileno'
Tear down canonical.testing.layers.BaseWindmillLayer in 0.170 seconds.
Tear down canonical.testing.layers.AppServerLayer in 0.531 seconds.
Tear down canonical.testing.layers.LaunchpadFunctionalLayer in 0.000 seconds.
Tear down canonical.testing.layers.LaunchpadLayer in 0.000 seconds.
Tear down canonical.testing.layers.DatabaseLayer in 0.175 seconds.
Tear down canonical.testing.layers.LibrarianLayer in 0.336 seconds.
Tear down canonical.testing.layers.FunctionalLayer ... not supported
Tear down canonical.testing.layers.GoogleServiceLayer in 0.058 seconds.
Tear down canonical.testing.layers.BaseLayer in 0.000 seconds.
Tests with errors:
runTest (zope.testing.testrunner.runner.SetUpLayerFailure)
Total: 34 tests, 0 failures, 1 errors in 1 minutes 8.133 seconds.
Fixed in devel r10040 <http:// bazaar. launchpad. net/~launchpad- pqm/launchpad/ devel/revision/ 10040>