X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=test%2Fframework.py;h=2e3f9781e5d8960633721926280ba67ce1f30ca1;hb=ce111d2ee3bacec2a09d8f5b664dcfafa0dd50c7;hp=210eadbf4c56cc8826bc4a5fdad43b65fdd2eb1a;hpb=e178399942c655d0fea162611527ea57192669c0;p=vpp.git diff --git a/test/framework.py b/test/framework.py index 210eadbf4c5..2e3f9781e5d 100644 --- a/test/framework.py +++ b/test/framework.py @@ -747,6 +747,25 @@ class VppTestCase(unittest.TestCase): "Finished sleep (%s) - slept %ss (wanted %ss)" % ( remark, after - before, timeout)) + def send_and_assert_no_replies(self, intf, pkts, remark=""): + self.vapi.cli("clear trace") + intf.add_stream(pkts) + self.pg_enable_capture(self.pg_interfaces) + self.pg_start() + timeout = 1 + for i in self.pg_interfaces: + i.get_capture(0, timeout=timeout) + i.assert_nothing_captured(remark=remark) + timeout = 0.1 + + def send_and_expect(self, input, pkts, output): + self.vapi.cli("clear trace") + input.add_stream(pkts) + self.pg_enable_capture(self.pg_interfaces) + self.pg_start() + rx = output.get_capture(len(pkts)) + return rx + class TestCasePrinter(object): _shared_state = {}