[v2,09/10] autotest: update result for skipped test cases

Message ID 1531498808-21940-10-git-send-email-reshma.pattan@intel.com (mailing list archive)
State Superseded, archived
Headers
Series Make unit tests great again |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK

Commit Message

Pattan, Reshma July 13, 2018, 4:20 p.m. UTC
  Fixed in autotest_test_funcs.py to handle test cases
which returns "Skipped" as result.
The issue was skipped test cases got timed out,
causing delay in autotests execution.

Cc: stable@dpdk.org

Signed-off-by: Jananee Parthasarathy <jananeex.m.parthasarathy@intel.com>
Signed-off-by: Reshma Pattan <reshma.pattan@intel.com>
---
 test/test/autotest_test_funcs.py | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
  

Comments

Burakov, Anatoly July 13, 2018, 4:42 p.m. UTC | #1
On 13-Jul-18 5:20 PM, Reshma Pattan wrote:
> Fixed in autotest_test_funcs.py to handle test cases
> which returns "Skipped" as result.
> The issue was skipped test cases got timed out,
> causing delay in autotests execution.
> 
> Cc: stable@dpdk.org
> 
> Signed-off-by: Jananee Parthasarathy <jananeex.m.parthasarathy@intel.com>
> Signed-off-by: Reshma Pattan <reshma.pattan@intel.com>
> ---

Is this patch still applicable? Patch 5 in these series causes skipped 
tests to not get executed in the first place, so by the time we reach 
this patch it is no longer a problem, i think.
  

Patch

diff --git a/test/test/autotest_test_funcs.py b/test/test/autotest_test_funcs.py
index 65fe33539..219c20828 100644
--- a/test/test/autotest_test_funcs.py
+++ b/test/test/autotest_test_funcs.py
@@ -1,5 +1,5 @@ 
 # SPDX-License-Identifier: BSD-3-Clause
-# Copyright(c) 2010-2014 Intel Corporation
+# Copyright(c) 2010-2018 Intel Corporation
 
 # Test functions
 
@@ -12,12 +12,14 @@ 
 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", "Skipped", pexpect.TIMEOUT], timeout=900)
     if result == 1:
         return -1, "Fail"
     elif result == 2:
         return -1, "Fail [Not found]"
     elif result == 3:
+        return -1, "Fail [Test returns Skipped]"
+    elif result == 4:
         return -1, "Fail [Timeout]"
     return 0, "Success"