Bug 1520394 - Send old-configure output through logging. r=nalexander
authorMike Hommey <mh+mozilla@glandium.org>
Wed, 16 Jan 2019 21:44:42 +0000
changeset 514176 f611bc50d11cae1f48cc44d1468f2c34ec46e287
parent 514175 9a00f3b44547afcdec22dc3d5bfe93e41c4ee843
child 514177 596f8d9346ece3e6815d1af5460e9557ca91aec3
push id1953
push userffxbld-merge
push dateMon, 11 Mar 2019 12:10:20 +0000
treeherdermozilla-release@9c35dcbaa899 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersnalexander
bugs1520394
milestone66.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1520394 - Send old-configure output through logging. r=nalexander Rather than letting it go through to sys.stdout/sys.stderr directly. Differential Revision: https://phabricator.services.mozilla.com/D16665
build/moz.configure/old.configure
--- a/build/moz.configure/old.configure
+++ b/build/moz.configure/old.configure
@@ -328,17 +328,25 @@ def old_configure(prepare_configure, pre
     logger = logging.getLogger('moz.configure')
     for handler in logger.handlers:
         if isinstance(handler, logging.FileHandler):
             handler.close()
             logger.removeHandler(handler)
 
     log_size = os.path.getsize('config.log')
 
-    ret = subprocess.call(cmd, env=encode(env))
+    proc = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT,
+                            env=encode(env))
+    while True:
+        line = proc.stdout.readline()
+        if not line:
+            break
+        log.info(line.rstrip())
+
+    ret = proc.wait()
     if ret:
         with log.queue_debug():
             with encoded_open('config.log', 'r') as fh:
                 fh.seek(log_size)
                 for line in fh:
                     log.debug(line.rstrip())
             log.error('old-configure failed')
         sys.exit(ret)