Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/134386/?format=api
http://patches.dpdk.org/api/patches/134386/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/20231115130959.39420-10-juraj.linkes@pantheon.tech/", "project": { "id": 1, "url": "http://patches.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": "<20231115130959.39420-10-juraj.linkes@pantheon.tech>", "list_archive_url": "https://inbox.dpdk.org/dev/20231115130959.39420-10-juraj.linkes@pantheon.tech", "date": "2023-11-15T13:09:47", "name": "[v7,09/21] dts: test result docstring update", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "8effc7bc0e7ea87fa5a66bc731ad263a3a148e24", "submitter": { "id": 1626, "url": "http://patches.dpdk.org/api/people/1626/?format=api", "name": "Juraj Linkeš", "email": "juraj.linkes@pantheon.tech" }, "delegate": { "id": 1, "url": "http://patches.dpdk.org/api/users/1/?format=api", "username": "tmonjalo", "first_name": "Thomas", "last_name": "Monjalon", "email": "thomas@monjalon.net" }, "mbox": "http://patches.dpdk.org/project/dpdk/patch/20231115130959.39420-10-juraj.linkes@pantheon.tech/mbox/", "series": [ { "id": 30302, "url": "http://patches.dpdk.org/api/series/30302/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=30302", "date": "2023-11-15T13:09:38", "name": "dts: docstrings update", "version": 7, "mbox": "http://patches.dpdk.org/series/30302/mbox/" } ], "comments": "http://patches.dpdk.org/api/patches/134386/comments/", "check": "success", "checks": "http://patches.dpdk.org/api/patches/134386/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 2482F43339;\n\tWed, 15 Nov 2023 14:12:51 +0100 (CET)", "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 1A5E240E68;\n\tWed, 15 Nov 2023 14:12:08 +0100 (CET)", "from mail-ej1-f51.google.com (mail-ej1-f51.google.com\n [209.85.218.51]) by mails.dpdk.org (Postfix) with ESMTP id A0F2240A80\n for <dev@dpdk.org>; Wed, 15 Nov 2023 14:12:02 +0100 (CET)", "by mail-ej1-f51.google.com with SMTP id\n a640c23a62f3a-9d0b4dfd60dso1003690666b.1\n for <dev@dpdk.org>; Wed, 15 Nov 2023 05:12:02 -0800 (PST)", "from jlinkes-PT-Latitude-5530.pantheon.local\n (81.89.53.154.host.vnet.sk. [81.89.53.154])\n by smtp.gmail.com with ESMTPSA id\n tb16-20020a1709078b9000b009f2b7282387sm1011914ejc.46.2023.11.15.05.12.00\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Wed, 15 Nov 2023 05:12:01 -0800 (PST)" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=pantheon.tech; s=google; t=1700053922; x=1700658722; darn=dpdk.org;\n h=content-transfer-encoding:mime-version:references:in-reply-to\n :message-id:date:subject:cc:to:from:from:to:cc:subject:date\n :message-id:reply-to;\n bh=SNuBm0P/F+2D+ZgXgH9yFiu7r2iZtcMqM4yuUE6GvFY=;\n b=UjApxVlpOyVnC6wH172ioL9h54fZclbqsf/+yPrBo6r28i039megIwMXz0M8SKK5y4\n y13qIG1B+UHmCYOic4BtZyMtbEWDa0w84I9pN5h5FHV2RhAUbgwx8eKR3KgJqwR4w2zJ\n 1O3GxgA2N1c2IJ26FIc6xGUXpLoCoB5Xj7f9HcaXEaOMyk4MVJMZ8R9J8hOm7i7KZz+e\n br86ZUROoK+VjPDVk6v+B5yNgxUlwHDn90dm6byzPhUx6+YihVysRZPIdKrLj4jEPWAm\n ucC+0mbQbwDu37a+dxOp3GUK+lfjswrKbVS94MLkn7Ahoo9gITQWHEWcFyRc2WbX7pQX\n kzIA==", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20230601; t=1700053922; x=1700658722;\n h=content-transfer-encoding:mime-version:references:in-reply-to\n :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc\n :subject:date:message-id:reply-to;\n bh=SNuBm0P/F+2D+ZgXgH9yFiu7r2iZtcMqM4yuUE6GvFY=;\n b=hnfYqX34hzPcNrZnQCJSEyXAMOIWwG7+Lc9OpFSGQeJqnb88qAs7YOlp4XSzNRWKFj\n O3aiEB7P+2MEdSxihoKTmrVIAluH0EZqXy//MXqqWyae0z/GWAO0+ee5UlYZO/i6avp4\n twdVThQSclhDqT/MZqSL/hriD9gz/yFk8ccB07bbvLmhCu4XnAUiq490O3I053fMyCWm\n NKlSU5spJgOCkHzi/ihYZMEw7on82Zvn/9z5FfTKfAI/oRMmlumROMMgMK0XRkx9l9vq\n D01uv4DpVCtvGp1OQ9rkoApzoFaYLysqLWBP+pEqDJ+ETUNgRYBHV2twDZI45G04C2gB\n 1jsQ==", "X-Gm-Message-State": "AOJu0YxIeXDZ29TfTOmakFhqI0ZvnUDqjC7ZDEbn7AgE/OeyP5nCYhRj\n JSb+h7CoqiQcsYIFmgJgVdH1Xw==", "X-Google-Smtp-Source": "\n AGHT+IESyvtu0RXdaFrRyg9AS/+01+ez3tqcEemZian/TUlsXdlUJK+9hHZ6t38V2zXMNIOh6ujygg==", "X-Received": "by 2002:a17:906:45a:b0:9c7:56ee:b6e5 with SMTP id\n e26-20020a170906045a00b009c756eeb6e5mr9061787eja.40.1700053921943;\n Wed, 15 Nov 2023 05:12:01 -0800 (PST)", "From": "=?utf-8?q?Juraj_Linke=C5=A1?= <juraj.linkes@pantheon.tech>", "To": "thomas@monjalon.net, Honnappa.Nagarahalli@arm.com, jspewock@iol.unh.edu,\n probb@iol.unh.edu, paul.szczepanek@arm.com, yoan.picchi@foss.arm.com", "Cc": "dev@dpdk.org, =?utf-8?q?Juraj_Linke=C5=A1?= <juraj.linkes@pantheon.tech>", "Subject": "[PATCH v7 09/21] dts: test result docstring update", "Date": "Wed, 15 Nov 2023 14:09:47 +0100", "Message-Id": "<20231115130959.39420-10-juraj.linkes@pantheon.tech>", "X-Mailer": "git-send-email 2.34.1", "In-Reply-To": "<20231115130959.39420-1-juraj.linkes@pantheon.tech>", "References": "<20231108125324.191005-23-juraj.linkes@pantheon.tech>\n <20231115130959.39420-1-juraj.linkes@pantheon.tech>", "MIME-Version": "1.0", "Content-Type": "text/plain; charset=UTF-8", "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": "Format according to the Google format and PEP257, with slight\ndeviations.\n\nSigned-off-by: Juraj Linkeš <juraj.linkes@pantheon.tech>\n---\n dts/framework/test_result.py | 292 ++++++++++++++++++++++++++++-------\n 1 file changed, 234 insertions(+), 58 deletions(-)", "diff": "diff --git a/dts/framework/test_result.py b/dts/framework/test_result.py\nindex 603e18872c..05e210f6e7 100644\n--- a/dts/framework/test_result.py\n+++ b/dts/framework/test_result.py\n@@ -2,8 +2,25 @@\n # Copyright(c) 2023 PANTHEON.tech s.r.o.\n # Copyright(c) 2023 University of New Hampshire\n \n-\"\"\"\n-Generic result container and reporters\n+r\"\"\"Record and process DTS results.\n+\n+The results are recorded in a hierarchical manner:\n+\n+ * :class:`DTSResult` contains\n+ * :class:`ExecutionResult` contains\n+ * :class:`BuildTargetResult` contains\n+ * :class:`TestSuiteResult` contains\n+ * :class:`TestCaseResult`\n+\n+Each result may contain multiple lower level results, e.g. there are multiple\n+:class:`TestSuiteResult`\\s in a :class:`BuildTargetResult`.\n+The results have common parts, such as setup and teardown results, captured in :class:`BaseResult`,\n+which also defines some common behaviors in its methods.\n+\n+Each result class has its own idiosyncrasies which they implement in overridden methods.\n+\n+The :option:`--output` command line argument and the :envvar:`DTS_OUTPUT_DIR` environment\n+variable modify the directory where the files with results will be stored.\n \"\"\"\n \n import os.path\n@@ -26,26 +43,34 @@\n \n \n class Result(Enum):\n- \"\"\"\n- An Enum defining the possible states that\n- a setup, a teardown or a test case may end up in.\n- \"\"\"\n+ \"\"\"The possible states that a setup, a teardown or a test case may end up in.\"\"\"\n \n+ #:\n PASS = auto()\n+ #:\n FAIL = auto()\n+ #:\n ERROR = auto()\n+ #:\n SKIP = auto()\n \n def __bool__(self) -> bool:\n+ \"\"\"Only PASS is True.\"\"\"\n return self is self.PASS\n \n \n class FixtureResult(object):\n- \"\"\"\n- A record that stored the result of a setup or a teardown.\n- The default is FAIL because immediately after creating the object\n- the setup of the corresponding stage will be executed, which also guarantees\n- the execution of teardown.\n+ \"\"\"A record that stores the result of a setup or a teardown.\n+\n+ FAIL is a sensible default since it prevents false positives\n+ (which could happen if the default was PASS).\n+\n+ Preventing false positives or other false results is preferable since a failure\n+ is mostly likely to be investigated (the other false results may not be investigated at all).\n+\n+ Attributes:\n+ result: The associated result.\n+ error: The error in case of a failure.\n \"\"\"\n \n result: Result\n@@ -56,21 +81,32 @@ def __init__(\n result: Result = Result.FAIL,\n error: Exception | None = None,\n ):\n+ \"\"\"Initialize the constructor with the fixture result and store a possible error.\n+\n+ Args:\n+ result: The result to store.\n+ error: The error which happened when a failure occurred.\n+ \"\"\"\n self.result = result\n self.error = error\n \n def __bool__(self) -> bool:\n+ \"\"\"A wrapper around the stored :class:`Result`.\"\"\"\n return bool(self.result)\n \n \n class Statistics(dict):\n- \"\"\"\n- A helper class used to store the number of test cases by its result\n- along a few other basic information.\n- Using a dict provides a convenient way to format the data.\n+ \"\"\"How many test cases ended in which result state along some other basic information.\n+\n+ Subclassing :class:`dict` provides a convenient way to format the data.\n \"\"\"\n \n def __init__(self, dpdk_version: str | None):\n+ \"\"\"Extend the constructor with relevant keys.\n+\n+ Args:\n+ dpdk_version: The version of tested DPDK.\n+ \"\"\"\n super(Statistics, self).__init__()\n for result in Result:\n self[result.name] = 0\n@@ -78,8 +114,17 @@ def __init__(self, dpdk_version: str | None):\n self[\"DPDK VERSION\"] = dpdk_version\n \n def __iadd__(self, other: Result) -> \"Statistics\":\n- \"\"\"\n- Add a Result to the final count.\n+ \"\"\"Add a Result to the final count.\n+\n+ Example:\n+ stats: Statistics = Statistics() # empty Statistics\n+ stats += Result.PASS # add a Result to `stats`\n+\n+ Args:\n+ other: The Result to add to this statistics object.\n+\n+ Returns:\n+ The modified statistics object.\n \"\"\"\n self[other.name] += 1\n self[\"PASS RATE\"] = (\n@@ -90,9 +135,7 @@ def __iadd__(self, other: Result) -> \"Statistics\":\n return self\n \n def __str__(self) -> str:\n- \"\"\"\n- Provide a string representation of the data.\n- \"\"\"\n+ \"\"\"Each line contains the formatted key = value pair.\"\"\"\n stats_str = \"\"\n for key, value in self.items():\n stats_str += f\"{key:<12} = {value}\\n\"\n@@ -102,10 +145,16 @@ def __str__(self) -> str:\n \n \n class BaseResult(object):\n- \"\"\"\n- The Base class for all results. Stores the results of\n- the setup and teardown portions of the corresponding stage\n- and a list of results from each inner stage in _inner_results.\n+ \"\"\"Common data and behavior of DTS results.\n+\n+ Stores the results of the setup and teardown portions of the corresponding stage.\n+ The hierarchical nature of DTS results is captured recursively in an internal list.\n+ A stage is each level in this particular hierarchy (pre-execution or the top-most level,\n+ execution, build target, test suite and test case.)\n+\n+ Attributes:\n+ setup_result: The result of the setup of the particular stage.\n+ teardown_result: The results of the teardown of the particular stage.\n \"\"\"\n \n setup_result: FixtureResult\n@@ -113,15 +162,28 @@ class BaseResult(object):\n _inner_results: MutableSequence[\"BaseResult\"]\n \n def __init__(self):\n+ \"\"\"Initialize the constructor.\"\"\"\n self.setup_result = FixtureResult()\n self.teardown_result = FixtureResult()\n self._inner_results = []\n \n def update_setup(self, result: Result, error: Exception | None = None) -> None:\n+ \"\"\"Store the setup result.\n+\n+ Args:\n+ result: The result of the setup.\n+ error: The error that occurred in case of a failure.\n+ \"\"\"\n self.setup_result.result = result\n self.setup_result.error = error\n \n def update_teardown(self, result: Result, error: Exception | None = None) -> None:\n+ \"\"\"Store the teardown result.\n+\n+ Args:\n+ result: The result of the teardown.\n+ error: The error that occurred in case of a failure.\n+ \"\"\"\n self.teardown_result.result = result\n self.teardown_result.error = error\n \n@@ -141,27 +203,55 @@ def _get_inner_errors(self) -> list[Exception]:\n ]\n \n def get_errors(self) -> list[Exception]:\n+ \"\"\"Compile errors from the whole result hierarchy.\n+\n+ Returns:\n+ The errors from setup, teardown and all errors found in the whole result hierarchy.\n+ \"\"\"\n return self._get_setup_teardown_errors() + self._get_inner_errors()\n \n def add_stats(self, statistics: Statistics) -> None:\n+ \"\"\"Collate stats from the whole result hierarchy.\n+\n+ Args:\n+ statistics: The :class:`Statistics` object where the stats will be collated.\n+ \"\"\"\n for inner_result in self._inner_results:\n inner_result.add_stats(statistics)\n \n \n class TestCaseResult(BaseResult, FixtureResult):\n- \"\"\"\n- The test case specific result.\n- Stores the result of the actual test case.\n- Also stores the test case name.\n+ r\"\"\"The test case specific result.\n+\n+ Stores the result of the actual test case. This is done by adding an extra superclass\n+ in :class:`FixtureResult`. The setup and teardown results are :class:`FixtureResult`\\s and\n+ the class is itself a record of the test case.\n+\n+ Attributes:\n+ test_case_name: The test case name.\n \"\"\"\n \n test_case_name: str\n \n def __init__(self, test_case_name: str):\n+ \"\"\"Extend the constructor with `test_case_name`.\n+\n+ Args:\n+ test_case_name: The test case's name.\n+ \"\"\"\n super(TestCaseResult, self).__init__()\n self.test_case_name = test_case_name\n \n def update(self, result: Result, error: Exception | None = None) -> None:\n+ \"\"\"Update the test case result.\n+\n+ This updates the result of the test case itself and doesn't affect\n+ the results of the setup and teardown steps in any way.\n+\n+ Args:\n+ result: The result of the test case.\n+ error: The error that occurred in case of a failure.\n+ \"\"\"\n self.result = result\n self.error = error\n \n@@ -171,38 +261,66 @@ def _get_inner_errors(self) -> list[Exception]:\n return []\n \n def add_stats(self, statistics: Statistics) -> None:\n+ r\"\"\"Add the test case result to statistics.\n+\n+ The base method goes through the hierarchy recursively and this method is here to stop\n+ the recursion, as the :class:`TestCaseResult`\\s are the leaves of the hierarchy tree.\n+\n+ Args:\n+ statistics: The :class:`Statistics` object where the stats will be added.\n+ \"\"\"\n statistics += self.result\n \n def __bool__(self) -> bool:\n+ \"\"\"The test case passed only if setup, teardown and the test case itself passed.\"\"\"\n return (\n bool(self.setup_result) and bool(self.teardown_result) and bool(self.result)\n )\n \n \n class TestSuiteResult(BaseResult):\n- \"\"\"\n- The test suite specific result.\n- The _inner_results list stores results of test cases in a given test suite.\n- Also stores the test suite name.\n+ \"\"\"The test suite specific result.\n+\n+ The internal list stores the results of all test cases in a given test suite.\n+\n+ Attributes:\n+ suite_name: The test suite name.\n \"\"\"\n \n suite_name: str\n \n def __init__(self, suite_name: str):\n+ \"\"\"Extend the constructor with `suite_name`.\n+\n+ Args:\n+ suite_name: The test suite's name.\n+ \"\"\"\n super(TestSuiteResult, self).__init__()\n self.suite_name = suite_name\n \n def add_test_case(self, test_case_name: str) -> TestCaseResult:\n+ \"\"\"Add and return the inner result (test case).\n+\n+ Returns:\n+ The test case's result.\n+ \"\"\"\n test_case_result = TestCaseResult(test_case_name)\n self._inner_results.append(test_case_result)\n return test_case_result\n \n \n class BuildTargetResult(BaseResult):\n- \"\"\"\n- The build target specific result.\n- The _inner_results list stores results of test suites in a given build target.\n- Also stores build target specifics, such as compiler used to build DPDK.\n+ \"\"\"The build target specific result.\n+\n+ The internal list stores the results of all test suites in a given build target.\n+\n+ Attributes:\n+ arch: The DPDK build target architecture.\n+ os: The DPDK build target operating system.\n+ cpu: The DPDK build target CPU.\n+ compiler: The DPDK build target compiler.\n+ compiler_version: The DPDK build target compiler version.\n+ dpdk_version: The built DPDK version.\n \"\"\"\n \n arch: Architecture\n@@ -213,6 +331,11 @@ class BuildTargetResult(BaseResult):\n dpdk_version: str | None\n \n def __init__(self, build_target: BuildTargetConfiguration):\n+ \"\"\"Extend the constructor with the `build_target`'s build target config.\n+\n+ Args:\n+ build_target: The build target's test run configuration.\n+ \"\"\"\n super(BuildTargetResult, self).__init__()\n self.arch = build_target.arch\n self.os = build_target.os\n@@ -222,20 +345,35 @@ def __init__(self, build_target: BuildTargetConfiguration):\n self.dpdk_version = None\n \n def add_build_target_info(self, versions: BuildTargetInfo) -> None:\n+ \"\"\"Add information about the build target gathered at runtime.\n+\n+ Args:\n+ versions: The additional information.\n+ \"\"\"\n self.compiler_version = versions.compiler_version\n self.dpdk_version = versions.dpdk_version\n \n def add_test_suite(self, test_suite_name: str) -> TestSuiteResult:\n+ \"\"\"Add and return the inner result (test suite).\n+\n+ Returns:\n+ The test suite's result.\n+ \"\"\"\n test_suite_result = TestSuiteResult(test_suite_name)\n self._inner_results.append(test_suite_result)\n return test_suite_result\n \n \n class ExecutionResult(BaseResult):\n- \"\"\"\n- The execution specific result.\n- The _inner_results list stores results of build targets in a given execution.\n- Also stores the SUT node configuration.\n+ \"\"\"The execution specific result.\n+\n+ The internal list stores the results of all build targets in a given execution.\n+\n+ Attributes:\n+ sut_node: The SUT node used in the execution.\n+ sut_os_name: The operating system of the SUT node.\n+ sut_os_version: The operating system version of the SUT node.\n+ sut_kernel_version: The operating system kernel version of the SUT node.\n \"\"\"\n \n sut_node: NodeConfiguration\n@@ -244,36 +382,55 @@ class ExecutionResult(BaseResult):\n sut_kernel_version: str\n \n def __init__(self, sut_node: NodeConfiguration):\n+ \"\"\"Extend the constructor with the `sut_node`'s config.\n+\n+ Args:\n+ sut_node: The SUT node's test run configuration used in the execution.\n+ \"\"\"\n super(ExecutionResult, self).__init__()\n self.sut_node = sut_node\n \n def add_build_target(\n self, build_target: BuildTargetConfiguration\n ) -> BuildTargetResult:\n+ \"\"\"Add and return the inner result (build target).\n+\n+ Args:\n+ build_target: The build target's test run configuration.\n+\n+ Returns:\n+ The build target's result.\n+ \"\"\"\n build_target_result = BuildTargetResult(build_target)\n self._inner_results.append(build_target_result)\n return build_target_result\n \n def add_sut_info(self, sut_info: NodeInfo) -> None:\n+ \"\"\"Add SUT information gathered at runtime.\n+\n+ Args:\n+ sut_info: The additional SUT node information.\n+ \"\"\"\n self.sut_os_name = sut_info.os_name\n self.sut_os_version = sut_info.os_version\n self.sut_kernel_version = sut_info.kernel_version\n \n \n class DTSResult(BaseResult):\n- \"\"\"\n- Stores environment information and test results from a DTS run, which are:\n- * Execution level information, such as SUT and TG hardware.\n- * Build target level information, such as compiler, target OS and cpu.\n- * Test suite results.\n- * All errors that are caught and recorded during DTS execution.\n+ \"\"\"Stores environment information and test results from a DTS run.\n \n- The information is stored in nested objects.\n+ * Execution level information, such as testbed and the test suite list,\n+ * Build target level information, such as compiler, target OS and cpu,\n+ * Test suite and test case results,\n+ * All errors that are caught and recorded during DTS execution.\n \n- The class is capable of computing the return code used to exit DTS with\n- from the stored error.\n+ The information is stored hierarchically. This is the first level of the hierarchy\n+ and as such is where the data form the whole hierarchy is collated or processed.\n \n- It also provides a brief statistical summary of passed/failed test cases.\n+ The internal list stores the results of all executions.\n+\n+ Attributes:\n+ dpdk_version: The DPDK version to record.\n \"\"\"\n \n dpdk_version: str | None\n@@ -284,6 +441,11 @@ class DTSResult(BaseResult):\n _stats_filename: str\n \n def __init__(self, logger: DTSLOG):\n+ \"\"\"Extend the constructor with top-level specifics.\n+\n+ Args:\n+ logger: The logger instance the whole result will use.\n+ \"\"\"\n super(DTSResult, self).__init__()\n self.dpdk_version = None\n self._logger = logger\n@@ -293,21 +455,33 @@ def __init__(self, logger: DTSLOG):\n self._stats_filename = os.path.join(SETTINGS.output_dir, \"statistics.txt\")\n \n def add_execution(self, sut_node: NodeConfiguration) -> ExecutionResult:\n+ \"\"\"Add and return the inner result (execution).\n+\n+ Args:\n+ sut_node: The SUT node's test run configuration.\n+\n+ Returns:\n+ The execution's result.\n+ \"\"\"\n execution_result = ExecutionResult(sut_node)\n self._inner_results.append(execution_result)\n return execution_result\n \n def add_error(self, error: Exception) -> None:\n+ \"\"\"Record an error that occurred outside any execution.\n+\n+ Args:\n+ error: The exception to record.\n+ \"\"\"\n self._errors.append(error)\n \n def process(self) -> None:\n- \"\"\"\n- Process the data after a DTS run.\n- The data is added to nested objects during runtime and this parent object\n- is not updated at that time. This requires us to process the nested data\n- after it's all been gathered.\n+ \"\"\"Process the data after a whole DTS run.\n+\n+ The data is added to inner objects during runtime and this object is not updated\n+ at that time. This requires us to process the inner data after it's all been gathered.\n \n- The processing gathers all errors and the result statistics of test cases.\n+ The processing gathers all errors and the statistics of test case results.\n \"\"\"\n self._errors += self.get_errors()\n if self._errors and self._logger:\n@@ -321,8 +495,10 @@ def process(self) -> None:\n stats_file.write(str(self._stats_result))\n \n def get_return_code(self) -> int:\n- \"\"\"\n- Go through all stored Exceptions and return the highest error code found.\n+ \"\"\"Go through all stored Exceptions and return the final DTS error code.\n+\n+ Returns:\n+ The highest error code found.\n \"\"\"\n for error in self._errors:\n error_return_code = ErrorSeverity.GENERIC_ERR\n", "prefixes": [ "v7", "09/21" ] }{ "id": 134386, "url": "