-
Notifications
You must be signed in to change notification settings - Fork 2
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
tests: nightly: Fix and add more tests #84
Conversation
Since cellular location method priority is no longer right after Wi-Fi, the location library will not combine Wi-Fi and cellular methods. Due to this we need to update the test to not expect a combined location request. Add additional checks to the same test to also verify that the device samples other sensor sources. Signed-off-by: Simen S. Røstad <simen.rostad@nordicsemi.no>
Remove excessive logging in tests Signed-off-by: Simen S. Røstad <simen.rostad@nordicsemi.no>
The test_location.py test was renamed to test_sampling.py to better reflect its purpose. Signed-off-by: Simen S. Røstad <simen.rostad@nordicsemi.no>
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.
🎯 Core Changes
- The primary change in this pull request is the refactoring of the test suite to accommodate changes in the location library's method priority. The test
test_sampling
now replaces the previous location tests, focusing on verifying that the device samples various sensor sources instead of expecting a combined location request. - The
uart.py
utility file has been updated to remove the UART log from the error message in thewait_for_str
andwait_for_str_ordered
methods, which could help in reducing the verbosity of error logs.
- The removal of the UART log from error messages might make debugging more challenging if the log contains crucial information for diagnosing issues.
- Verdict:
- Comment: The changes seem to be in line with the updated functionality of the location library and improve the test coverage for sensor sampling. However, the decision to remove the UART log from error messages should be reconsidered, as it may impact debugging efforts.
Code review performed by OPENAI - gpt-4o
.
run_location(t91x_board, hex_file, location_method="GNSS") | ||
|
||
def run_location(t91x_board, hex_file, location_method): | ||
def test_sampling(t91x_board, hex_file): |
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.
The refactoring of the test function from location-specific tests to a more general sampling test is appropriate given the changes in the location library. However, ensure that the new test adequately covers all necessary functionality previously tested.
Since cellular location method priority is no longer right after Wi-Fi, the location library will not combine Wi-Fi and cellular methods.
Due to this we need to update the test to not expect a combined location request.
Add additional checks to the same test to also verify that the device samples other sensor sources.