diff options
author | Irene Park <ipark@nvidia.com> | 2020-06-03 05:58:50 +0800 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2020-06-07 12:51:25 +0000 |
commit | 28dd887d68409c8788c858e29063ee599ebaaa91 (patch) | |
tree | b895573144b46d42a21dd95ee99c22e9b3d93d12 /BaseTools | |
parent | 037d86dd7a9ef36c85bf416d358f2ef60a4940b3 (diff) | |
download | edk2-28dd887d68409c8788c858e29063ee599ebaaa91.zip edk2-28dd887d68409c8788c858e29063ee599ebaaa91.tar.gz edk2-28dd887d68409c8788c858e29063ee599ebaaa91.tar.bz2 |
BaseTools/build.py: Exit with 1 when AutoGen error occurred
AutoGen manager/workers halt the progress when an error occurs but
doesn't propagate the error code to main and allows main exit with 0
and gets the build system unable to catch the occurrence of an error.
This change informs main with an error when a progress is halted and
helps main exit with 1.
Signed-off-by: Irene Park <ipark@nvidia.com>
Reviewed-by: Bob Feng<bob.c.feng@intel.com>
Diffstat (limited to 'BaseTools')
-rwxr-xr-x | BaseTools/Source/Python/build/build.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/BaseTools/Source/Python/build/build.py b/BaseTools/Source/Python/build/build.py index ed3a3b9..1ab1e60 100755 --- a/BaseTools/Source/Python/build/build.py +++ b/BaseTools/Source/Python/build/build.py @@ -880,7 +880,10 @@ class Build(): self.AutoGenMgr.join()
rt = self.AutoGenMgr.Status
- return rt, 0
+ err = 0
+ if not rt:
+ err = UNKNOWN_ERROR
+ return rt, err
except FatalError as e:
return False, e.args[0]
except:
@@ -2724,4 +2727,3 @@ if __name__ == '__main__': ## 0-127 is a safe return range, and 1 is a standard default error
if r < 0 or r > 127: r = 1
sys.exit(r)
-
|