diff --git a/.github/workflows/riot.yml b/.github/workflows/riot.yml index 632c6ed7..8d636910 100644 --- a/.github/workflows/riot.yml +++ b/.github/workflows/riot.yml @@ -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 diff --git a/test/platform/riot/coap_channel_federated_test/run.sh b/test/platform/riot/coap_channel_federated_test/run.sh index fff0368f..fe0dc99f 100755 --- a/test/platform/riot/coap_channel_federated_test/run.sh +++ b/test/platform/riot/coap_channel_federated_test/run.sh @@ -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 @@ -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