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

Commit b67ff3e1 authored by Luca Farsi's avatar Luca Farsi Committed by Gerrit Code Review
Browse files

Merge "Properly log in build_test_suites.py" into main

parents e72dcd54 2eaa5d0b
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -28,6 +28,7 @@ import optimized_targets

REQUIRED_ENV_VARS = frozenset(['TARGET_PRODUCT', 'TARGET_RELEASE', 'TOP'])
SOONG_UI_EXE_REL_PATH = 'build/soong/soong_ui.bash'
LOG_PATH = 'logs/build_test_suites.log'


class Error(Exception):
@@ -181,4 +182,12 @@ def run_command(args: list[str], stdout=None):


def main(argv):
  dist_dir = os.environ.get('DIST_DIR')
  if dist_dir:
    log_file = pathlib.Path(dist_dir) / LOG_PATH
    logging.basicConfig(
        level=logging.DEBUG,
        format='%(asctime)s %(levelname)s %(message)s',
        filename=log_file,
    )
  sys.exit(build_test_suites(argv))