From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id B13DD9135 for ; Fri, 18 Aug 2017 08:12:50 +0200 (CEST) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 17 Aug 2017 23:12:49 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.41,391,1498546800"; d="scan'208";a="1207077934" Received: from unknown (HELO dpdk-fedora20.icx.intel.com) ([10.240.176.135]) by fmsmga002.fm.intel.com with ESMTP; 17 Aug 2017 23:12:48 -0700 From: "xu,huilong" To: dts@dpdk.org Cc: "xu,huilong" Date: Fri, 18 Aug 2017 14:14:04 +0800 Message-Id: <1503036844-82002-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 06:12:51 -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