[Scons-dev] Subprocess issue on Linux?

Kenny, Jason L jason.l.kenny at intel.com
Wed Apr 9 15:35:21 EDT 2014


There has to be a little more to this as Part only does auto detection of tools, and this is working fine in Parts from our tests. ( and the fact the builds did not utterly break because it could not find a tool)

Jason

-----Original Message-----
From: scons-dev-bounces at scons.org [mailto:scons-dev-bounces at scons.org] On Behalf Of Dirk Bächle
Sent: Wednesday, April 09, 2014 2:28 PM
To: SCons developer list
Subject: Re: [Scons-dev] Subprocess issue on Linux?

On 09.04.2014 19:24, Bill Deegan wrote:

> Dirk,

>

> That's pretty impressive!

> Does it pass the full regression suite?

>


No, it doesn't work:

501/1110 (45.14%) /usr/bin/python -tt test/LEX/live.py /home/dirk/workspace/scons_dirkbaechle/src/script/scons.py returned 2 STDOUT =========================================================================
scons: Reading SConscript files ...

STDERR
=========================================================================
KeyError: 'PATH':
File "/tmp/testcmd.4854.Zu6ZsJ/SConstruct", line 2:
foo = Environment()
File
"/home/dirk/workspace/scons_dirkbaechle/src/script/../engine/SCons/Environment.py",
line 1003:
apply_tools(self, tools, toolpath)
File
"/home/dirk/workspace/scons_dirkbaechle/src/script/../engine/SCons/Environment.py",
line 107:
env.Tool(tool)
File
"/home/dirk/workspace/scons_dirkbaechle/src/script/../engine/SCons/Environment.py",
line 1787:
tool(self)
File
"/home/dirk/workspace/scons_dirkbaechle/src/script/../engine/SCons/Tool/__init__.py",
line 183:
self.generate(env, *args, **kw)
File
"/home/dirk/workspace/scons_dirkbaechle/src/script/../engine/SCons/Tool/default.py",
line 40:
for t in SCons.Tool.tool_list(env['PLATFORM'], env):
File
"/home/dirk/workspace/scons_dirkbaechle/src/script/../engine/SCons/Tool/__init__.py",
line 819:
], env)
File
"/home/dirk/workspace/scons_dirkbaechle/src/script/../engine/SCons/Tool/__init__.py",
line 690:
return list(filter (ToolExists, tools))
File
"/home/dirk/workspace/scons_dirkbaechle/src/script/../engine/SCons/Tool/__init__.py",
line 689:
return Tool(tool).exists(env)
File
"/home/dirk/workspace/scons_dirkbaechle/src/script/../engine/SCons/Tool/wix.py",
line 71:
for path in os.environ['PATH'].split(os.pathsep):
File "/usr/lib/python2.7/UserDict.py", line 23:
raise KeyError(key)

FAILED test of /home/dirk/workspace/scons_dirkbaechle/src/script/scons.py


Looks like the wrapping of Subprocess.Popen in stubprocess.py prevents the os.environ settings to get through, so all tests that setup a simple Environment and auto-detect Tools are bound to fail. :(

Dirk

_______________________________________________
Scons-dev mailing list
Scons-dev at scons.org
http://two.pairlist.net/mailman/listinfo/scons-dev


More information about the Scons-dev mailing list