[scripts] add packet verification framework (#4428)

This commit introduces the packet verification (PV) framework for
certification tests.

- Add packet verification framework code

- Implement packet verification for cert 5.1.7 as a minimal
  example. There will be more 1.1/1.2 tests with PV submitted in the
  future.

- Download pre-built thread-wireshark binaries from
  openthread/wireshark/releases for packet dissecting (used by
  pyshark)

- Added a Github Action job for Packet Verification
This commit is contained in:
Simon Lin
2020-08-11 09:26:28 -07:00
committed by GitHub
parent 6dddd555e4
commit ecd9436427
29 changed files with 4132 additions and 16 deletions
+14 -3
View File
@@ -112,7 +112,13 @@ class RealTime(BaseSimulator):
time.sleep(duration)
def stop(self):
pass
if self.is_running:
# self._sniffer.stop() # FIXME: seems it blocks forever
self._sniffer = None
@property
def is_running(self):
return self._sniffer is not None
class VirtualTime(BaseSimulator):
@@ -170,8 +176,13 @@ class VirtualTime(BaseSimulator):
self.stop()
def stop(self):
self.sock.close()
self.sock = None
if self.sock:
self.sock.close()
self.sock = None
@property
def is_running(self):
return self.sock is not None
def _add_message(self, nodeid, message_obj):
addr = ('127.0.0.1', self.port + nodeid)