Skip to content
This repository was archived by the owner on Aug 5, 2022. It is now read-only.

Commit b140335

Browse files
committed
Legacy tests: display return code on test-platform crash
In order to help debuging test-platform unexpected stops, add its return code in the error message on such event. Signed-off-by: Kevin Rocard <kevin.rocard@intel.com>
1 parent bc0ce90 commit b140335

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/functional-tests-legacy/Util/PfwUnitTestLib.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ def sendCmd(self, cmd, *args, **kwargs):
5050
"""
5151
expectSuccess=kwargs.get("expectSuccess", True)
5252

53-
assert self.remoteProcess.poll() == None, "Can not send command to Test platform as it has died."
53+
assert self.remoteProcess.poll() == None, "Can not send command to Test platform as it has died. Return code: %s" % self.remoteProcess.returncode
5454

5555
sys_cmd = self.platform_command + [cmd]
5656
if args is not None:
@@ -86,7 +86,7 @@ def startHal(self):
8686
self.setRemoteProcess(subprocess.Popen(cmd))
8787
# Wait for the test-platform listening socket
8888
while socket.socket().connect_ex(("localhost", self.testPlatformPort)) != 0:
89-
assert self.remoteProcess.poll() == None, "Test platform has failed to start."
89+
assert self.remoteProcess.poll() == None, "Test platform has failed to start. Return code: %s" % self.remoteProcess.returncode
9090
time.sleep(0.01)
9191

9292
# Send command "stop" to the HAL

0 commit comments

Comments
 (0)