summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrea Grandi <agrandi@google.com>2022-07-15 12:52:18 -0700
committerChromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com>2022-07-20 05:08:54 +0000
commitd43c815ee7a12a1fc3c930faf8c003a12f623d82 (patch)
treee416e45f9f5dd6222e66622ff0a05a2e3a6d65da
parentf47f0150046ede643a46e68e5196d7d52564acc0 (diff)
downloadchrome-ec-d43c815ee7a12a1fc3c930faf8c003a12f623d82.tar.gz
run_device_tests.py: Add missing docstrings
Pylint reports several missing docstring errors: C0116: Missing function or method docstring (missing-function-docstring) Add documentation where required. BUG=b:239100048 TEST=cros lint test/run_device_tests.py BRANCH=none Signed-off-by: Andrea Grandi <agrandi@google.com> Change-Id: I006cd21faf3e149b8fb76a49e644afd16db316e2 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3766496 Reviewed-by: Tom Hughes <tomhughes@chromium.org>
-rwxr-xr-xtest/run_device_tests.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/test/run_device_tests.py b/test/run_device_tests.py
index 3fac1c5d25..001be8a204 100755
--- a/test/run_device_tests.py
+++ b/test/run_device_tests.py
@@ -178,6 +178,7 @@ class AllTests:
@staticmethod
def get(board_config: BoardConfig) -> List[TestConfig]:
+ """Return public and private test configs for the specified board."""
public_tests = AllTests.get_public_tests(board_config)
private_tests = AllTests.get_private_tests()
@@ -185,6 +186,7 @@ class AllTests:
@staticmethod
def get_public_tests(board_config: BoardConfig) -> List[TestConfig]:
+ """Return public test configs for the specified board."""
tests = [
TestConfig(test_name="aes"),
TestConfig(test_name="cec"),
@@ -289,7 +291,7 @@ class AllTests:
@staticmethod
def get_private_tests() -> List[TestConfig]:
- # Return all private tests, if the folder exists
+ """Return private test configs for the specified board, if available."""
tests = []
try:
current_dir = os.path.dirname(__file__)
@@ -549,6 +551,7 @@ def readlines_until_timeout(executor, f: BinaryIO, timeout_secs: int) -> List[by
def process_console_output_line(line: bytes, test: TestConfig):
+ """Parse console output line and update test pass/fail counters."""
try:
line_str = line.decode()
@@ -640,6 +643,7 @@ def get_test_list(config: BoardConfig, test_args) -> List[TestConfig]:
def parse_remote_arg(remote: str) -> str:
+ """Convert the 'remote' input argument to IP address, if available."""
if not remote:
return ""
@@ -652,6 +656,7 @@ def parse_remote_arg(remote: str) -> str:
def main():
+ """Run unit tests on device and displays the results."""
parser = argparse.ArgumentParser()
default_board = "bloonchipper"