Skip to content

Commit 08afc7c

Browse files
authored
Merge pull request #188 from nasa/v7.0.1-integration
Fix cFS/cFS#686, Merge v7.0.1 Internal Updates
2 parents 3f2ea15 + 178f1ba commit 08afc7c

2 files changed

Lines changed: 41 additions & 0 deletions

File tree

mission_build.cmake

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,5 @@ set(CI_LAB_MISSION_CONFIG_FILE_LIST
2222

2323
generate_configfile_set(${CI_LAB_MISSION_CONFIG_FILE_LIST})
2424

25+
# The same test script can be utilized on all targets that run this app
26+
add_cfe_app_test(${ci_lab_MISSION_DIR}/tests/ci_lab_test_methods.py)

tests/ci_lab_test_methods.py

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
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

Comments
 (0)