From patchwork Wed Aug 26 10:15:17 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Ling, WeiX" X-Patchwork-Id: 75956 Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 1B367A04B1; Wed, 26 Aug 2020 04:17:54 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 08402AAB7; Wed, 26 Aug 2020 04:17:54 +0200 (CEST) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by dpdk.org (Postfix) with ESMTP id 468B31F1C for ; Wed, 26 Aug 2020 04:17:52 +0200 (CEST) IronPort-SDR: c8V68hnMAh6K3veEDkOIoWLi9cHEIIdJvktOeh8vaia7aQdLbov692FXpRQvbYk697zcF6lAfC 9K2nU4bCXMHg== X-IronPort-AV: E=McAfee;i="6000,8403,9724"; a="135776301" X-IronPort-AV: E=Sophos;i="5.76,354,1592895600"; d="scan'208";a="135776301" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Aug 2020 19:17:51 -0700 IronPort-SDR: Xc27DrYUJn+p0H2GPeCn59QMxe1ruYy/5vUM55euvzstWH4FV8QEdeAo/Sdy9/P1WGPS1Q1KUc cVZ5c7JS/jeg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.76,354,1592895600"; d="scan'208";a="402925674" Received: from unknown (HELO localhost.localdomain) ([10.240.183.222]) by fmsmga001.fm.intel.com with ESMTP; 25 Aug 2020 19:17:50 -0700 From: lingwei To: dts@dpdk.org Cc: lingwei Date: Wed, 26 Aug 2020 10:15:17 +0000 Message-Id: <20200826101522.110423-2-weix.ling@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200826101522.110423-1-weix.ling@intel.com> References: <20200826101522.110423-1-weix.ling@intel.com> Subject: [dts] [dts 1/6] tests/TestSuite_metrics:support meson build 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: , Errors-To: dts-bounces@dpdk.org Sender: "dts" Signed-off-by: lingwei --- tests/TestSuite_metrics.py | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/tests/TestSuite_metrics.py b/tests/TestSuite_metrics.py index 7fef17d..d1b7fe9 100644 --- a/tests/TestSuite_metrics.py +++ b/tests/TestSuite_metrics.py @@ -75,14 +75,6 @@ class TestMetrics(TestCase): output2 = self.dut.alt_session.session.get_session_before(2) return output + os.linesep + output2 - @property - def target_dir(self): - # get absolute directory of target source code - target_dir = '/root' + self.dut.base_dir[1:] \ - if self.dut.base_dir.startswith('~') else \ - self.dut.base_dir - return target_dir - def get_pkt_len(self, pkt_type, frame_size=64): headers_size = sum( [HEADER_SIZE[x] for x in ['eth', 'ip', pkt_type]]) @@ -188,8 +180,8 @@ class TestMetrics(TestCase): def init_proc_info_tool(self): option = f' -v --file-prefix={self.prefix} -- --metrics' - self.dpdk_proc = os.path.join( - self.target_dir, self.target, "app", "dpdk-procinfo" + option) + app_name = self.dut.apps_name['proc-info'] + self.dpdk_proc = os.path.join(app_name + option) self.metrics_stat = [] def proc_info_query(self, flag=None):