aboutsummaryrefslogtreecommitdiff
path: root/run_unittests.py
diff options
context:
space:
mode:
Diffstat (limited to 'run_unittests.py')
-rwxr-xr-xrun_unittests.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/run_unittests.py b/run_unittests.py
index e8d4751..1e9aa5b 100755
--- a/run_unittests.py
+++ b/run_unittests.py
@@ -202,9 +202,12 @@ class BasePlatformTests(unittest.TestCase):
os.environ = self.orig_env
super().tearDown()
- def _run(self, command):
- self.output += subprocess.check_output(command, stderr=subprocess.STDOUT,
- env=os.environ.copy())
+ def _run(self, command, return_output=False):
+ output = subprocess.check_output(command, stderr=subprocess.STDOUT,
+ env=os.environ.copy())
+ self.output += output
+ if return_output:
+ return output
def init(self, srcdir, extra_args=None, default_args=True):
if extra_args is None: