Skip to contentSkip to conversation

test/autotest: checking for skipped or unsupported tests

PATCH Applied Thinh Tran 4 participants 4 messages Mar 2, 2020 – Mar 25, 2021

lore
Share & tools
lore

Thinh Tran

author
#0 lore raw

PATCH 1/1 test/autotest: checking for skipped or unsupported tests

- When running the dedault 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

---
 app/test/autotest_test_funcs.py | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
app/test/autotest_test_funcs.py +4 -1
index 26688b713..0ff17f75f 100644
@@ -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

--
2.17.1

#1 lore raw

We are missing a review for this patch, please.

02/03/2020 21:41, Thinh Tran:

Quoted 27 lines

- When running the dedault 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

---

app/test/autotest_test_funcs.py +4 -1
@@ -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"
Reviewed-by on v1 1/1
#2 lore raw
In reply to Thinh Tran

]> - When running the dedault configuration of autotest of the make test

Quoted 8 lines

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

---

Reviewed-by David Christensen Applied
#3 lore raw
Quoted 7 lines · David Christensen
Quoted 7 lines

- When running the dedault 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 da0af48a67a5 ("test: add skipped return result")
Quoted 2 lines
Quoted 2 lines

Applied, thanks.

Signature · 1 line
David Marchand