From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id CBABEA04DD; Thu, 22 Oct 2020 04:53:53 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id A704A9AFB; Thu, 22 Oct 2020 04:53:52 +0200 (CEST) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by dpdk.org (Postfix) with ESMTP id 541966A44 for ; Thu, 22 Oct 2020 04:53:51 +0200 (CEST) IronPort-SDR: boJy9cJvWl6M6U2hrMO/vNmXtTfsbfmLiv3q0/pjgZx4JuPAxBMoumBN9CqS8UlzZh7CQdsCsK hMavqhN571Eg== X-IronPort-AV: E=McAfee;i="6000,8403,9781"; a="147321561" X-IronPort-AV: E=Sophos;i="5.77,403,1596524400"; d="scan'208";a="147321561" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Oct 2020 19:53:33 -0700 IronPort-SDR: WnQj2YJazlq28CDyb9sH8JE2jEl92glZulOcOLZvxxn/F52PhO8+pNuuryg7WD9/zEotfKZftE 3VamTmwIRS4g== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.77,403,1596524400"; d="scan'208";a="524118918" Received: from fmsmsx602.amr.corp.intel.com ([10.18.126.82]) by fmsmga005.fm.intel.com with ESMTP; 21 Oct 2020 19:53:33 -0700 Received: from shsmsx601.ccr.corp.intel.com (10.109.6.141) by fmsmsx602.amr.corp.intel.com (10.18.126.82) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Wed, 21 Oct 2020 19:53:32 -0700 Received: from shsmsx601.ccr.corp.intel.com (10.109.6.141) by SHSMSX601.ccr.corp.intel.com (10.109.6.141) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Thu, 22 Oct 2020 10:53:30 +0800 Received: from shsmsx601.ccr.corp.intel.com ([10.109.6.141]) by SHSMSX601.ccr.corp.intel.com ([10.109.6.141]) with mapi id 15.01.1713.004; Thu, 22 Oct 2020 10:53:30 +0800 From: "Tu, Lijuan" To: "Mo, YufengX" , "dts@dpdk.org" , "Ma, LihongX" Thread-Topic: [dts] [PATCH V2 1/3] framework: check the python version Thread-Index: AQHWofpj8GQrgFRv2UChXkExR3sgjKmi2tyQgAAXiACAAAZP4A== Date: Thu, 22 Oct 2020 02:53:30 +0000 Message-ID: References: <20201014071448.32119-1-yufengx.mo@intel.com> <20201014071448.32119-2-yufengx.mo@intel.com> In-Reply-To: Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-reaction: no-action dlp-version: 11.5.1.3 dlp-product: dlpe-windows x-originating-ip: [10.239.127.36] Content-Type: text/plain; charset="iso-2022-jp" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dts] [PATCH V2 1/3] framework: check the python version 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" Hi Lihong, Investigation of what's python version DTS support need to be completed fi= rst. > -----Original Message----- > From: Mo, YufengX > Sent: 2020=1B$BG/=1B(B10=1B$B7n=1B(B22=1B$BF|=1B(B 10:30 > To: Tu, Lijuan ; dts@dpdk.org; Ma, LihongX > > Subject: RE: [dts] [PATCH V2 1/3] framework: check the python version >=20 > So, checking python version > 3.6.0 is what you want to do? >=20 >=20 > > -----Original Message----- > > From: Tu, Lijuan > > Sent: Thursday, October 22, 2020 9:18 AM > > To: Mo, YufengX ; dts@dpdk.org; Ma, LihongX > > > > Cc: Mo, YufengX > > Subject: RE: [dts] [PATCH V2 1/3] framework: check the python version > > > > DTS only support Python3 now, it doesn't support Python2. But it > > requires Python minus version. E.g. Python3.4 is not supported, it requ= ires > version larger than 3.6x. > > > > > +def check_crb_python_version(crb): > > > + cmd =3D 'python3 -V' > > > > It seems you are telling python version for python 3. If you are using = python3, > how can it tell you python2. > > > > > + out =3D crb.send_expect(cmd, '#', 5) > > > + pat =3D "Python (\d+).(\d+).(\d+)" > > > + result =3D re.findall(pat, out) > > > + if not result or int(result[0][0]) < 3: > > > + crb.logger.warning( > > > + ("WARNING: Tester node python version is lower than pyth= on 3, " > > > + "it is deprecated for use in DTS, " > > Python2 have been replaced by Python2 in DTS, so the message is not > reasonable. > > > > > + "and will not work in future releases.")) > > > + crb.logger.warning("Please use Python 3 instead") > > > + > > > + > > > +def check_dts_python_version(): > > > + if sys.version_info.major < 3: > > > + print(RED( > > > + ("WARNING: Dts running node python version is lower than= python 3, > " > > > + "it is deprecated for use in DTS, " > > > + "and will not work in future releases.")), file=3Dsys.s= tderr) > > > + print(RED("Please use Python 3 instead"), file=3Dsys.stderr) > > > -- > > > 2.21.0