xbuddy: Remove xbuddy files from platform.
Delete the following files:
android_build.py
artifact_info.py
build_artifact.py
build_artifact_unittest.py
build_util.py
common_util.py
common_util_unittest.py
devserver_constants.py
downloader.py
downloader_unittest.py
log_util.py
retry.py
xbuddy.py
xbuddy_unittest.py
shadow_xbuddy_config.ini
xbuddy_config.ini
Update the imports in the following files:
autoupdate.py
autoupdate_unittest.py
builder.py
cros_update_progress.py
devserver.py
devserver_integration_test.py
health_checker.py
Rename log_util.py to cherrypy_log_util.py
Remove files from Makefile
Fix lint errors in builder.py
Patchset 1 is the file deletion, subsequent patchsets have code changes.
BUG=chromium:1003986
TEST=unittests, cros flash, devserver_integration_test
Cq-Depend: chromium:1894475
Change-Id: I4e70d0971eda00263a69906a6c1b11a3014d947c
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/dev-util/+/1893644
Tested-by: Achuith Bhandarkar <achuith@chromium.org>
Reviewed-by: Amin Hassani <ahassani@chromium.org>
Commit-Queue: Achuith Bhandarkar <achuith@chromium.org>
diff --git a/health_checker.py b/health_checker.py
index 20a56c0..d978fdb 100644
--- a/health_checker.py
+++ b/health_checker.py
@@ -17,13 +17,9 @@
import cherrypy # pylint: disable=import-error
import cros_update_progress
-import log_util
-
-def _Log(message, *args):
- """Module-local log function."""
- return log_util.LogWithTag('HEALTHCHECKER', message, *args)
-
+import setup_chromite # pylint: disable=unused-import
+from chromite.lib.xbuddy import cherrypy_log_util
try:
import psutil
@@ -32,18 +28,18 @@
# "cros flash" can still update duts with build without psutil installed.
# The reason is that, during cros flash, local devserver code is copied over
# to DUT, and devserver will be running inside DUT to stage the build.
- _Log('Python module psutil is not installed, devserver load data will not be '
- 'collected')
psutil = None
-except OSError as e:
+except OSError:
# Ignore error like following. psutil may not work properly in builder. Ignore
# the error as load information of devserver is not used in builder.
# OSError: [Errno 2] No such file or directory: '/dev/pts/0'
- _Log('psutil is failed to be imported, error: %s. devserver load data will '
- 'not be collected.', e)
psutil = None
+def _Log(message, *args):
+ """Module-local log function."""
+ return cherrypy_log_util.LogWithTag('HEALTHCHECKER', message, *args)
+
# Number of seconds between the collection of disk and network IO counters.
STATS_INTERVAL = 10.0
_1G = 1000000000