Dependency cleanup: Move test.utils.var_log_messages_before_reboot to sys_utils.
The var_log_messages_before_reboot uses only standard Python module and utils
API and can be in sys_utils. This helps to prevent pulling extra dependency.
Also changed the name from lower_underline to CamelCase:
GetVarLogMessagesBeforeReboot
cros.factory.test.utils now becomes a pure package with empty __init__.py.
BUG=chromium:403712
TEST=make test
Change-Id: Icb1a522d8fb149b28e622ff8af70f4526067f1ac
Reviewed-on: https://chromium-review.googlesource.com/321050
Commit-Ready: Hung-Te Lin <hungte@chromium.org>
Tested-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Wei-Han Chen <stimim@chromium.org>
diff --git a/py/goofy/goofy.py b/py/goofy/goofy.py
index 2739301..5a08bbb 100755
--- a/py/goofy/goofy.py
+++ b/py/goofy/goofy.py
@@ -45,7 +45,6 @@
from cros.factory.test import phase
from cros.factory.test import shopfloor
from cros.factory.test import state
-from cros.factory.test import utils
from cros.factory.test.test_lists import test_lists
from cros.factory.test.e2e_test.common import (
AutomationMode, AutomationModePrompt, ParseAutomationMode)
@@ -399,7 +398,7 @@
return
try:
- var_log_messages = utils.var_log_messages_before_reboot()
+ var_log_messages = sys_utils.GetVarLogMessagesBeforeReboot()
logging.info(
'Tail of /var/log/messages before last reboot:\n'
'%s', ('\n'.join(
@@ -556,7 +555,7 @@
if var_log_messages is None:
try:
var_log_messages = (
- utils.var_log_messages_before_reboot())
+ sys_utils.GetVarLogMessagesBeforeReboot())
# Write it to the log, to make it easier to
# correlate with /var/log/messages.
logging.info(