mirror of
https://github.com/nasa/fprime.git
synced 2025-12-10 00:44:37 -06:00
Add system resources integration test (#4126)
This commit is contained in:
parent
3422cfa117
commit
40142d7d39
@ -287,3 +287,28 @@ def test_seqgen(fprime_test_api):
|
||||
fprime_test_api.send_and_assert_command(
|
||||
"Ref.cmdSeq.CS_RUN", args=["/tmp/ref_test_int.bin", "BLOCK"], max_delay=5
|
||||
)
|
||||
|
||||
|
||||
def test_system_resources(fprime_test_api):
|
||||
"""Test system resources telemetry meets minimum thresholds"""
|
||||
from fprime_gds.common.testing_fw import predicates
|
||||
|
||||
# Test memory usage > 1KB using predicates
|
||||
pred_greater_than_1kb = predicates.greater_than(1)
|
||||
|
||||
# Wait for telemetry and verify it meets thresholds
|
||||
fprime_test_api.await_telemetry_count(
|
||||
pred_greater_than_1kb, "Ref.systemResources.MEMORY_TOTAL", timeout=3
|
||||
)
|
||||
|
||||
fprime_test_api.await_telemetry_count(
|
||||
pred_greater_than_1kb, "Ref.systemResources.MEMORY_USED", timeout=3
|
||||
)
|
||||
|
||||
fprime_test_api.await_telemetry_count(
|
||||
pred_greater_than_1kb, "Ref.systemResources.NON_VOLATILE_TOTAL", timeout=3
|
||||
)
|
||||
|
||||
fprime_test_api.await_telemetry_count(
|
||||
predicates.greater_than(1.0), "Ref.systemResources.CPU", timeout=3
|
||||
)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user