Skip to content
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

Merged
merged 3 commits into from
Feb 28, 2025
Merged

tests: nightly: Fix and add more tests #84

merged 3 commits into from
Feb 28, 2025

Conversation

simensrostad
Copy link
Contributor

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.

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>
Copy link

@github-actions github-actions bot left a 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 the wait_for_str and wait_for_str_ordered methods, which could help in reducing the verbosity of error logs.

⚠️ Concerns

  • The removal of the UART log from error messages might make debugging more challenging if the log contains crucial information for diagnosing issues.
  1. 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):

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.

@simensrostad simensrostad merged commit 19e5838 into main Feb 28, 2025
2 checks passed
@simensrostad simensrostad deleted the fix/nightly branch February 28, 2025 11:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants