File tree Expand file tree Collapse file tree 2 files changed +33
-2
lines changed
FprimeZephyrReference/test/int Expand file tree Collapse file tree 2 files changed +33
-2
lines changed Original file line number Diff line number Diff line change 44Integration tests for the IMU Manager component.
55"""
66
7+ import os
8+ import subprocess
9+ import time
10+ from typing import List
11+
712import pytest
813from fprime_gds .common .data_types .ch_data import ChData
14+ from fprime_gds .common .data_types .event_data import EventData
915from fprime_gds .common .testing_fw .api import IntegrationTestAPI
1016
1117
18+ @pytest .fixture (scope = "session" , autouse = True )
19+ def start_gds (fprime_test_api_session : IntegrationTestAPI ):
20+ process = subprocess .Popen (["make" , "gds-integration" ], cwd = os .getcwd ())
21+
22+ gds_working = False
23+ timeout_time = time .time () + 15
24+ while time .time () < timeout_time :
25+ data : List [EventData ] = fprime_test_api_session .send_and_assert_command (
26+ command = "CdhCore.cmdDisp.CMD_NO_OP"
27+ )
28+ if data != []:
29+ gds_working = True
30+ break
31+ assert gds_working
32+
33+ yield
34+ process .kill ()
35+
36+
1237@pytest .fixture (autouse = True )
1338def send_packet (fprime_test_api : IntegrationTestAPI ):
1439 """Fixture to clear histories and send the IMU packet before each test"""
Original file line number Diff line number Diff line change @@ -73,11 +73,17 @@ clean-zephyr: ## Remove all Zephyr build files
7373
7474# #@ Operations
7575
76- .PHONY : gds
76+ GDS_COMMAND ?= $( UV ) run fprime- gds -n --dictionary $( ARTIFACT_DIR ) /zephyr/fprime-zephyr-deployment/dict/ReferenceDeploymentTopologyDictionary.json --communication-selection uart --uart-baud 115200 --output-unframed-data
7777ARTIFACT_DIR ?= $(shell pwd) /build-artifacts
78+
79+ .PHONY : gds
7880gds : # # Run FPrime GDS
7981 @echo " Running FPrime GDS..."
80- @$(UV ) run fprime-gds -n --dictionary $(ARTIFACT_DIR ) /zephyr/fprime-zephyr-deployment/dict/ReferenceDeploymentTopologyDictionary.json --communication-selection uart --uart-baud 115200 --output-unframed-data
82+ @$(GDS_COMMAND )
83+
84+ .PHONY : gds-integration
85+ gds-integration :
86+ @$(GDS_COMMAND ) --gui=none
8187
8288# #@ Build Tools
8389BIN_DIR ?= $(shell pwd) /bin
You can’t perform that action at this time.
0 commit comments