[v2,5/9] test/bbdev: improve timeout message format
Checks
Commit Message
Print more info and format message for test timeouts.
No functional impact.
Signed-off-by: Hernan Vargas <hernan.vargas@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
app/test-bbdev/test-bbdev.py | 22 ++++++++++++++++++----
1 file changed, 18 insertions(+), 4 deletions(-)
@@ -108,15 +108,29 @@ def kill(process):
try:
output = subprocess.run(call_params, timeout=args.timeout, universal_newlines=True)
except subprocess.TimeoutExpired as e:
+ print("===========================================================")
print("Starting Test Suite : BBdev TimeOut Tests")
+ print("INFO: One of the tests timed out {}".format(e))
+ print("INFO: Unexpected Error")
+ print("+ ------------------------------------------------------- +")
print("== test: timeout")
- print("TestCase [ 0] : timeout passed")
- print(" + Tests Failed : 1")
print("Unexpected Error")
+ print("TestCase [ 0] : timeout failed")
+ print(" + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +")
+ print(" + Tests Failed : 1")
+ print(" + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +")
+ exit_status = 1
if output.returncode < 0:
+ print("===========================================================")
print("Starting Test Suite : BBdev Exception Tests")
+ print("INFO: One of the tests returned {}".format(output.returncode))
+ print("INFO: Unexpected Error")
+ print("+ ------------------------------------------------------- +")
print("== test: exception")
- print("TestCase [ 0] : exception passed")
- print(" + Tests Failed : 1")
print("Unexpected Error")
+ print("TestCase [ 0] : exception failed")
+ print(" + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +")
+ print(" + Tests Failed : 1")
+ print(" + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +")
+ exit_status = 1
sys.exit(exit_status)