diff options
author | Gary Oberbrunner <garyo@oberbrunner.com> | 2008-10-29 03:01:00 (GMT) |
---|---|---|
committer | Gary Oberbrunner <garyo@oberbrunner.com> | 2008-10-29 03:01:00 (GMT) |
commit | 652d80b36bf9e80989336bf7a25b54c176ff626c (patch) | |
tree | 93f780a267396d95f9bfeba9c48da963a81abf05 /QMTest/TestCommon.py | |
parent | d695652a34c6740b3c925a94b45256270027f473 (diff) | |
download | SCons-652d80b36bf9e80989336bf7a25b54c176ff626c.zip SCons-652d80b36bf9e80989336bf7a25b54c176ff626c.tar.gz SCons-652d80b36bf9e80989336bf7a25b54c176ff626c.tar.bz2 |
Applied Benoit Belley's patch in ticket 1957 improve the robustness of
GetBuildFailures(). New function convert_to_buildError, and use it in
several places so all build failures now go through it and are
returned as BuildError exceptions. Had a small effect on output
formatting in many tests but no significant change to behavior. I
reworked the patch a little to keep SCons exit status values the same
as before; this patch could make it simpler to change them in some
cases, e.g. exit with the errno of the failed action if desired. One
nice side effect of this patch is that more scons errors print the
node that caused the error now.
Diffstat (limited to 'QMTest/TestCommon.py')
-rw-r--r-- | QMTest/TestCommon.py | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/QMTest/TestCommon.py b/QMTest/TestCommon.py index 8a3ad37..167f84d 100644 --- a/QMTest/TestCommon.py +++ b/QMTest/TestCommon.py @@ -220,12 +220,13 @@ if os.name == 'posix': return None return _status(self) != status def _status(self): - if os.WIFEXITED(self.status): - return os.WEXITSTATUS(self.status) - elif os.WIFSIGNALED(self.status): - return os.WTERMSIG(self.status) - else: - return None + return self.status # p.wait() has already retrieved the OS status from the status val; don't do it again here! +# if os.WIFEXITED(self.status): +# return os.WEXITSTATUS(self.status) +# elif os.WIFSIGNALED(self.status): +# return os.WTERMSIG(self.status) +# else: +# return None elif os.name == 'nt': def _failed(self, status = 0): return not (self.status is None or status is None) and \ |