Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/81913/?format=api
http://patches.dpdk.org/api/patches/81913/?format=api", "web_url": "http://patches.dpdk.org/project/dts/patch/20201023092549.33439-2-yufengx.mo@intel.com/", "project": { "id": 3, "url": "http://patches.dpdk.org/api/projects/3/?format=api", "name": "DTS", "link_name": "dts", "list_id": "dts.dpdk.org", "list_email": "dts@dpdk.org", "web_url": "", "scm_url": "git://dpdk.org/tools/dts", "webscm_url": "http://git.dpdk.org/tools/dts/", "list_archive_url": "https://inbox.dpdk.org/dts", "list_archive_url_format": "https://inbox.dpdk.org/dts/{}", "commit_url_format": "" }, "msgid": "<20201023092549.33439-2-yufengx.mo@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dts/20201023092549.33439-2-yufengx.mo@intel.com", "date": "2020-10-23T09:25:47", "name": "[V5,1/3] framework: check the python version", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "49c5b96e417ab7a1121889f4a091ff32891dcc22", "submitter": { "id": 1342, "url": "http://patches.dpdk.org/api/people/1342/?format=api", "name": "Yufen.Mo", "email": "yufengx.mo@intel.com" }, "delegate": null, "mbox": "http://patches.dpdk.org/project/dts/patch/20201023092549.33439-2-yufengx.mo@intel.com/mbox/", "series": [ { "id": 13259, "url": "http://patches.dpdk.org/api/series/13259/?format=api", "web_url": "http://patches.dpdk.org/project/dts/list/?series=13259", "date": "2020-10-23T09:25:48", "name": "framework: check the python version", "version": 5, "mbox": "http://patches.dpdk.org/series/13259/mbox/" } ], "comments": "http://patches.dpdk.org/api/patches/81913/comments/", "check": "pending", "checks": "http://patches.dpdk.org/api/patches/81913/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<dts-bounces@dpdk.org>", "X-Original-To": "patchwork@inbox.dpdk.org", "Delivered-To": "patchwork@inbox.dpdk.org", "Received": [ "from dpdk.org (dpdk.org [92.243.14.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 681BAA04DE;\n\tFri, 23 Oct 2020 11:30:30 +0200 (CEST)", "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 38442A900;\n\tFri, 23 Oct 2020 11:30:29 +0200 (CEST)", "from mga12.intel.com (mga12.intel.com [192.55.52.136])\n by dpdk.org (Postfix) with ESMTP id 6E5117DF8\n for <dts@dpdk.org>; Fri, 23 Oct 2020 11:30:27 +0200 (CEST)", "from fmsmga006.fm.intel.com ([10.253.24.20])\n by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 23 Oct 2020 02:30:22 -0700", "from dpdk-moyufen06.sh.intel.com ([10.67.116.208])\n by fmsmga006.fm.intel.com with ESMTP; 23 Oct 2020 02:30:20 -0700" ], "IronPort-SDR": [ "\n PTgauyTohs/m3w0OZl5mumrO6YVEl6GqsBzJ6rd+78lHf6IHxIBcRI+W/w9wgI1lv1reRPs9X/\n JY94S3P6M9fQ==", "\n GSphy7ZrTvnlhVQfVXcJQoOEZm4TRApGsSvVbtO7VcT7TYGA2p4opld2hODbm8YRt5Mnp10bGc\n C6X9ijTl0m/w==" ], "X-IronPort-AV": [ "E=McAfee;i=\"6000,8403,9782\"; a=\"146942775\"", "E=Sophos;i=\"5.77,407,1596524400\"; d=\"scan'208\";a=\"146942775\"", "E=Sophos;i=\"5.77,407,1596524400\"; d=\"scan'208\";a=\"523445826\"" ], "X-Amp-Result": "SKIPPED(no attachment in message)", "X-Amp-File-Uploaded": "False", "X-ExtLoop1": "1", "From": "yufengmx <yufengx.mo@intel.com>", "To": "dts@dpdk.org,\n\tlijuan.tu@intel.com,\n\tlihongx.ma@intel.com", "Cc": "yufengmx <yufengx.mo@intel.com>", "Date": "Fri, 23 Oct 2020 17:25:47 +0800", "Message-Id": "<20201023092549.33439-2-yufengx.mo@intel.com>", "X-Mailer": "git-send-email 2.21.0", "In-Reply-To": "<20201023092549.33439-1-yufengx.mo@intel.com>", "References": "<20201023092549.33439-1-yufengx.mo@intel.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[dts] [PATCH V5 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 <dts.dpdk.org>", "List-Unsubscribe": "<https://mails.dpdk.org/options/dts>,\n <mailto:dts-request@dpdk.org?subject=unsubscribe>", "List-Archive": "<http://mails.dpdk.org/archives/dts/>", "List-Post": "<mailto:dts@dpdk.org>", "List-Help": "<mailto:dts-request@dpdk.org?subject=help>", "List-Subscribe": "<https://mails.dpdk.org/listinfo/dts>,\n <mailto:dts-request@dpdk.org?subject=subscribe>", "Errors-To": "dts-bounces@dpdk.org", "Sender": "\"dts\" <dts-bounces@dpdk.org>" }, "content": "implement a method to check the python version of tester and the server that run dts.\nIf the version is lower than 3.6.9, print a warning message.\n\nSigned-off-by: yufengmx <yufengx.mo@intel.com>\n---\n framework/utils.py | 28 ++++++++++++++++++++++++++++\n 1 file changed, 28 insertions(+)", "diff": "diff --git a/framework/utils.py b/framework/utils.py\nindex e74e6c5..6084ea6 100644\n--- a/framework/utils.py\n+++ b/framework/utils.py\n@@ -32,6 +32,7 @@\n import json # json format\n import re\n import os\n+import sys\n import inspect\n import socket\n import struct\n@@ -280,3 +281,30 @@ def get_backtrace_object(file_name, obj_name):\n obj = getattr(frame.f_locals['self'], obj_name, None)\n \n return obj\n+\n+\n+def check_crb_python_version(crb):\n+ cmd = 'python3 -V'\n+ out = crb.send_expect(cmd, '#', 5)\n+ pat = \"Python (\\d+).(\\d+).(\\d+)\"\n+ result = re.findall(pat, out)\n+ if not result or \\\n+ int(result[0][0]) < 3 or \\\n+ (int(result[0][0]) == 3 and int(result[0][1]) < 6) or \\\n+ (int(result[0][0]) == 3 and int(result[0][1]) == 6 and int(result[0][2]) < 9):\n+ crb.logger.warning(\n+ (\"WARNING: Tester node python version is lower than python 3.6, \"\n+ \"it is deprecated for use in DTS, \"\n+ \"and will not work in future releases.\"))\n+ crb.logger.warning(\"Please use Python >= 3.6.9 instead\")\n+\n+\n+def check_dts_python_version():\n+ if sys.version_info.major < 3 or \\\n+ (sys.version_info.major == 3 and sys.version_info.minor < 6) or \\\n+ (sys.version_info.major == 3 and sys.version_info.minor == 6 and sys.version_info.micro < 9):\n+ print(RED(\n+ (\"WARNING: Dts running node python version is lower than python 3.6, \"\n+ \"it is deprecated for use in DTS, \"\n+ \"and will not work in future releases.\")), file=sys.stderr)\n+ print(RED(\"Please use Python >= 3.6.9 instead\"), file=sys.stderr)\n", "prefixes": [ "V5", "1/3" ] }{ "id": 81913, "url": "