Show a patch.

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

{
    "id": 1497,
    "url": "https://patchwork.libcamera.org/api/patches/1497/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/1497/",
    "project": {
        "id": 1,
        "url": "https://patchwork.libcamera.org/api/projects/1/?format=api",
        "name": "libcamera",
        "link_name": "libcamera",
        "list_id": "libcamera_core",
        "list_email": "libcamera-devel@lists.libcamera.org",
        "web_url": "",
        "scm_url": "",
        "webscm_url": ""
    },
    "msgid": "<20190621161401.28337-5-kieran.bingham@ideasonboard.com>",
    "date": "2019-06-21T16:13:56",
    "name": "[libcamera-devel,RFC,v2,4/9] libcamera: test: Add ControlInfo tests",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "151c6f78e137830d92932a087a00b30a9760273e",
    "submitter": {
        "id": 4,
        "url": "https://patchwork.libcamera.org/api/people/4/?format=api",
        "name": "Kieran Bingham",
        "email": "kieran.bingham@ideasonboard.com"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/1497/mbox/",
    "series": [
        {
            "id": 370,
            "url": "https://patchwork.libcamera.org/api/series/370/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=370",
            "date": "2019-06-21T16:13:52",
            "name": "Libcamera Controls",
            "version": 2,
            "mbox": "https://patchwork.libcamera.org/series/370/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/1497/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/1497/checks/",
    "tags": {},
    "headers": {
        "Return-Path": "<kieran.bingham@ideasonboard.com>",
        "Received": [
            "from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 70A01615BC\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 21 Jun 2019 18:14:07 +0200 (CEST)",
            "from localhost.localdomain\n\t(cpc89242-aztw30-2-0-cust488.18-1.cable.virginm.net [86.31.129.233])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 257C6E0C;\n\tFri, 21 Jun 2019 18:14:07 +0200 (CEST)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1561133647;\n\tbh=5UShzsoGre4Oq/mg2zHBbXwtxijEO5sZqG6gmeHMtZ0=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=r46r1QKU165tayPaQNd22ozdjW+y68CEUUsFyD1AkxoCcNBZKcumSEBvwAWPMQCMt\n\tPhuFb7kZ5X3kkalWhi0rzeLox4wWLNx/DOwX7EwSBfKacLN3v+cSbFid+9dwlKeOC/\n\tsn/St+mWSDWE33L4yzIQI8Uitj+qdiBg1g9PKMYI=",
        "From": "Kieran Bingham <kieran.bingham@ideasonboard.com>",
        "To": "LibCamera Devel <libcamera-devel@lists.libcamera.org>",
        "Date": "Fri, 21 Jun 2019 17:13:56 +0100",
        "Message-Id": "<20190621161401.28337-5-kieran.bingham@ideasonboard.com>",
        "X-Mailer": "git-send-email 2.20.1",
        "In-Reply-To": "<20190621161401.28337-1-kieran.bingham@ideasonboard.com>",
        "References": "<20190621161401.28337-1-kieran.bingham@ideasonboard.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[libcamera-devel] [RFC PATCH v2 4/9] libcamera: test: Add\n\tControlInfo tests",
        "X-BeenThere": "libcamera-devel@lists.libcamera.org",
        "X-Mailman-Version": "2.1.23",
        "Precedence": "list",
        "List-Id": "<libcamera-devel.lists.libcamera.org>",
        "List-Unsubscribe": "<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>",
        "List-Archive": "<https://lists.libcamera.org/pipermail/libcamera-devel/>",
        "List-Post": "<mailto:libcamera-devel@lists.libcamera.org>",
        "List-Help": "<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>",
        "List-Subscribe": "<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>",
        "X-List-Received-Date": "Fri, 21 Jun 2019 16:14:07 -0000"
    },
    "content": "Provide an initial test coverage for the ControlInfo class.\n\nSigned-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n---\n test/controls.cpp | 40 ++++++++++++++++++++++++++++++++++++++++\n test/meson.build  |  1 +\n 2 files changed, 41 insertions(+)\n create mode 100644 test/controls.cpp",
    "diff": "diff --git a/test/controls.cpp b/test/controls.cpp\nnew file mode 100644\nindex 000000000000..94e89f270108\n--- /dev/null\n+++ b/test/controls.cpp\n@@ -0,0 +1,40 @@\n+/* SPDX-License-Identifier: GPL-2.0-or-later */\n+/*\n+ * Copyright (C) 2019, Google Inc.\n+ *\n+ * controls.cpp - Control tests\n+ */\n+\n+#include <iostream>\n+\n+#include <libcamera/controls.h>\n+\n+#include \"test.h\"\n+\n+using namespace std;\n+using namespace libcamera;\n+\n+class Controls : public Test\n+{\n+protected:\n+\tint testControlInfo()\n+\t{\n+\t\tControlInfo gainInfo(ManualGain);\n+\t\tcout << \"Gain Info: \" << gainInfo << endl;\n+\n+\t\treturn TestPass;\n+\t}\n+\n+\tint run()\n+\t{\n+\t\tint ret;\n+\n+\t\tret = testControlInfo();\n+\t\tif (ret)\n+\t\t\treturn ret;\n+\n+\t\treturn TestPass;\n+\t}\n+};\n+\n+TEST_REGISTER(Controls)\ndiff --git a/test/meson.build b/test/meson.build\nindex eff541ddc0a6..0b3e6c6813e6 100644\n--- a/test/meson.build\n+++ b/test/meson.build\n@@ -9,6 +9,7 @@ subdir('v4l2_subdevice')\n subdir('v4l2_videodevice')\n \n public_tests = [\n+    ['controls',                        'controls.cpp'],\n     ['event',                           'event.cpp'],\n     ['event-dispatcher',                'event-dispatcher.cpp'],\n     ['geometry',                        'geometry.cpp'],\n",
    "prefixes": [
        "libcamera-devel",
        "RFC",
        "v2",
        "4/9"
    ]
}