test suite reviews and discussions
 help / color / mirror / Atom feed
* [dts] [PATCH V1] tests/ptpclient: optimize script
@ 2023-03-31 14:08 Song Jiale
  2023-04-11  7:56 ` lijuan.tu
  0 siblings, 1 reply; 2+ messages in thread
From: Song Jiale @ 2023-03-31 14:08 UTC (permalink / raw)
  To: dts; +Cc: Song Jiale

increase regular expressions to capture time to eliminate interference
from other echoes.

Signed-off-by: Song Jiale <songx.jiale@intel.com>
---
 tests/TestSuite_ptpclient.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/tests/TestSuite_ptpclient.py b/tests/TestSuite_ptpclient.py
index 55ef98ff..1175e98a 100644
--- a/tests/TestSuite_ptpclient.py
+++ b/tests/TestSuite_ptpclient.py
@@ -104,7 +104,8 @@ class TestPtpClient(TestCase):
 
         # set the dut system time
         self.dut.send_expect("date -s '2000-01-01 00:00:00'", "# ")
-        d_time = self.dut.send_expect("date '+%Y-%m-%d %H:%M'", "# ")
+        out = self.dut.send_expect("date '+%Y-%m-%d %H:%M'", "# ")
+        d_time = re.findall(r"(\d{4}-\d{2}-\d{2}\s\d{2}:\d{2})", out)[0]
         self.verify(d_time == "2000-01-01 00:00", "set the time error")
 
         if self.nic in ["cavium_a063", "cavium_a064"]:
-- 
2.25.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

* [dts] [PATCH V1] tests/ptpclient: optimize script
  2023-03-31 14:08 [dts] [PATCH V1] tests/ptpclient: optimize script Song Jiale
@ 2023-04-11  7:56 ` lijuan.tu
  0 siblings, 0 replies; 2+ messages in thread
From: lijuan.tu @ 2023-04-11  7:56 UTC (permalink / raw)
  To: dts, Song Jiale; +Cc: Song Jiale

On Fri, 31 Mar 2023 14:08:06 +0000, Song Jiale <songx.jiale@intel.com> wrote:
> increase regular expressions to capture time to eliminate interference
> from other echoes.
> 
> Signed-off-by: Song Jiale <songx.jiale@intel.com>


Applied, thanks

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-04-11  7:56 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-31 14:08 [dts] [PATCH V1] tests/ptpclient: optimize script Song Jiale
2023-04-11  7:56 ` lijuan.tu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).