Date
1 - 2 of 2
[PATCH 2.3.1 1/1] Include stdout for build commands using site scons logger
Alireza Assadzadeh <Alireza.Assadzadeh@...>
Update OpenMAMA site_scons logger to include stdout for build
commands as well as stderr. Hence, Windows builds details of the compile/link error (if any) from MSVS CL command-line. Signed-off-by: Alireza Assadzadeh <Alireza.Assadzadeh@...> --- The patch is based on 'next' branch. This was tested and used with scons builds on Windows with MSVS 2010 and Linux with GCC. site_scons/logger.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/site_scons/logger.py b/site_scons/logger.py index acb5123..59e857f 100644 --- a/site_scons/logger.py +++ b/site_scons/logger.py @@ -36,6 +36,13 @@ class Logger: if self.opts['verbose'] == True: sys.stderr.write('WARNING:: %s' % (stderr)) self.fd.write('%s\n' % (stderr)) + # Include stdout logs if there are any. This is especially + # helpful in Windows builds where MSVS CL command-line sends + # useful errors/warnings to stdout instead of stderr. + if len(stdout) > 0: + if self.opts['verbose'] == True: + sys.stdout.write('WARNING::stdout: %s' % (stdout)) + self.fd.write('stdout: %s\n' % (stdout)) return p.returncode def log_command(self, s, target, src, env): -- 1.9.3
|
|
Gary Molloy <g.molloy@...>
Hi Alireza,
toggle quoted messageShow quoted text
Thanks for your patch. I have had a look at it and it looks good. I have logged it in Bugzilla for you as http://bugs.openmama.org/show_bug.cgi?id=187 Thanks, Gary Gary Molloy – SR Labs Adelaide Exchange | 24-26 Adelaide Street | Belfast | BT2 8GD g.molloy@...
-----Original Message-----
From: openmama-dev-bounces@... [mailto:openmama-dev-bounces@...] On Behalf Of Alireza Assadzadeh Sent: 06 April 2015 20:11 To: openmama-dev@... Subject: [Openmama-dev] [PATCH 2.3.1 1/1] Include stdout for build commands using site scons logger Update OpenMAMA site_scons logger to include stdout for build commands as well as stderr. Hence, Windows builds details of the compile/link error (if any) from MSVS CL command-line. Signed-off-by: Alireza Assadzadeh <Alireza.Assadzadeh@...> --- The patch is based on 'next' branch. This was tested and used with scons builds on Windows with MSVS 2010 and Linux with GCC. site_scons/logger.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/site_scons/logger.py b/site_scons/logger.py index acb5123..59e857f 100644 --- a/site_scons/logger.py +++ b/site_scons/logger.py @@ -36,6 +36,13 @@ class Logger: if self.opts['verbose'] == True: sys.stderr.write('WARNING:: %s' % (stderr)) self.fd.write('%s\n' % (stderr)) + # Include stdout logs if there are any. This is especially + # helpful in Windows builds where MSVS CL command-line sends + # useful errors/warnings to stdout instead of stderr. + if len(stdout) > 0: + if self.opts['verbose'] == True: + sys.stdout.write('WARNING::stdout: %s' % (stdout)) + self.fd.write('stdout: %s\n' % (stdout)) return p.returncode def log_command(self, s, target, src, env): -- 1.9.3
|
|