Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
LasseRosenow committed Jan 24, 2025
1 parent 72afc26 commit c4360c5
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 8 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/riot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ jobs:
- name: Install LFC dependencies
uses: ./.github/actions/lingua-franca

- name: Build examples
working-directory: ${{ github.workspace }}/examples/riot
run: ./buildAll.sh

- name: Run platform tests
working-directory: ${{ github.workspace }}/test/platform/riot
run: ./runAll.sh

- name: Build examples
working-directory: ${{ github.workspace }}/examples/riot
run: ./buildAll.sh
15 changes: 11 additions & 4 deletions test/platform/riot/coap_channel_federated_test/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,20 @@ make BOARD=native PORT=tap1 all -C ./receiver

SESSION_NAME="federated_coap_test"

SENDER_EXIT_CODE_TMP_FILE_PATH=/tmp/${SESSION_NAME}_sender_exit_code
RECEIVER_EXIT_CODE_TMP_FILE_PATH=/tmp/${SESSION_NAME}_receiver_exit_code

# Init error code variables
echo "1" > $SENDER_EXIT_CODE_TMP_FILE_PATH
echo "1" > $RECEIVER_EXIT_CODE_TMP_FILE_PATH

# Run the sender
tmux new-session -d -s "$SESSION_NAME" "bash -c './sender/bin/native/*.elf tap0; echo \$? > /tmp/${SESSION_NAME}_sender_exit_code'"
tmux new-session -d -s "$SESSION_NAME" "bash -c './sender/bin/native/*.elf tap0; echo \$? > $SENDER_EXIT_CODE_TMP_FILE_PATH'"

sleep 3

# Run the receiver
tmux split-window -h -t $SESSION_NAME "bash -c './receiver/bin/native/*.elf tap1; echo \$? > /tmp/${SESSION_NAME}_receiver_exit_code'"
tmux split-window -h -t $SESSION_NAME "bash -c './receiver/bin/native/*.elf tap1; echo \$? > $RECEIVER_EXIT_CODE_TMP_FILE_PATH'"


# Attach to the tmux session
Expand All @@ -34,8 +41,8 @@ if tmux has-session -t $SESSION_NAME; then
exit 1
else
echo "Test completed: tmux session has terminated."
sender_exit_code=$(<"/tmp/${SESSION_NAME}_sender_exit_code")
receiver_exit_code=$(<"/tmp/${SESSION_NAME}_receiver_exit_code")
sender_exit_code=$(<"$SENDER_EXIT_CODE_TMP_FILE_PATH")
receiver_exit_code=$(<"$RECEIVER_EXIT_CODE_TMP_FILE_PATH")

echo Sender exit code: $sender_exit_code
echo Receiver exit code: $receiver_exit_code
Expand Down

0 comments on commit c4360c5

Please sign in to comment.