summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrea Grandi <agrandi@google.com>2022-07-15 13:11:03 -0700
committerChromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com>2022-07-20 05:09:11 +0000
commitc25e7f933d41ac79637fb3c198afa3cadfbd75ef (patch)
treecb20d708bc9137b69337488c5876b4918e7b678d
parentc4235aec3722172488b80816f0ff24ed45a9d353 (diff)
downloadchrome-ec-c25e7f933d41ac79637fb3c198afa3cadfbd75ef.tar.gz
run_device_tests.py: Update disabled linter options
The latest version of Pylint introduced new checkers that are flagging errors in lines of code where Pylint errors had already been disabled. Update pylint disable directives to suppress import errors. 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: I6d2dd2f1660cb34f2bff0a1ed073825b80f5da6a Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3766498 Reviewed-by: Tom Hughes <tomhughes@chromium.org>
-rwxr-xr-xtest/run_device_tests.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/test/run_device_tests.py b/test/run_device_tests.py
index 6884bed674..85f092a0c8 100755
--- a/test/run_device_tests.py
+++ b/test/run_device_tests.py
@@ -300,7 +300,7 @@ class AllTests:
if not have_private:
return []
sys.path.append(private_dir)
- import private_tests # pylint: disable=import-error
+ import private_tests # pylint: disable=import-error,import-outside-toplevel
for test_args in private_tests.tests:
tests.append(TestConfig(**test_args))
@@ -358,9 +358,7 @@ def read_file_gsutil(path: str) -> bytes:
cmd = ["gsutil", "cat", path]
logging.debug('Running command: "%s"', " ".join(cmd))
- gsutil = subprocess.run(
- cmd, stdout=subprocess.PIPE
- ) # pylint: disable=subprocess-run-check
+ gsutil = subprocess.run(cmd, stdout=subprocess.PIPE, check=False)
gsutil.check_returncode()
return gsutil.stdout