Skip to content

Commit

Permalink
test: fix autotest handling of skipped tests
Browse files Browse the repository at this point in the history
[ upstream commit c8c3cfd ]

- When running the default configuration of autotest of the make test
  it'd take 900 seconds (15 minutes) for the script TIMEOUT and marks
  Failed for a specific device test that is not supported on the
  system under test.
- Adding the checking for those tests, print out as "Skipped [Not Run]"
  quickly return and continue for next test

Fixes: da0af48 ("test: add skipped return result")

Signed-off-by: Thinh Tran <thinhtr@linux.vnet.ibm.com>
Reviewed-by: David Christensen <drc@linux.vnet.ibm.com>
  • Loading branch information
ThinhTrTran authored and cpaelzer committed May 11, 2021
1 parent 616e4fe commit 874a929
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion app/test/autotest_test_funcs.py
Expand Up @@ -12,13 +12,16 @@
def default_autotest(child, test_name):
child.sendline(test_name)
result = child.expect(["Test OK", "Test Failed",
"Command not found", pexpect.TIMEOUT], timeout=900)
"Command not found", pexpect.TIMEOUT,
"Test Skipped"], timeout=900)
if result == 1:
return -1, "Fail"
elif result == 2:
return -1, "Fail [Not found]"
elif result == 3:
return -1, "Fail [Timeout]"
elif result == 4:
return 0, "Skipped [Not Run]"
return 0, "Success"

# autotest used to run dump commands
Expand Down

0 comments on commit 874a929

Please sign in to comment.