Show a patch.

GET /api/patches/74521/
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 74521,
    "url": "https://patches.dpdk.org/api/patches/74521/",
    "web_url": "https://patches.dpdk.org/patch/74521/",
    "project": {
        "id": 3,
        "url": "https://patches.dpdk.org/api/projects/3/",
        "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/"
    },
    "msgid": "<1595287665-21936-1-git-send-email-lihongx.ma@intel.com>",
    "date": "2020-07-20T23:27:45",
    "name": "[V1] framework: get apps name of current build type in virt_dut",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "cb05ea6d71ad5d6b2f2baf692b718118bac7ab97",
    "submitter": {
        "id": 1641,
        "url": "https://patches.dpdk.org/api/people/1641/",
        "name": "LihongX Ma",
        "email": "lihongx.ma@intel.com"
    },
    "delegate": null,
    "mbox": "https://patches.dpdk.org/patch/74521/mbox/",
    "series": [
        {
            "id": 11191,
            "url": "https://patches.dpdk.org/api/series/11191/",
            "web_url": "https://patches.dpdk.org/project/dts/list/?series=11191",
            "date": "2020-07-20T23:27:45",
            "name": "[V1] framework: get apps name of current build type in virt_dut",
            "version": 1,
            "mbox": "https://patches.dpdk.org/series/11191/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/74521/comments/",
    "check": "pending",
    "checks": "https://patches.dpdk.org/api/patches/74521/checks/",
    "tags": {},
    "headers": {
        "List-Subscribe": "<https://mails.dpdk.org/listinfo/dts>,\n <mailto:dts-request@dpdk.org?subject=subscribe>",
        "X-IronPort-AV": [
            "E=McAfee;i=\"6000,8403,9688\"; a=\"234930345\"",
            "E=Sophos;i=\"5.75,377,1589266800\"; d=\"scan'208\";a=\"234930345\"",
            "E=Sophos;i=\"5.75,377,1589266800\"; d=\"scan'208\";a=\"431881690\""
        ],
        "IronPort-SDR": [
            "\n SDpGS0Qq1SynUGFfvRZuI+vV0D8RIrLOHF0ZpIv3y0AJIT1+hAxQvDHTE2w6b6NH68eiMhE0pM\n NpLSewpweXcw==",
            "\n 3o+t2GSkQL6BzuMhsrjeFZf4c5zNKgp78nZDH7U0z9qFYnoIsSxnQWU8txlItkZo/xzsmIrgsu\n BPXYCZg1DmXQ=="
        ],
        "X-Amp-File-Uploaded": "False",
        "Precedence": "list",
        "X-Mailman-Version": "2.1.15",
        "X-Original-To": "patchwork@inbox.dpdk.org",
        "List-Post": "<mailto:dts@dpdk.org>",
        "X-BeenThere": "dts@dpdk.org",
        "List-Id": "test suite reviews and discussions <dts.dpdk.org>",
        "Subject": "[dts] [PATCH V1] framework: get apps name of current build type in\n\tvirt_dut",
        "Sender": "\"dts\" <dts-bounces@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 D4859A0526;\n\tTue, 21 Jul 2020 08:59:40 +0200 (CEST)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id CBA2C1C00D;\n\tTue, 21 Jul 2020 08:59:40 +0200 (CEST)",
            "from mga05.intel.com (mga05.intel.com [192.55.52.43])\n by dpdk.org (Postfix) with ESMTP id 094561C000\n for <dts@dpdk.org>; Tue, 21 Jul 2020 08:59:38 +0200 (CEST)",
            "from orsmga004.jf.intel.com ([10.7.209.38])\n by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 20 Jul 2020 23:59:38 -0700",
            "from dpdk-lihong-ub1604.sh.intel.com ([10.67.118.174])\n by orsmga004.jf.intel.com with ESMTP; 20 Jul 2020 23:59:35 -0700"
        ],
        "X-Amp-Result": "SKIPPED(no attachment in message)",
        "List-Archive": "<http://mails.dpdk.org/archives/dts/>",
        "X-Mailer": "git-send-email 2.7.4",
        "List-Unsubscribe": "<https://mails.dpdk.org/options/dts>,\n <mailto:dts-request@dpdk.org?subject=unsubscribe>",
        "X-ExtLoop1": "1",
        "Date": "Tue, 21 Jul 2020 07:27:45 +0800",
        "To": "dts@dpdk.org,\n\txix.zhang@intel.com",
        "From": "lihong <lihongx.ma@intel.com>",
        "Errors-To": "dts-bounces@dpdk.org",
        "Cc": "lihong <lihongx.ma@intel.com>",
        "List-Help": "<mailto:dts-request@dpdk.org?subject=help>",
        "Message-Id": "<1595287665-21936-1-git-send-email-lihongx.ma@intel.com>",
        "Return-Path": "<dts-bounces@dpdk.org>"
    },
    "content": "fix dts issue of d8f3830696b54d48e78463, in virt_dut also need get apps_name from config file\n\nSigned-off-by: lihong <lihongx.ma@intel.com>\n---\n framework/virt_base.py |  1 +\n framework/virt_dut.py  | 20 ++++++++++++++++++--\n 2 files changed, 19 insertions(+), 2 deletions(-)",
    "diff": "diff --git a/framework/virt_base.py b/framework/virt_base.py\nindex c959ca0..b582f85 100644\n--- a/framework/virt_base.py\n+++ b/framework/virt_base.py\n@@ -460,6 +460,7 @@ class VirtBase(object):\n \n         try:\n             # setting up dpdk in vm, must call at last\n+            vm_dut.target = self.host_dut.target\n             vm_dut.prerequisites(self.host_dut.package, self.host_dut.patches, autodetect_topo)\n             if set_target:\n                 target = self.host_dut.target\ndiff --git a/framework/virt_dut.py b/framework/virt_dut.py\nindex adf486b..03569ba 100644\n--- a/framework/virt_dut.py\n+++ b/framework/virt_dut.py\n@@ -34,8 +34,8 @@ import re\n import time\n import settings\n from utils import RED, parallel_lock\n-from config import PortConf\n-from settings import NICS, LOG_NAME_SEP, get_netdev\n+from config import PortConf, AppNameConf\n+from settings import NICS, LOG_NAME_SEP, get_netdev, load_global_setting, HOST_BUILD_TYPE_SETTING\n from project_dpdk import DPDKdut\n from dut import Dut\n from net_device import GetNicObj\n@@ -76,6 +76,8 @@ class VirtDut(DPDKdut):\n         self.virttype = virttype\n         self.prefix_subfix = str(os.getpid()) + '_' + time.strftime(\"%Y%m%d%H%M%S\", time.localtime())\n         self.prefix_list = []\n+        self.apps_name_conf = {}\n+        self.apps_name = {}\n \n     def init_log(self):\n         if hasattr(self.host_dut, \"test_classname\"):\n@@ -216,6 +218,20 @@ class VirtDut(DPDKdut):\n         for port_info in self.ports_info:\n             self.logger.info(port_info)\n \n+        # load app name conf\n+        name_cfg = AppNameConf()\n+        self.apps_name_conf = name_cfg.load_app_name_conf()\n+\n+        # get apps name of current build type\n+        build_type = load_global_setting(HOST_BUILD_TYPE_SETTING)\n+        if build_type not in self.apps_name_conf:\n+            raise Exception('please config the apps name in app_name.cfg of build type:%s' % build_type)\n+        self.apps_name = self.apps_name_conf[build_type]\n+        # use the dut target directory instead of 'target' string in app name\n+        for app in self.apps_name:\n+            cur_app_path = self.apps_name[app].replace('target', self.target)\n+            self.apps_name[app] = cur_app_path + ' '\n+\n     def init_core_list(self):\n         self.cores = []\n         cpuinfo = self.send_expect(\"grep --color=never \\\"processor\\\"\"\n",
    "prefixes": [
        "V1"
    ]
}