aboutsummaryrefslogtreecommitdiff
path: root/pw_doctor
diff options
context:
space:
mode:
authorRob Mohr <mohrr@google.com>2020-11-09 15:43:43 -0800
committerCQ Bot Account <pigweed-scoped@luci-project-accounts.iam.gserviceaccount.com>2020-11-18 20:11:14 +0000
commit298d309ecf4434087197255504bbd69b86a92c95 (patch)
tree1c0b06021561b9af576ac28a84561358996d8cd5 /pw_doctor
parent80246796fe76b3a45681685c5c005475eee62a04 (diff)
downloadpigweed-298d309ecf4434087197255504bbd69b86a92c95.tar.gz
pw_doctor: Check that pw plugins all loaded
Change-Id: I147d1eb552be601421ed358ae5a4b9785a4b1320 Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/24220 Pigweed-Auto-Submit: Rob Mohr <mohrr@google.com> Commit-Queue: Auto-Submit <auto-submit@pigweed.google.com.iam.gserviceaccount.com> Reviewed-by: Armando Montanez <amontanez@google.com>
Diffstat (limited to 'pw_doctor')
-rwxr-xr-xpw_doctor/py/pw_doctor/doctor.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/pw_doctor/py/pw_doctor/doctor.py b/pw_doctor/py/pw_doctor/doctor.py
index 58cd1d898..e1ba7adcf 100755
--- a/pw_doctor/py/pw_doctor/doctor.py
+++ b/pw_doctor/py/pw_doctor/doctor.py
@@ -26,6 +26,8 @@ import sys
import tempfile
from typing import Callable, Iterable, List, Set
+import pw_cli.plugins
+
def call_stdout(*args, **kwargs):
kwargs.update(stdout=subprocess.PIPE)
@@ -127,6 +129,12 @@ CHECKS: List[Callable] = []
@register_into(CHECKS)
+def pw_plugins(ctx: DoctorContext):
+ if pw_cli.plugins.errors():
+ ctx.error('Not all pw plugins loaded successfully')
+
+
+@register_into(CHECKS)
def env_os(ctx: DoctorContext):
"""Check that the environment matches this machine."""
if '_PW_ACTUAL_ENVIRONMENT_ROOT' not in os.environ: