Bug 1234577: Call poll() correctly for non-interactive process handlers; r?ahal draft
authorSyd Polk <spolk@mozilla.com>
Wed, 23 Dec 2015 12:42:02 -0600
changeset 317383 3a85ac1cc574155de932876d62f9e34c8789a39a
parent 316994 ad16863d1d45bd3fd7906c76fa1ac1e12d24a133
child 512285 a85be736259d1af675b2804c10c2e9d960191177
push id8685
push userspolk@mozilla.com
push dateWed, 23 Dec 2015 18:43:13 +0000
reviewersahal
bugs1234577
milestone46.0a1
Bug 1234577: Call poll() correctly for non-interactive process handlers; r?ahal
testing/mozbase/mozrunner/mozrunner/base/runner.py
testing/mozbase/mozrunner/setup.py
--- a/testing/mozbase/mozrunner/mozrunner/base/runner.py
+++ b/testing/mozbase/mozrunner/mozrunner/base/runner.py
@@ -68,17 +68,20 @@ class BaseRunner(object):
         The returncode of the process_handler. A value of None
         indicates the process is still running. A negative
         value indicates the process was killed with the
         specified signal.
 
         :raises: RunnerNotStartedError
         """
         if self.process_handler:
-            return self.process_handler.poll()
+            if isinstance(self.process_handler, subprocess.Popen):
+                return self.process_handler.poll()
+            else:
+                return self.process_handler.proc.poll()
         else:
             raise RunnerNotStartedError("returncode accessed before runner started")
 
     def start(self, debug_args=None, interactive=False, timeout=None, outputTimeout=None):
         """
         Run self.command in the proper environment.
 
         :param debug_args: arguments for a debugger
--- a/testing/mozbase/mozrunner/setup.py
+++ b/testing/mozbase/mozrunner/setup.py
@@ -1,17 +1,17 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this file,
 # You can obtain one at http://mozilla.org/MPL/2.0/.
 
 import sys
 from setuptools import setup, find_packages
 
 PACKAGE_NAME = 'mozrunner'
-PACKAGE_VERSION = '6.11'
+PACKAGE_VERSION = '6.12'
 
 desc = """Reliable start/stop/configuration of Mozilla Applications (Firefox, Thunderbird, etc.)"""
 
 deps = ['mozdevice >= 0.37',
         'mozfile >= 1.0',
         'mozinfo >= 0.7',
         'mozlog >= 3.0',
         'mozprocess >= 0.22',