[V1] tests/ice_dcf_disable_acl_filter:optimize code for testpmd status flag
Checks
Commit Message
if the case validation failed,the testpmd_status will not be assigned value.
Signed-off-by: Zhimin Huang <zhiminx.huang@intel.com>
---
tests/TestSuite_ice_dcf_disable_acl_filter.py | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
@@ -234,11 +234,11 @@ class TestICEDCFDisableACLFilter(TestCase):
# get the average
avg_start_up_time_acl_on = sum(start_up_time_acl_on) / repeat_time
avg_start_up_time_acl_off = sum(start_up_time_acl_off) / repeat_time
+ self.testpmd_status = "close"
self.verify(
avg_start_up_time_acl_on > avg_start_up_time_acl_off,
"disable acl to reduce startup time failed!!!",
)
- self.testpmd_status = "close"
def test_disable_acl(self):
"""
@@ -267,9 +267,8 @@ class TestICEDCFDisableACLFilter(TestCase):
self.logger.warning((RED(e)))
self.logger.info((GREEN("case failed: %s" % subcase["name"])))
subcases["result"].append(False)
- self.verify(all(subcases["result"]), "test disable acl engine failed.")
-
self.testpmd_status = "open"
+ self.verify(all(subcases["result"]), "test disable acl engine failed.")
def quit_testpmd(self):
"""