diff options
author | Benoît Ganne <bganne@cisco.com> | 2021-08-20 09:18:31 +0200 |
---|---|---|
committer | Damjan Marion <dmarion@me.com> | 2021-11-22 16:44:26 +0000 |
commit | 56eccdbaa982a6aff16fbc2a651fd024ecc589a8 (patch) | |
tree | 9ad2dfae55bf356d6c03b328744d690c64f8e0ef /test/framework.py | |
parent | f33979ba88111be3b7935ea90172422e4d4a114b (diff) |
vlib: add virtual time support
Type: feature
Change-Id: Iabd76558e9c72ed8286cfeeb1fbaa4fde4832a90
Signed-off-by: Benoît Ganne <bganne@cisco.com>
Diffstat (limited to 'test/framework.py')
-rw-r--r-- | test/framework.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/test/framework.py b/test/framework.py index 486553befa1..02e455b1223 100644 --- a/test/framework.py +++ b/test/framework.py @@ -1284,6 +1284,10 @@ class VppTestCase(CPUInterface, unittest.TestCase): "Finished sleep (%s) - slept %es (wanted %es)", remark, after - before, timeout) + def virtual_sleep(self, timeout, remark=None): + self.logger.debug("Moving VPP time by %s (%s)", timeout, remark) + self.vapi.cli("set clock adjust %s" % timeout) + def pg_send(self, intf, pkts, worker=None, trace=True): intf.add_stream(pkts, worker=worker) self.pg_enable_capture(self.pg_interfaces) |