X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=test%2Fframework.py;h=c21d1882be761d7cf3be05e6d1db74a422a77a12;hb=7c0eb56f4;hp=46f7542ea547ed596ca2d5e3ec0aacc6f94186e0;hpb=d498c9eb2b70b744b6231d5db714422f8745caaf;p=vpp.git diff --git a/test/framework.py b/test/framework.py index 46f7542ea54..c21d1882be7 100644 --- a/test/framework.py +++ b/test/framework.py @@ -758,7 +758,12 @@ class VppTestCase(unittest.TestCase): @classmethod def get_vpp_time(cls): - return float(cls.vapi.cli('show clock').replace("Time now ", "")) + # processes e.g. "Time now 2.190522, Wed, 11 Mar 2020 17:29:54 GMT" + # returns float("2.190522") + timestr = cls.vapi.cli('show clock') + head, sep, tail = timestr.partition(',') + head, sep, tail = head.partition('Time now') + return float(tail) @classmethod def sleep_on_vpp_time(cls, sec):