Skip to content

Commit 1376674

Browse files
committed
setup.py: log test returncode from VM
I'm seeing some spurious failures on Travis where the tests pass in the VM but setup.py reports that they failed. Log the returncode that setup.py sees to narrow down the issue.
1 parent a3248b5 commit 1376674

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

setup.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -180,15 +180,14 @@ def _run_vm(self, **kwds):
180180
]
181181
if self.verbose:
182182
args.append("-v")
183-
return (
184-
vm.run(
185-
args, cwd=os.getcwd(), env={"DRGN_RUN_LINUX_HELPER_TESTS": "1"}
186-
).returncode
187-
== 0
188-
)
183+
returncode = vm.run(
184+
args, cwd=os.getcwd(), env={"DRGN_RUN_LINUX_HELPER_TESTS": "1"}
185+
).returncode
189186
except vmtest.vm.LostVMError as e:
190187
self.announce(f"error: {e}", log.ERROR)
191188
return False
189+
self.announce(f"Tests in VM returned {returncode}", log.INFO)
190+
return returncode == 0
192191

193192
def run(self):
194193
import vmtest.build

0 commit comments

Comments
 (0)