Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit abb806b3 authored by Tao Bao's avatar Tao Bao
Browse files

releasetools: merge_target_files sets verbose in main.

The flag would otherwise be turned on unconditionally even when
importing merge_target_files as a module. As a result, `atest
releasetools_test` was broken / flaky prior to this change, as
PythonUnitTestResultParser doesn't like unexpected outputs in stderr.

Test: `atest releasetools_test releasetools_py3_test`
Change-Id: Ifd614c797d2cee3b33e4c2a7ad8e598850e9d60c
parent 7edc2b19
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -94,7 +94,6 @@ import ota_from_target_files
logger = logging.getLogger(__name__)

OPTIONS = common.OPTIONS
OPTIONS.verbose = True
OPTIONS.framework_target_files = None
OPTIONS.framework_item_list = None
OPTIONS.framework_misc_info_keys = None
@@ -1057,6 +1056,9 @@ def main():
    common.Usage(__doc__)
    sys.exit(1)

  # Always turn on verbose logging.
  OPTIONS.verbose = True

  if OPTIONS.framework_item_list:
    framework_item_list = common.LoadListFromFile(OPTIONS.framework_item_list)
  else: