[edk2-devel] [PATCH] BaseTools/Python: Add missing FatalError handling
Irene Park
ipark at nvidia.com
Fri May 29 07:27:21 UTC 2020
Hi Bob,
Thanks for the review.
Here is the original description of the issue.
There has been a build failure from SCT, related to https://edk2.groups.io/g/devel/message/60407?p=,,,20,0,0,0::relevance,,gEfiFormBrowserExProtocolGuid,20,2,0,74529350. ( https://edk2.groups.io/g/devel/message/60407?p=,,,20,0,0,0::relevance,,gEfiFormBrowserExProtocolGuid,20,2,0,74529350 )
The build log printed the error code obviously but returned with sys.exit(0).
Unfortunately this behavior confused the build system and made me notice the failure so late.
If there is a concern of the conflict among multiple autogenworkers, I wonder how you think this way.
1. No change in BaseTools/Source/Python/AutoGen/AutoGenWorker.py
2. BaseTools/Source/Python/build/build.py
--- 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 << Use a fixed error type of FatalError instead of getting the exact error type from the autogenworkers.
+ return rt, err
except FatalError as e:
return False, e.args[0]
except:
In this way, no change in the multi-thread operation and build.py is able to exit with a standard default error. It's not needed to catch the exact error type.
Please share your opinion.
Thanks,
Irene
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#60440): https://edk2.groups.io/g/devel/message/60440
Mute This Topic: https://groups.io/mt/74507933/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/edk2-devel-archive/attachments/20200529/c670b436/attachment.htm>
More information about the edk2-devel-archive
mailing list