Skip to content

Commit 679800a

Browse files
authored
Dump failed slang-test logs (#11350)
Print the error log from the failed slang-test tests.
1 parent b83f133 commit 679800a

2 files changed

Lines changed: 54 additions & 4 deletions

File tree

.github/workflows/ci-slang-test-container.yml

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,18 @@ jobs:
165165
slang_test_args+=("-skip-list" "tests/skip-list-debug.txt")
166166
fi
167167
168-
"$bin_dir/slang-test" "${test_roots[@]}" "${slang_test_args[@]}"
168+
find tests/ -name '*.actual' -delete
169+
170+
test_exit=0
171+
"$bin_dir/slang-test" "${test_roots[@]}" "${slang_test_args[@]}" || test_exit=$?
172+
173+
for f in $(find tests/ -name '*.actual')
174+
do
175+
echo "===== dump begin : $f ======"
176+
cat "$f"
177+
echo "===== dump end : $f ======"
178+
done
179+
exit "$test_exit"
169180
170181
- name: Run slangc tests
171182
if: inputs.gpu-tier == 't4'
@@ -179,6 +190,10 @@ jobs:
179190
ulimit -c unlimited
180191
export SLANG_RUN_SPIRV_VALIDATION=1
181192
export SLANG_USE_SPV_SOURCE_LANGUAGE_UNKNOWN=1
193+
194+
find tests/ -name '*.actual' -delete
195+
196+
test_exit=0
182197
"$bin_dir/slang-test" \
183198
-use-test-server \
184199
-server-count ${{ inputs.server-count }} \
@@ -189,7 +204,15 @@ jobs:
189204
-expected-failure-list tests/expected-failure-via-glsl.txt \
190205
-expected-failure-list tests/expected-failure-github.txt \
191206
-expected-failure-list tests/expected-failure-linux.txt \
192-
-expected-failure-list tests/expected-failure-linux-gpu.txt
207+
-expected-failure-list tests/expected-failure-linux-gpu.txt || test_exit=$?
208+
209+
for f in $(find tests/ -name '*.actual')
210+
do
211+
echo "===== dump begin : $f ======"
212+
cat "$f"
213+
echo "===== dump end : $f ======"
214+
done
215+
exit "$test_exit"
193216
194217
# Extract gdb backtraces from any cores written to /var/cores during
195218
# the test steps above. /var/cores lives on the host (bind-mounted in

.github/workflows/ci-slang-test.yml

Lines changed: 29 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,8 +150,21 @@ jobs:
150150
slang_test_args+=("-skip-list" "tests/skip-list-debug.txt")
151151
fi
152152
153+
# Clean output files
154+
find tests/ -name '*.actual' -delete
155+
153156
# Execute slang-test with all arguments
154-
"$bin_dir/slang-test" "${slang_test_args[@]}"
157+
test_exit=0
158+
"$bin_dir/slang-test" "${slang_test_args[@]}" || test_exit=$?
159+
160+
# Dump output files
161+
for f in $(find tests/ -name '*.actual')
162+
do
163+
echo "===== dump begin : $f ======"
164+
cat "$f"
165+
echo "===== dump end : $f ======"
166+
done
167+
exit "$test_exit"
155168
- name: Run Slang examples
156169
# Run examples on release for pull requests, and not on merge_group, to reduce CI load.
157170
if: inputs.full-gpu-tests && inputs.config == 'release' && github.event_name == 'pull_request'
@@ -183,7 +196,21 @@ jobs:
183196
if [[ "${{ inputs.gpu-tier }}" == "t4" ]]; then
184197
via_glsl_args+=("-skip-list" "tests/skip-list-gpu-t4.txt")
185198
fi
186-
"$bin_dir/slang-test" "${via_glsl_args[@]}"
199+
200+
# Clean output files
201+
find tests/ -name '*.actual' -delete
202+
203+
test_exit=0
204+
"$bin_dir/slang-test" "${via_glsl_args[@]}" || test_exit=$?
205+
206+
# Dump output files
207+
for f in $(find tests/ -name '*.actual')
208+
do
209+
echo "===== dump begin : $f ======"
210+
cat "$f"
211+
echo "===== dump end : $f ======"
212+
done
213+
exit "$test_exit"
187214
188215
# Run slang-rhi tests when:
189216
# 1. full-gpu-tests is enabled AND

0 commit comments

Comments
 (0)