summaryrefslogtreecommitdiff
path: root/buildscripts
diff options
context:
space:
mode:
authorBilly Donahue <billy.donahue@mongodb.com>2019-09-30 06:52:38 +0000
committerevergreen <evergreen@mongodb.com>2019-09-30 06:52:38 +0000
commitc8b9b377df703d7941ba291d9ce504a27440c093 (patch)
tree9117b01834d0491751704e889a3e32b937e49376 /buildscripts
parent68430074ea3a54f33f127f343b639016da8f178f (diff)
downloadmongo-c8b9b377df703d7941ba291d9ce504a27440c093.tar.gz
SERVER-43659 better diagnostics on resmoke subprocess errors
Diffstat (limited to 'buildscripts')
-rw-r--r--buildscripts/resmokelib/selector.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/buildscripts/resmokelib/selector.py b/buildscripts/resmokelib/selector.py
index 5880e2b3c9f..35e094084c7 100644
--- a/buildscripts/resmokelib/selector.py
+++ b/buildscripts/resmokelib/selector.py
@@ -90,11 +90,12 @@ class TestFileExplorer(object):
def list_dbtests(self, dbtest_binary):
"""List the available dbtests suites."""
- returncode, stdout = self._run_program(dbtest_binary, ["--list"])
+ returncode, stdout, stderr = self._run_program(dbtest_binary, ["--list"])
if returncode != 0:
- raise errors.ResmokeError("Getting list of dbtest suites failed")
-
+ raise errors.ResmokeError("Getting list of dbtest suites failed"
+ ", dbtest_binary=`{}`: stdout=`{}`, stderr=`{}`".format(
+ dbtest_binary, stdout, stderr))
return stdout.splitlines()
@staticmethod
@@ -109,10 +110,9 @@ class TestFileExplorer(object):
"""
command = [binary]
command.extend(args)
- program = subprocess.Popen(command, stdout=subprocess.PIPE)
- stdout = program.communicate()[0]
-
- return program.returncode, stdout.decode("utf-8")
+ program = subprocess.Popen(command, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
+ stdout, stderr = program.communicate()
+ return program.returncode, stdout.decode("utf-8"), stderr.decode("utf-8")
@staticmethod
def parse_tag_file(test_kind):