Skip to content

Commit

Permalink
WIP implement proper smoke test
Browse files Browse the repository at this point in the history
  • Loading branch information
Reg Marr committed Sep 28, 2024
1 parent db4e204 commit 8ec4474
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 5 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,7 @@ jobs:
run: |
echo "Using image ${{ env.FSW_IMG }}"
./run.sh build --clean
DOWNLINK_TARGET_PORT=50051 UPLINK_TARGET_PORT=50001 ./run.sh gds& disown
DOWNLINK_TARGET_PORT=50051 UPLINK_TARGET_PORT=50001 ./run.sh exec --local
DOWNLINK_TARGET_PORT=50051 UPLINK_TARGET_PORT=50001 ./run.sh exec --local --daemon
./run.sh teardown
- name: Upload artifacts
Expand Down
2 changes: 1 addition & 1 deletion FlightComputer/Top/instances.fpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ module FlightComputer {
instance pingRcvr: FlightComputer.PingReceiver base id 0x0A00 \
queue size Default.queueSize \
stack size Default.stackSize \
priority 100
priority 99

instance eventLogger: Svc.ActiveLogger base id 0x0B00 \
queue size Default.queueSize \
Expand Down
9 changes: 7 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
services:
gds:
stop_grace_period: 1s
stop_grace_period: 3s
user: user
build:
context: .
Expand All @@ -10,6 +10,7 @@ services:
- HOST_GID=${HOST_GID:-1000}
- progress=plain
image: $FSW_IMG
command: "fprime-gds -n --ip-port=$UPLINK_TARGET_PORT --tts-port=$DOWNLINK_TARGET_PORT --dictionary ./dict/FlightComputerTopologyAppDictionary.xml"
working_dir: ${DEPLOYMENT_ROOT}/build-artifacts/Linux/FlightComputer/
ports:
- $GDB_PORT:5555
Expand All @@ -24,7 +25,7 @@ services:
interval: 2s
timeout: 3s
retries: 25
start_period: 5s
start_period: 3s
fsw:
stop_grace_period: 1s
user: user
Expand Down Expand Up @@ -66,3 +67,7 @@ services:
timeout: 3s
retries: 25
start_period: 5s
depends_on:
gds:
condition: service_healthy
restart: true
17 changes: 17 additions & 0 deletions run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,11 @@ case $1 in
else
FLAGS="${FLAGS} -w /MBSE_FSW/deploy/ --no-deps"
RUN_CMD="docker compose run --rm -it fsw python3 fswCtrl.py"
FLAGS="${FLAGS} --no-deps"
fi

if [ "${DAEMON}" -eq "1" ]; then
FLAGS="${FLAGS} -d"
fi

RUN_CMD="${RUN_CMD} ./FlightComputer -a ${GDS_IP} -u ${UPLINK_TARGET_PORT} -d ${DOWNLINK_TARGET_PORT}"
Expand All @@ -291,11 +296,23 @@ case $1 in
check_port ${DOWNLINK_TARGET_PORT}
check_port ${UPLINK_TARGET_PORT}

FLAGS="-it --rm"
if [ "${DAEMON}" -eq "1" ]; then
FLAGS="-i -d"
fi
FLAGS="-w ${BIN_DIR}"

CMD="fprime-gds -n --ip-port=$UPLINK_TARGET_PORT --tts-port=$DOWNLINK_TARGET_PORT --dictionary ./dict/FlightComputerTopologyAppDictionary.xml"
CMD="docker compose run -it --rm gds $CMD"
echo $CMD
eval $CMD
;;
"smoke-test")
CMD="fprime-util visualize --working-dir $FSW_WDIR/public"
CMD="docker compose run -it --rm -w $DEPLOYMENT_ROOT/Top fsw $CMD"
echo $CMD
eval $CMD
;;
"topology")
CMD="fprime-util visualize --working-dir $FSW_WDIR/public"
CMD="docker compose run -it --rm -w $DEPLOYMENT_ROOT/Top fsw $CMD"
Expand Down

0 comments on commit 8ec4474

Please sign in to comment.