get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 129686,
    "url": "http://patchwork.dpdk.org/api/patches/129686/?format=api",
    "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/20230721115125.55137-5-bruce.richardson@intel.com/",
    "project": {
        "id": 1,
        "url": "http://patchwork.dpdk.org/api/projects/1/?format=api",
        "name": "DPDK",
        "link_name": "dpdk",
        "list_id": "dev.dpdk.org",
        "list_email": "dev@dpdk.org",
        "web_url": "http://core.dpdk.org",
        "scm_url": "git://dpdk.org/dpdk",
        "webscm_url": "http://git.dpdk.org/dpdk",
        "list_archive_url": "https://inbox.dpdk.org/dev",
        "list_archive_url_format": "https://inbox.dpdk.org/dev/{}",
        "commit_url_format": ""
    },
    "msgid": "<20230721115125.55137-5-bruce.richardson@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20230721115125.55137-5-bruce.richardson@intel.com",
    "date": "2023-07-21T11:51:24",
    "name": "[RFC,4/5] app/test: define unit tests suites based on test macros",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "3b50fcb5ca10202e94bb017b3cf56110ed9942ad",
    "submitter": {
        "id": 20,
        "url": "http://patchwork.dpdk.org/api/people/20/?format=api",
        "name": "Bruce Richardson",
        "email": "bruce.richardson@intel.com"
    },
    "delegate": {
        "id": 1,
        "url": "http://patchwork.dpdk.org/api/users/1/?format=api",
        "username": "tmonjalo",
        "first_name": "Thomas",
        "last_name": "Monjalon",
        "email": "thomas@monjalon.net"
    },
    "mbox": "http://patchwork.dpdk.org/project/dpdk/patch/20230721115125.55137-5-bruce.richardson@intel.com/mbox/",
    "series": [
        {
            "id": 29000,
            "url": "http://patchwork.dpdk.org/api/series/29000/?format=api",
            "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=29000",
            "date": "2023-07-21T11:51:20",
            "name": "replace build code for unit tests",
            "version": 1,
            "mbox": "http://patchwork.dpdk.org/series/29000/mbox/"
        }
    ],
    "comments": "http://patchwork.dpdk.org/api/patches/129686/comments/",
    "check": "success",
    "checks": "http://patchwork.dpdk.org/api/patches/129686/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<dev-bounces@dpdk.org>",
        "X-Original-To": "patchwork@inbox.dpdk.org",
        "Delivered-To": "patchwork@inbox.dpdk.org",
        "Received": [
            "from mails.dpdk.org (mails.dpdk.org [217.70.189.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 6D56942ED9;\n\tFri, 21 Jul 2023 13:52:03 +0200 (CEST)",
            "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 5367642D3A;\n\tFri, 21 Jul 2023 13:51:47 +0200 (CEST)",
            "from mga12.intel.com (mga12.intel.com [192.55.52.136])\n by mails.dpdk.org (Postfix) with ESMTP id 8D94240DD8\n for <dev@dpdk.org>; Fri, 21 Jul 2023 13:51:44 +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 21 Jul 2023 04:51:44 -0700",
            "from silpixa00401385.ir.intel.com ([10.237.214.156])\n by fmsmga006.fm.intel.com with ESMTP; 21 Jul 2023 04:51:43 -0700"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple;\n d=intel.com; i=@intel.com; q=dns/txt; s=Intel;\n t=1689940304; x=1721476304;\n h=from:to:cc:subject:date:message-id:in-reply-to:\n references:mime-version:content-transfer-encoding;\n bh=N22OQvIxyuMRlJaTLHpPOULB+tF04Cvw6UcuvrRykQw=;\n b=XVa0Z/X/JzqGOA+0cq8n0kbL2Hls0w3ucUSZ5mjxVvIQfnGzk7vooPZ5\n KAZ2LVukTmoxvAqFKMSz3MYgpG2wr0hCB49Arx8G/uuB+fxvyj61BH6Ek\n ZeJx0C3B2odcAkDsy0Dwic/fl9YLB/19nRsqgjX2vavkBPnmOBLEIRp4b\n l/Xt8Nvr/Qj/0cqalJ1eHrOyfd3k9uP9r3YuH7zx/vIQRIE/YJyBVqEJQ\n Z9fF19VOWu+0CKtJCm9/MBszy6JGXZUkjbby+983nYXWMO8Tb7sydT0Wp\n AYgYhgXmu3WeLqgkfuiYDxw8okoM0PkkeYPazuvRbhHvAl0FDc3lG7Lg4 g==;",
        "X-IronPort-AV": [
            "E=McAfee;i=\"6600,9927,10777\"; a=\"346599192\"",
            "E=Sophos;i=\"6.01,220,1684825200\"; d=\"scan'208\";a=\"346599192\"",
            "E=McAfee;i=\"6600,9927,10777\"; a=\"971420599\"",
            "E=Sophos;i=\"6.01,220,1684825200\"; d=\"scan'208\";a=\"971420599\""
        ],
        "X-ExtLoop1": "1",
        "From": "Bruce Richardson <bruce.richardson@intel.com>",
        "To": "dev@dpdk.org",
        "Cc": "Bruce Richardson <bruce.richardson@intel.com>",
        "Subject": "[RFC PATCH 4/5] app/test: define unit tests suites based on test\n macros",
        "Date": "Fri, 21 Jul 2023 12:51:24 +0100",
        "Message-Id": "<20230721115125.55137-5-bruce.richardson@intel.com>",
        "X-Mailer": "git-send-email 2.39.2",
        "In-Reply-To": "<20230721115125.55137-1-bruce.richardson@intel.com>",
        "References": "<20230721115125.55137-1-bruce.richardson@intel.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.29",
        "Precedence": "list",
        "List-Id": "DPDK patches and discussions <dev.dpdk.org>",
        "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n <mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "List-Archive": "<http://mails.dpdk.org/archives/dev/>",
        "List-Post": "<mailto:dev@dpdk.org>",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n <mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org"
    },
    "content": "Rather than having the test suites listed out in the meson.build files\nand having to have them enabled/disabled selectively based on what libs\nare being built, pull the tests to run from the source files which were\nadded to the build.\n\nSigned-off-by: Bruce Richardson <bruce.richardson@intel.com>\n---\n app/meson.build               |  7 ++++++-\n app/test/suites/meson.build   | 29 +++++++++++++++++++++++++++++\n buildtools/get-test-suites.py | 24 ++++++++++++++++++++++++\n buildtools/meson.build        |  1 +\n 4 files changed, 60 insertions(+), 1 deletion(-)\n create mode 100644 app/test/suites/meson.build\n create mode 100644 buildtools/get-test-suites.py",
    "diff": "diff --git a/app/meson.build b/app/meson.build\nindex 0d8b618e7f..c14dc80892 100644\n--- a/app/meson.build\n+++ b/app/meson.build\n@@ -101,7 +101,7 @@ foreach app:apps\n         link_libs = dpdk_static_libraries + dpdk_drivers\n     endif\n \n-    executable('dpdk-' + name,\n+    exec = executable('dpdk-' + name,\n             sources,\n             c_args: cflags,\n             link_args: ldflags,\n@@ -110,4 +110,9 @@ foreach app:apps\n             include_directories: includes,\n             install_rpath: join_paths(get_option('prefix'), driver_install_path),\n             install: true)\n+    if name == 'test'\n+        dpdk_test = exec\n+        autotest_sources = sources\n+        subdir('test/suites')  # define the pre-canned test suites\n+    endif\n endforeach\ndiff --git a/app/test/suites/meson.build b/app/test/suites/meson.build\nnew file mode 100644\nindex 0000000000..135620578c\n--- /dev/null\n+++ b/app/test/suites/meson.build\n@@ -0,0 +1,29 @@\n+# SPDX-License-Identifier: BSD-3-Clause\n+# Copyright(c) 2023 Intel Corporation\n+\n+# some perf tests (eg: memcpy perf autotest)take very long\n+# to complete, so timeout to 10 minutes\n+timeout_seconds = 600\n+\n+# process source files to determine the different unit test suites\n+# - fast_tests\n+# - perf_tests\n+# - driver_tests\n+test_suites = run_command(get_test_suites_cmd, autotest_sources).stdout().strip().split()\n+foreach suite:test_suites\n+    suite = suite.split('=')\n+    suite_name = suite[0]\n+    suite_tests = suite[1].split(',')\n+    if suite_name == 'fast-tests'\n+    # special fast-test handling here\n+\n+    else\n+        foreach t: suite_tests\n+            test(t, dpdk_test,\n+                    args: ['--', t],\n+                    timeout: timeout_seconds,\n+                    is_parallel: false,\n+                    suite: suite_name)\n+        endforeach\n+    endif\n+endforeach\ndiff --git a/buildtools/get-test-suites.py b/buildtools/get-test-suites.py\nnew file mode 100644\nindex 0000000000..43cde80970\n--- /dev/null\n+++ b/buildtools/get-test-suites.py\n@@ -0,0 +1,24 @@\n+#! /usr/bin/env python3\n+# SPDX-License-Identifier: BSD-3-Clause\n+# Copyright(c) 2023 Intel Corporation\n+\n+import sys\n+import re\n+\n+input_list = sys.argv[1:]\n+test_def_regex = re.compile(\"REGISTER_([A-Z]+)_TEST\\s*\\(\\s*([a-z0-9_]+)\")\n+test_suites = {}\n+\n+for fname in input_list:\n+    with open(fname) as f:\n+        contents = [ln for ln in f.readlines() if test_def_regex.match(ln.strip())]\n+    for ln in contents:\n+        (test_suite, test_name) = test_def_regex.match(ln).group(1, 2)\n+        suite_name = f\"{test_suite.lower()}-tests\"\n+        if suite_name in test_suites:\n+            test_suites[suite_name].append(test_name)\n+        else:\n+            test_suites[suite_name] = [test_name]\n+\n+for suite in test_suites.keys():\n+    print(f\"{suite}={','.join(test_suites[suite])}\")\ndiff --git a/buildtools/meson.build b/buildtools/meson.build\nindex e1c600e40f..12e4b36165 100644\n--- a/buildtools/meson.build\n+++ b/buildtools/meson.build\n@@ -18,6 +18,7 @@ map_to_win_cmd = py3 + files('map_to_win.py')\n sphinx_wrapper = py3 + files('call-sphinx-build.py')\n get_cpu_count_cmd = py3 + files('get-cpu-count.py')\n get_numa_count_cmd = py3 + files('get-numa-count.py')\n+get_test_suites_cmd = py3 + files('get-test-suites.py')\n binutils_avx512_check = (py3 + files('binutils-avx512-check.py') +\n                         [objdump] + cc.cmd_array())\n \n",
    "prefixes": [
        "RFC",
        "4/5"
    ]
}