From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id 7F2127CBA for ; Fri, 18 Aug 2017 10:15:04 +0200 (CEST) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 18 Aug 2017 01:15:03 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.41,391,1498546800"; d="scan'208";a="1184186177" Received: from unknown (HELO dpdk-fedora20.icx.intel.com) ([10.240.176.135]) by fmsmga001.fm.intel.com with ESMTP; 18 Aug 2017 01:15:02 -0700 From: "xu,huilong" To: dts@dpdk.org Cc: "xu,huilong" Date: Fri, 18 Aug 2017 16:16:17 +0800 Message-Id: <1503044178-82128-1-git-send-email-huilongx.xu@intel.com> X-Mailer: git-send-email 1.9.3 Subject: [dts] [PATCH V2] fix ptpclient case failed because of tester and dut time zone different X-BeenThere: dts@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: test suite reviews and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 Aug 2017 08:15:04 -0000 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 --- 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