summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorAndrea Grandi <agrandi@google.com>2022-07-20 11:34:38 -0700
committerChromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com>2022-10-03 19:06:27 +0000
commit603b1dbb16a627ae0ab0649b62cf4399f9e30d6e (patch)
tree1e7fd3bcba42bf5eb860f7061a63a7d8d87929e0 /test
parentae46ad669ef137b799c9741ab8c73658dfca6b5e (diff)
downloadchrome-ec-603b1dbb16a627ae0ab0649b62cf4399f9e30d6e.tar.gz
run_device_tests.py: Set check=False in subprocess.run()
Explicitly set check=False (default value) so subprocess-run-check is no longer required. BUG=b:239100048 TEST=cros lint test/run_device_tests.py BRANCH=none Signed-off-by: Andrea Grandi <agrandi@google.com> Change-Id: I58f4687162decb96b5b138b6cbee5d8eefdda9c9 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3778224 Reviewed-by: Bobby Casey <bobbycasey@google.com> Reviewed-by: Tom Hughes <tomhughes@chromium.org> Tested-by: Bobby Casey <bobbycasey@google.com>
Diffstat (limited to 'test')
-rwxr-xr-xtest/run_device_tests.py16
1 files changed, 4 insertions, 12 deletions
diff --git a/test/run_device_tests.py b/test/run_device_tests.py
index c21f24fe9c..cd0914c90f 100755
--- a/test/run_device_tests.py
+++ b/test/run_device_tests.py
@@ -472,9 +472,7 @@ def power(board_config: BoardConfig, power_on: bool) -> None:
board_config.servo_power_enable + ":" + state,
]
logging.debug('Running command: "%s"', " ".join(cmd))
- subprocess.run(
- cmd
- ).check_returncode() # pylint: disable=subprocess-run-check
+ subprocess.run(cmd, check=False).check_returncode()
def hw_write_protect(enable: bool) -> None:
@@ -489,9 +487,7 @@ def hw_write_protect(enable: bool) -> None:
"fw_wp_state:" + state,
]
logging.debug('Running command: "%s"', " ".join(cmd))
- subprocess.run(
- cmd
- ).check_returncode() # pylint: disable=subprocess-run-check
+ subprocess.run(cmd, check=False).check_returncode()
def build(test_name: str, board_name: str, compiler: str) -> None:
@@ -508,9 +504,7 @@ def build(test_name: str, board_name: str, compiler: str) -> None:
]
logging.debug('Running command: "%s"', " ".join(cmd))
- subprocess.run(
- cmd
- ).check_returncode() # pylint: disable=subprocess-run-check
+ subprocess.run(cmd, check=False).check_returncode()
def flash(
@@ -538,9 +532,7 @@ def flash(
]
)
logging.debug('Running command: "%s"', " ".join(cmd))
- completed_process = subprocess.run(
- cmd
- ) # pylint: disable=subprocess-run-check
+ completed_process = subprocess.run(cmd, check=False)
return completed_process.returncode == 0