[Scons-users] GetBuildFailures() question
Nikola Radovanovic
nikola.radovanovic at schneider-electric-dms.com
Tue Jul 23 11:24:03 EDT 2013
hi,
if i have a SConstruct file which calls several SConscript's and in SConstruct i have a callback to catch GetBuildFailures(). is it possible for me to conclude which SConscript call is failed based on GetBuildFailures()?
ie. let SConstruct looks like:
....
def atExit():
from SCons.Script import GetBuildFailures
bf = GetBuildFailures()
if bf:
# bf is normally a list of build failures; if an element is None,
# it's because of a target that scons doesn't know anything about.
status = 'failed'
failures_message = "\n".join(["Failed building %s" % bfToStr(x)
for x in bf if x is not None])
for x in bf:
if x is not None:
name = bfToStr(x)
print 'NAME: ', name # i would like here to see if SConscript from dir_1 or dir_2 has failed
.....
atexit.register(atExit)
....
SConscript('dir_1/SConscript', variant_dir = 'var_1', exports=...)
SConscript('dir_2/SConscript', variant_dir = 'var_2', exports=...)
thanks in advance
--
__________________________________________________________________________________________________________________
Nikola Radovanovic | Schneider Electric DMS NS | Smart Grid IT | SERBIA | CPASv2 team deputy
Phone: +381 (0)21 488 3633 | Fax: +381 (0)21 488 3789 | Mobile: +381 (0)64 29 74 528
Email: nikola.radovanovic at schneider-electric-dms.com<mailto:nikola.radovanovic at schneider-electric-dms.com> | Site: www.schneider-electric-dms.com<http://www.schneider-electric-dms.com/> | Address: Narodnog fronta 25A-D, 21000 Novi Sad
*** Please consider the environment before printing this e-mail
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://four.pairlist.net/pipermail/scons-users/attachments/20130723/bad52d7e/attachment-0001.htm
More information about the Scons-users
mailing list