X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=test%2Fframework.py;h=f39794f22cf23af3b6bb7745ace20f153d7f0ed3;hb=0157885517dcc0236b4719d4fc0ad789b3a15187;hp=a7a3e2fdea7b53dbaa771acff6d3ab72ab676c4f;hpb=738cf73b2c5e396a56b8fab19b64a07b171cb14c;p=vpp.git diff --git a/test/framework.py b/test/framework.py index a7a3e2fdea7..f39794f22cf 100644 --- a/test/framework.py +++ b/test/framework.py @@ -329,7 +329,7 @@ class VppTestCase(CPUInterface, unittest.TestCase): """ extra_vpp_statseg_config = "" - extra_vpp_punt_config = [] + extra_vpp_config = [] extra_vpp_plugin_config = [] logger = null_logger vapi_response_timeout = 5 @@ -538,8 +538,8 @@ class VppTestCase(CPUInterface, unittest.TestCase): ] ) - if cls.extra_vpp_punt_config is not None: - cls.vpp_cmdline.extend(cls.extra_vpp_punt_config) + if cls.extra_vpp_config is not None: + cls.vpp_cmdline.extend(cls.extra_vpp_config) if not cls.debug_attach: cls.logger.info("vpp_cmdline args: %s" % cls.vpp_cmdline) @@ -931,7 +931,7 @@ class VppTestCase(CPUInterface, unittest.TestCase): vpp_api_trace_log = "%s/%s" % (self.tempdir, api_trace) self.logger.info(self.vapi.ppcli("api trace save %s" % api_trace)) self.logger.info("Moving %s to %s\n" % (tmp_api_trace, vpp_api_trace_log)) - os.rename(tmp_api_trace, vpp_api_trace_log) + shutil.move(tmp_api_trace, vpp_api_trace_log) except VppTransportSocketIOError: self.logger.debug( "VppTransportSocketIOError: Vpp dead. Cannot log show commands." @@ -1511,13 +1511,15 @@ class VppTestCase(CPUInterface, unittest.TestCase): f"{stats_snapshot[cntr][:, sw_if_index].sum()}, " f"expected diff: {diff})", ) - except IndexError: + except IndexError as e: # if diff is 0, then this most probably a case where # test declares multiple interfaces but traffic hasn't # passed through this one yet - which means the counter # value is 0 and can be ignored if 0 != diff: - raise + raise Exception( + f"Couldn't sum counter: {cntr} on sw_if_index: {sw_if_index}" + ) from e def send_and_assert_no_replies( self, intf, pkts, remark="", timeout=None, stats_diff=None, trace=True, msg=None