@@ -25,6 +25,12 @@ outputs:
2525 customer-artifacts-log-file :
2626 description : Copied Device Farm customer artifacts log file path
2727 value : ${{ steps.find-customer-artifacts-log.outputs.log_file }}
28+ test-spec-output-file :
29+ description : Copied Device Farm test spec output log file path
30+ value : ${{ steps.find-test-spec-output.outputs.log_file }}
31+ test-spec-timestamped-output-file :
32+ description : Copied Device Farm timestamped test spec output log file path
33+ value : ${{ steps.find-test-spec-timestamped-output.outputs.log_file }}
2834
2935runs :
3036 using : composite
9197 echo "log_file=" >> "$GITHUB_OUTPUT"
9298 fi
9399
100+ - name : Find Device Farm test spec output
101+ id : find-test-spec-output
102+ shell : bash
103+ run : |
104+ set -euo pipefail
105+ ARTIFACT_DIR="${{ inputs.artifact-folder }}"
106+ PLATFORM="${{ inputs.platform }}"
107+ WORKSPACE_LOG=".github/test-results/devicefarm-test-spec-output-${PLATFORM}.log"
108+ if bash "$GITHUB_ACTION_PATH/../../scripts/find-devicefarm-artifact.sh" \
109+ "$ARTIFACT_DIR" \
110+ '*-Test spec output.txt' \
111+ "$WORKSPACE_LOG"; then
112+ echo "log_file=$WORKSPACE_LOG" >> "$GITHUB_OUTPUT"
113+ else
114+ echo "log_file=" >> "$GITHUB_OUTPUT"
115+ fi
116+
117+ - name : Find Device Farm timestamped test spec output
118+ id : find-test-spec-timestamped-output
119+ shell : bash
120+ run : |
121+ set -euo pipefail
122+ ARTIFACT_DIR="${{ inputs.artifact-folder }}"
123+ PLATFORM="${{ inputs.platform }}"
124+ WORKSPACE_LOG=".github/test-results/devicefarm-test-spec-timestamped-output-${PLATFORM}.log"
125+ if bash "$GITHUB_ACTION_PATH/../../scripts/find-devicefarm-artifact.sh" \
126+ "$ARTIFACT_DIR" \
127+ '*-Test spec timestamped output.txt' \
128+ "$WORKSPACE_LOG"; then
129+ echo "log_file=$WORKSPACE_LOG" >> "$GITHUB_OUTPUT"
130+ else
131+ echo "log_file=" >> "$GITHUB_OUTPUT"
132+ fi
133+
94134 - name : Publish Harness test results
95135 id : publish-harness-results
96136 if : steps.find-harness-junit.outputs.junit_file != ''
@@ -131,6 +171,20 @@ runs:
131171 echo "===== End Device Farm ${PLATFORM} customer artifacts log ====="
132172 fi
133173
174+ TEST_SPEC_OUTPUT="${{ steps.find-test-spec-output.outputs.log_file }}"
175+ if [[ -n "$TEST_SPEC_OUTPUT" && "$TEST_STEP_OUTCOME" == "failure" ]]; then
176+ echo "===== Device Farm ${PLATFORM} test spec output ====="
177+ cat "$TEST_SPEC_OUTPUT"
178+ echo "===== End Device Farm ${PLATFORM} test spec output ====="
179+ fi
180+
181+ TEST_SPEC_TIMESTAMPED_OUTPUT="${{ steps.find-test-spec-timestamped-output.outputs.log_file }}"
182+ if [[ -n "$TEST_SPEC_TIMESTAMPED_OUTPUT" && "$TEST_STEP_OUTCOME" == "failure" ]]; then
183+ echo "===== Device Farm ${PLATFORM} timestamped test spec output ====="
184+ cat "$TEST_SPEC_TIMESTAMPED_OUTPUT"
185+ echo "===== End Device Farm ${PLATFORM} timestamped test spec output ====="
186+ fi
187+
134188 if [[ "$PUBLISH_OUTCOME" == "failure" ]]; then
135189 echo "Harness test result publication reported failures." >&2
136190 exit 1
0 commit comments