-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Add reusable InT test scripts #3618
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
kevin-f-ortega
left a comment
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.
@chuynh4duarte, looks good to me. I added some comments for you to address. Thank you
Svc/PrmDb/test/int/test_cmd_PrmDb.py
Outdated
|
|
||
| # 1st remove file PrmDB.dat (manually) | ||
| # setup directory to remove later | ||
| fprime_test_api.send_and_assert_command(fprime_test_api.getCmdDispName('Svc.FileManager') + '.' + 'CreateDirectory', ["/tmp/PrmDb"], max_delay=5) |
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 will need to get prmdb filename from fprime_test_api
Svc/PrmDb/test/int/test_cmd_PrmDb.py
Outdated
| # send PRM_SAVE_FILE (Wrote 0 records) | ||
| fprime_test_api.send_and_assert_command(fprime_test_api.getCmdDispName('Svc.PrmDb') + '.' + 'PRM_SAVE_FILE', max_delay=1) | ||
| # Verify PrmDB.dat is empty open /tmp/save_file1 (PrmDb.dat file = 0bytes ) | ||
| fprime_test_api.send_and_assert_command(fprime_test_api.getCmdDispName('Svc.FileManager') + '.' + 'ShellCommand', ["ls -lagt", "/tmp/PrmDb/save_file1"], max_delay=5) |
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.
Same here
|
|
||
| Tests command send, dispatch, and receipt using send_and_assert command with a pair of version commands. | ||
| """ | ||
| fprime_test_api.send_and_assert_command(fprime_test_api.getCmdDispName('Svc.Version') + '.' + 'VERSION',["PROJECT"], max_delay=1) |
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 looks good. I would like to add a check that the event reports the expected fsw version and that the telemetry channel matches too.
Same for the other commands like FRAMEWORK, LIBRARY, CUSTOM, ALL
|
@chuynh4duarte, could you also add the Ref config json file to the Ref/test/int directory? |
kevin-f-ortega
left a comment
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.
A few minor updates
| pingRcvr = fprime_test_api.await_telemetry(fprime_test_api.get_mnemonic('Ref.PingReceiver') + "." + "PR_NumPings", start="NOW") | ||
| # If no constraints are specified on the channels, the predicate will always return true | ||
| ping_change = fprime_test_api.get_telemetry_pred(fprime_test_api.get_mnemonic('Ref.PingReceiver') + "." + "PR_NumPings", pingRcvr) |
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.
Unfortunately, we cannot use Ref.PingReceiver. This is a component that is specific to the Ref deployment. Other projects will not know what is Ref.PingReceiver.
So I would remove any telemetry that relies on the Ref deployment
| fprime_test_api.assert_event_count(pred, actHi_events) | ||
|
|
||
| # Expect number no change (stale or stop) | ||
| pingRcvr1 = fprime_test_api.await_telemetry(fprime_test_api.get_mnemonic('Ref.PingReceiver') + "." + "PR_NumPings", start="NOW") |
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.
Another usage of a Ref component. You might want to move all these tests of Ref components to fprime's Ref/test/int directory.
kevin-f-ortega
left a comment
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.
Overall, it all looks good. Just one minor comment.
kevin-f-ortega
left a comment
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.
LGTM. Pending passing CI
|
@chuynh4duarte, CI is failing. You need to do the following:
|
|
Pending on #3915 |
thomas-bc
left a comment
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.
Svc.ActiveLogger was renamed to Svc.EventManager. We should merge latest devel in this branch here and make the updates
|
Closing in favor of #3923 |
Change Description
A description of the changes contained in the PR.
Rationale
A rationale for this change. e.g. fixes bug, or most projects need XYZ feature.
Testing/Review Recommendations
Fill in testing procedures, specific items to focus on for review, or other info to help the team verify these changes are flight-quality.
Future Work
Note any additional work that will be done relating to this issue.