|
| 1 | + |
| 2 | +from cfs_test_connection import CfsTest_Connection |
| 3 | + |
| 4 | +class ci_lab_test_methods: |
| 5 | + |
| 6 | + DEFAULT_APP_NAME = "CI_LAB" |
| 7 | + |
| 8 | + def test_aliveness(self): |
| 9 | + """ |
| 10 | + FSW Aliveness Test |
| 11 | + - Send a no-op command |
| 12 | + then verify the command was received (by checking the command counter incremented) |
| 13 | + - Reset the command counter |
| 14 | + then verify the command was received (by checking the command counter was cleared) |
| 15 | + """ |
| 16 | + app_name = self.connection.get_app_name() |
| 17 | + instance_name = self.connection.get_instance_name() |
| 18 | + |
| 19 | + self.connection.print(f"Testing {app_name} aliveness on {instance_name}") |
| 20 | + |
| 21 | + # Verify that we have a recent packet (by waiting for a new one to arrive) |
| 22 | + self.connection.wait_check_packet("HK", 1, 100) |
| 23 | + |
| 24 | + # Assuming no one else is sending commands, grab the latest command count |
| 25 | + cmd_count = self.connection.tlm("HK", "CommandCounter") |
| 26 | + |
| 27 | + # Check accepted NOOP command proving application is up and running |
| 28 | + self.connection.cmd("Noop") |
| 29 | + self.connection.wait_check("HK", "CommandCounter", cmd_count + 1, 100) |
| 30 | + |
| 31 | + # Check accepted Reset Counters command |
| 32 | + self.connection.cmd("ResetCounters") |
| 33 | + self.connection.wait_check("HK", "CommandCounter", 0, 100) |
| 34 | + return |
| 35 | + |
| 36 | + |
| 37 | + def __init__(self, connection : CfsTest_Connection): |
| 38 | + self.connection = connection |
| 39 | + |
0 commit comments