-
Notifications
You must be signed in to change notification settings - Fork 3k
[Tools] Handling Exceptions better when building tests #2855
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
result = False | ||
|
||
if continue_on_build_fail: | ||
continue | ||
else: | ||
break | ||
else: | ||
raise |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This whole thing could also be:
except NotSupportedException:
pass
except ToolException:
result = False
if continue_on_build_fail:
continue
else:
break
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That it could, and it is now so
5adb2f7
to
fa3257d
Compare
Previously, when building tests with test.py, if an exception occurred, the error message would be masked by the function 'build_tests'. This commit handles NotSupportedExceptions and ToolExceptions, but lets all other Exceptions propigate up to the caller function. In most cases, this is the CLI scripts, which will print a traceback. This will allow us to better debug the python tools if errors occur.
fa3257d
to
cadcc80
Compare
/morph test |
Result: FAILUREYour command has finished executing! Here's what you wrote!
Outputmbed Build Number: null Examples Build failed! |
Oops this was my fault! Messing with CI again, retriggering now. /morph test |
Result: SUCCESSYour command has finished executing! Here's what you wrote!
Outputmbed Build Number: 993 All builds and test passed! |
@sg- Should be good to go |
Description
Previously, when building tests with
test.py
, if an exception occurred, theerror message would be masked by the function 'build_tests'. This commit
handles
NotSupportedException
s andToolException
s, but lets all otherExceptions propigate up to the caller function. In most cases, this is the
CLI scripts, which will print a traceback. This will allow us to better
debug the python tools if errors occur.
Status
READY
Migrations
If this PR changes any APIs or behaviors, give a short description of what API users should do when this PR is merged.
NO
Todos