test suite reviews and discussions
 help / color / mirror / Atom feed
* [dts] [PATCH V2] fix ptpclient case failed because of tester and dut time zone different
@ 2017-08-18  8:16 xu,huilong
  2017-08-18  8:16 ` [dts] [PATCH V2] update dpdk test case checklist xu,huilong
  2017-08-18 17:43 ` [dts] [PATCH V2] fix ptpclient case failed because of tester and dut time zone different Liu, Yong
  0 siblings, 2 replies; 4+ messages in thread
From: xu,huilong @ 2017-08-18  8:16 UTC (permalink / raw)
  To: dts; +Cc: xu,huilong

ptpclint test case will sync time with tester and dut. But when tester
and dut time zone not different,test time and dut time not different,
so use UTC time for get tester and dut time

Signed-off-by: xu,huilong <huilongx.xu@intel.com>
---
 tests/TestSuite_ptpclient.py | 13 ++++---------
 1 file changed, 4 insertions(+), 9 deletions(-)

diff --git a/tests/TestSuite_ptpclient.py b/tests/TestSuite_ptpclient.py
index f038bef..f68c81b 100644
--- a/tests/TestSuite_ptpclient.py
+++ b/tests/TestSuite_ptpclient.py
@@ -146,15 +146,10 @@ class TestPtpClient(TestCase):
 
         self.creat_table(Delta_us)
 
-        tester_out = self.tester.send_expect("date '+%Y-%m-%d %H:%M'", "# ")
-        dut_out = self.dut.send_expect("date '+%Y-%m-%d %H:%M'", "# ")
-
-        if tester_out == dut_out:
-            self.verify(tester_out == dut_out, "the DUT time synchronous error")
-        else:
-            tester_out = self.tester.send_expect("date '+%Y-%m-%d %H:%M'", "# ")
-            dut_out = self.dut.send_expect("date '+%Y-%m-%d %H:%M'", "# ")
-            self.verify(tester_out == dut_out, "the DUT time synchronous error")
+        tester_out = self.tester.send_expect("date -u '+%Y-%m-%d %H:%M'", "# ")
+        dut_out = self.dut.send_expect("date -u '+%Y-%m-%d %H:%M'", "# ")
+
+        self.verify(tester_out == dut_out, "the DUT time synchronous error")
 
     def tear_down(self):
         """
-- 
1.9.3

^ permalink raw reply	[flat|nested] 4+ messages in thread
* [dts] [PATCH V2] fix ptpclient case failed because of tester and dut time zone different
@ 2017-08-18  6:14 xu,huilong
  0 siblings, 0 replies; 4+ messages in thread
From: xu,huilong @ 2017-08-18  6:14 UTC (permalink / raw)
  To: dts; +Cc: xu,huilong

ptpclint test case will sync time with tester and dut. But when tester
and dut time zone not different,test time and dut time not different,
so use UTC time for get tester and dut time

Signed-off-by: xu,huilong <huilongx.xu@intel.com>
---
 tests/TestSuite_ptpclient.py | 13 ++++---------
 1 file changed, 4 insertions(+), 9 deletions(-)

diff --git a/tests/TestSuite_ptpclient.py b/tests/TestSuite_ptpclient.py
index f038bef..f68c81b 100644
--- a/tests/TestSuite_ptpclient.py
+++ b/tests/TestSuite_ptpclient.py
@@ -146,15 +146,10 @@ class TestPtpClient(TestCase):
 
         self.creat_table(Delta_us)
 
-        tester_out = self.tester.send_expect("date '+%Y-%m-%d %H:%M'", "# ")
-        dut_out = self.dut.send_expect("date '+%Y-%m-%d %H:%M'", "# ")
-
-        if tester_out == dut_out:
-            self.verify(tester_out == dut_out, "the DUT time synchronous error")
-        else:
-            tester_out = self.tester.send_expect("date '+%Y-%m-%d %H:%M'", "# ")
-            dut_out = self.dut.send_expect("date '+%Y-%m-%d %H:%M'", "# ")
-            self.verify(tester_out == dut_out, "the DUT time synchronous error")
+        tester_out = self.tester.send_expect("date -u '+%Y-%m-%d %H:%M'", "# ")
+        dut_out = self.dut.send_expect("date -u '+%Y-%m-%d %H:%M'", "# ")
+
+        self.verify(tester_out == dut_out, "the DUT time synchronous error")
 
     def tear_down(self):
         """
-- 
1.9.3

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

end of thread, other threads:[~2017-08-18  8:59 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-18  8:16 [dts] [PATCH V2] fix ptpclient case failed because of tester and dut time zone different xu,huilong
2017-08-18  8:16 ` [dts] [PATCH V2] update dpdk test case checklist xu,huilong
2017-08-18 17:43 ` [dts] [PATCH V2] fix ptpclient case failed because of tester and dut time zone different Liu, Yong
  -- strict thread matches above, loose matches on Subject: below --
2017-08-18  6:14 xu,huilong

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).