Add system resources integration test (#4126)

This commit is contained in:
jp 2025-09-22 11:40:45 -04:00 committed by GitHub
parent 3422cfa117
commit 40142d7d39
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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
)