-
Notifications
You must be signed in to change notification settings - Fork 3k
Add Mbed Configuration Option Range Limits #8673
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
34827da
to
c289b5c
Compare
c289b5c
to
a834794
Compare
@theotherjimmy Updated, rebased, and retested. New error format:
|
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.
Super slick feature! A few questions/suggestions below.
Minor reformat of error text on accepted value messages
d5bca28
to
7a43666
Compare
@theotherjimmy @bridadan Fairly substantial rework to better handle all string/integer formats:
As a result it does look a bit grosser than before, let me know your thoughts. @theotherjimmy Question in regards to: This is checking if the expected exception message is in the actual exception string which means if the test throws additional exceptions but the first part of the message stays the same it will pass. For example: If I expect
but get the same exception with the addition of
That will pass. Changing that "is in" to a hard check if the strings match one to one causes several other tests to fail such as the duplicate lib test as the actual exception contains path information that we can't hardcode so I'm assuming this was done on purpose. Just a heads up that with how I'm generating exceptions there is a test gap as is. |
Huh, very interesting, thanks for checking that. Maybe something like a regular expression would be fitting here? |
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.
Some simplifications and another question or two.
Move JSON accepted value ranges back to JSON array
@bridadan Refactored, awesome find with the automagic int conversions looks much cleaner. Changed the JSON formats back to the array format, but print out a comma separated string list on exceptions for better readability. I'll sync with you tomorrow on my thoughts of updating the expected exception message logic. |
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.
Looking really good! Two more little nit picks but I think we're getting there!
Co-Authored-By: kegilbert <[email protected]>
@bridadan Updated! |
Well darn. @kegilbert Please take a look at the pytest failure. |
Forgot to update the expected error message in the test case, should be fixed. |
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.
Very nice work! Thanks for being so speedy getting the feedback integrated 👍
Thanks for giving the feedback! |
/morph build |
Build : SUCCESSBuild number : 3654 Triggering tests/morph test |
Exporter Build : SUCCESSBuild number : 3261 |
Test : SUCCESSBuild number : 3434 |
Description
Add optional range limits and accepted value lists to configuration option default and overridden values.
Added some rudimentary tests, let me know if you'd like any more. Will squash after the review period.
Example output with multiple invalid configurations in a Mbed OS build:
You can see the proposed JSON format in the added test files.
Pull request type