Skip to content

Commit 2ef17a6

Browse files
Run in parallel as well
1 parent 6685358 commit 2ef17a6

File tree

1 file changed

+13
-11
lines changed

1 file changed

+13
-11
lines changed

.github/workflows/sycl-linux-run-tests.yml

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -336,19 +336,21 @@ jobs:
336336
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#custom-shell
337337
shell: bash {0}
338338
run: |
339-
failed_suites=""
339+
# Run each test category separately so that
340+
# - crash on one would not affect others
341+
# - multiple tests could be run in parallel
342+
# test_all contains all categories, so skip it
343+
mkdir logs
344+
find build-cts/bin/ ! -name 'test_all' -print | \
345+
xargs -t -I % -P 8 sh -c 'log=logs/$(basename %).log ; echo % >$log ; /usr/bin/time -p timeout 10s % >>$log 2>&1 ; ret=$? ; echo "exit code: $ret" >>$log ; exit $ret'
346+
ret=$?
340347
341-
for i in `ls -1 ./build-cts/bin`; do
342-
echo "::group::Running $i"
343-
build-cts/bin/$i
344-
[ $? -ne 0 ] && failed_suites+=$i'\n'
348+
for f in logs/* ; do
349+
echo "::group::$f"
350+
cat $f
345351
echo "::endgroup::"
346352
done
347353
348-
if [ -n "$failed_suites" ]; then
349-
echo -e "Failed suite(s): $failed_suites"
350-
echo -e "Failed suite(s): $failed_suites" >> $GITHUB_STEP_SUMMARY
351-
exit 1
352-
fi
354+
grep 'exit code: [^0]' -r logs >> $GITHUB_STEP_SUMMARY
353355
354-
exit 0
356+
exit $ret

0 commit comments

Comments
 (0)