[Scons-dev] Tests fails

Tom Tanner (BLOOMBERG/ LONDON) ttanner2 at bloomberg.net
Mon Mar 3 11:57:56 EST 2014


Just been hunting around and apparently it's /dev/fd (rather than /proc/xxx/fd) on MacOS, and also apparently /dev/fd will work equally well for linux (although presumably ls -l /dev/fd will actually produce the handles ls has passed to it)

If someone who has MacOS could test that and see if it works and do a pull request.

----- Original Message -----
From: managan1 at llnl.gov
To: Tom Tanner (BLOOMBERG/ LONDON), scons-dev at scons.org
At: Mar 3 2014 16:43:43


Hi,

On OSX 10.7.5 I get this:

ls /proc/$$/fd | wc -l
ls: /proc/97956/fd: No such file or directory
0

So it appears that item 2 below is the culprit.

*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-
Rob Managan email managan at llnl.gov
LLNL phone: 925-423-0903
P.O. Box 808, L-095 FAX: 925-422-3389
Livermore, CA 94551-0808


On 3/3/14 1:19 AM, "Tom Tanner (BLOOMBERG/ LONDON)" <ttanner2 at bloomberg.net> wrote:


On the OSX one, it looks like you don't have SWIG and RANLIB installed and it's not recognising that it hasn't. I seem to
remember having to install a lot of software on my linux (Ubuntu) box in order to get the tests to run clean. If that's the case, I'd imagine it's a bug really.


The leaky-handles test is possibly an issue with OSX not behaving quite like other linuxes. In order to detect how many handles are open in a forked subshell, it runs
ls /proc/$$/fd | wc -l

and expects that to return 3 (stdin, stdout, stderr). If it doesn't, then either
1) python isn't closing files in a child process properly
2) OSX doesn't have a proc/<pid>/fd directory
3) OSX has other standard handles.
4) I've written the test wrong and it doesn't gracefully exit for non posix systems.

I don't have access to an OSX system so I can't really tell, though if it (os.name) returns 'posix' that should work.

Cheers

TT


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://two.pairlist.net/pipermail/scons-dev/attachments/20140303/85b3ad3f/attachment.htm>


More information about the Scons-dev mailing list