Show a patch.

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

{
    "id": 61,
    "url": "https://patchwork.libcamera.org/api/patches/61/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/61/",
    "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": "<20181219094830.7226-1-laurent.pinchart@ideasonboard.com>",
    "date": "2018-12-19T09:48:30",
    "name": "[libcamera-devel] tests: Add a base Test class",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "684d6f47877b84128b9876decf2940a80342aaf1",
    "submitter": {
        "id": 2,
        "url": "https://patchwork.libcamera.org/api/people/2/?format=api",
        "name": "Laurent Pinchart",
        "email": "laurent.pinchart@ideasonboard.com"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/61/mbox/",
    "series": [
        {
            "id": 32,
            "url": "https://patchwork.libcamera.org/api/series/32/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=32",
            "date": "2018-12-19T09:48:30",
            "name": "[libcamera-devel] tests: Add a base Test class",
            "version": 1,
            "mbox": "https://patchwork.libcamera.org/series/32/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/61/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/61/checks/",
    "tags": {},
    "headers": {
        "Return-Path": "<laurent.pinchart@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 7964060B1F\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 19 Dec 2018 10:47:40 +0100 (CET)",
            "from avalon.bb.dnainternet.fi\n\t(dfj612ybrt5fhg77mgycy-3.rev.dnainternet.fi\n\t[IPv6:2001:14ba:21f5:5b00:2e86:4862:ef6a:2804])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 003F8549\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 19 Dec 2018 10:47:39 +0100 (CET)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1545212860;\n\tbh=znrcJG14A0XJiFjXlz1qm6QHVnkIhvUTbF5gaFFo84o=;\n\th=From:To:Subject:Date:From;\n\tb=mYVZPtUiVtqh4OVxar0UhbDZOqYD1EqvKG7XL7Pba0FS33Lyq/o2N4NKUww3UpPeJ\n\tvCUmZ6M1Nrba8RmbAdGC+YkPGQ7PtEFJYjHYtxENbW+KuSXXSYJUlT9HFZI7QOqioo\n\twPcZTB1xzlivFvLXt/h2kw72X4qg4f3PYw9SD+PI=",
        "From": "Laurent Pinchart <laurent.pinchart@ideasonboard.com>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Date": "Wed, 19 Dec 2018 11:48:30 +0200",
        "Message-Id": "<20181219094830.7226-1-laurent.pinchart@ideasonboard.com>",
        "X-Mailer": "git-send-email 2.19.2",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[libcamera-devel] [PATCH] tests: Add a base Test class",
        "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": "Wed, 19 Dec 2018 09:47:40 -0000"
    },
    "content": "The base Test class is meant to provide infrastructure common to all\ntests. It is very limited for now, and should be extended with at least\nlogging and assertion handling.\n\nSigned-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n---\n test/meson.build |  6 ++++++\n test/test.cpp    | 28 ++++++++++++++++++++++++++++\n test/test.h      | 28 ++++++++++++++++++++++++++++\n 3 files changed, 62 insertions(+)\n create mode 100644 test/test.cpp\n create mode 100644 test/test.h",
    "diff": "diff --git a/test/meson.build b/test/meson.build\nindex 24d1927f977c..fc9c124927d2 100644\n--- a/test/meson.build\n+++ b/test/meson.build\n@@ -1,3 +1,9 @@\n+libtest_sources = files([\n+    'test.cpp',\n+])\n+\n+libtest = static_library('libtest', libtest_sources)\n+\n test_init = executable('test_init', 'init.cpp',\n                        link_with : libcamera,\n                        include_directories : libcamera_includes)\ndiff --git a/test/test.cpp b/test/test.cpp\nnew file mode 100644\nindex 000000000000..4e7779e750d5\n--- /dev/null\n+++ b/test/test.cpp\n@@ -0,0 +1,28 @@\n+/* SPDX-License-Identifier: GPL-2.0-or-later */\n+/*\n+ * Copyright (C) 2018, Google Inc.\n+ *\n+ * test.cpp - libcamera test base class\n+ */\n+\n+#include \"test.h\"\n+\n+Test::Test()\n+{\n+}\n+\n+Test::~Test()\n+{\n+\tcleanup();\n+}\n+\n+int Test::execute()\n+{\n+\tint ret;\n+\n+\tret = init();\n+\tif (ret < 0)\n+\t\treturn ret;\n+\n+\treturn run();\n+}\ndiff --git a/test/test.h b/test/test.h\nnew file mode 100644\nindex 000000000000..2464fc5cb607\n--- /dev/null\n+++ b/test/test.h\n@@ -0,0 +1,28 @@\n+/* SPDX-License-Identifier: GPL-2.0-or-later */\n+/*\n+ * Copyright (C) 2018, Google Inc.\n+ *\n+ * test.h - libcamera test base class\n+ */\n+\n+#include <sstream>\n+\n+class Test\n+{\n+public:\n+\tTest();\n+\tvirtual ~Test();\n+\n+\tint execute();\n+\n+protected:\n+\tvirtual int init() { return 0; }\n+\tvirtual int run() = 0;\n+\tvirtual void cleanup() { }\n+};\n+\n+#define TEST_REGISTER(klass)\t\t\t\t\t\t\\\n+int main(int argc, char *argv[])\t\t\t\t\t\\\n+{\t\t\t\t\t\t\t\t\t\\\n+\treturn klass().execute();\t\t\t\t\t\\\n+}\n",
    "prefixes": [
        "libcamera-devel"
    ]
}