Code Review
/
vpp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
vppinfra: refactor clib_timebase_t
[vpp.git]
/
test
/
framework.py
diff --git
a/test/framework.py
b/test/framework.py
index
46f7542
..
c21d188
100644
(file)
--- a/
test/framework.py
+++ b/
test/framework.py
@@
-758,7
+758,12
@@
class VppTestCase(unittest.TestCase):
@classmethod
def get_vpp_time(cls):
@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):
@classmethod
def sleep_on_vpp_time(cls, sec):