Skip to content

Commit

Permalink
Merge pull request #622 from mmuetzel/ci
Browse files Browse the repository at this point in the history
CI: Avoid error with `cat` if there are multiple output log files per test
  • Loading branch information
raback authored Jan 12, 2025
2 parents 18505d2 + 38946da commit 52290db
Show file tree
Hide file tree
Showing 7 changed files with 70 additions and 28 deletions.
14 changes: 10 additions & 4 deletions .github/workflows/build-macos-homebrew.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -132,12 +132,18 @@ jobs:
echo ---- Files ----
ls -Rl ${test_root}/${test}
if [ -f ${test_root}/${test}/test-stderr*.log ]; then
echo ---- Content of test-stderr*.log ----
cat ${test_root}/${test}/test-stderr*.log
err_logs=($(ls ${test_root}/${test}/test-stderr*.log))
for err_log in "${err_logs[@]}"; do
echo ---- Content of ${err_log} ----
cat ${err_log}
done
fi
if [ -f ${test_root}/${test}/test-stdout*.log ]; then
echo ---- Content of test-stdout*.log ----
cat ${test_root}/${test}/test-stdout*.log
out_logs=($(ls ${test_root}/${test}/test-stdout*.log))
for out_log in "${out_logs[@]}"; do
echo ---- Content of ${out_log} ----
cat ${out_log}
done
fi
echo "::endgroup::"
done
Expand Down
14 changes: 10 additions & 4 deletions .github/workflows/build-windows-mingw.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -170,12 +170,18 @@ jobs:
echo ---- Files ----
ls -Rl ${test_root}/${test}
if [ -f ${test_root}/${test}/test-stderr*.log ]; then
echo ---- Content of test-stderr*.log ----
cat ${test_root}/${test}/test-stderr*.log
err_logs=($(ls ${test_root}/${test}/test-stderr*.log))
for err_log in "${err_logs[@]}"; do
echo ---- Content of ${err_log} ----
cat ${err_log}
done
fi
if [ -f ${test_root}/${test}/test-stdout*.log ]; then
echo ---- Content of test-stdout*.log ----
cat ${test_root}/${test}/test-stdout*.log
out_logs=($(ls ${test_root}/${test}/test-stdout*.log))
for out_log in "${out_logs[@]}"; do
echo ---- Content of ${out_log} ----
cat ${out_log}
done
fi
echo "::endgroup::"
done
Expand Down
14 changes: 10 additions & 4 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -168,12 +168,18 @@ jobs:
echo ---- Files ----
ls -Rl ${test_root}/${test}
if [ -f ${test_root}/${test}/test-stderr*.log ]; then
echo ---- Content of test-stderr*.log ----
cat ${test_root}/${test}/test-stderr*.log
err_logs=($(ls ${test_root}/${test}/test-stderr*.log))
for err_log in "${err_logs[@]}"; do
echo ---- Content of ${err_log} ----
cat ${err_log}
done
fi
if [ -f ${test_root}/${test}/test-stdout*.log ]; then
echo ---- Content of test-stdout*.log ----
cat ${test_root}/${test}/test-stdout*.log
out_logs=($(ls ${test_root}/${test}/test-stdout*.log))
for out_log in "${out_logs[@]}"; do
echo ---- Content of ${out_log} ----
cat ${out_log}
done
fi
echo "::endgroup::"
done
Expand Down
14 changes: 10 additions & 4 deletions .github/workflows/ubuntu-clang-full.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -111,12 +111,18 @@ jobs:
echo ---- Files ----
ls -Rl ${test_root}/${test}
if [ -f ${test_root}/${test}/test-stderr*.log ]; then
echo ---- Content of test-stderr*.log ----
cat ${test_root}/${test}/test-stderr*.log
err_logs=($(ls ${test_root}/${test}/test-stderr*.log))
for err_log in "${err_logs[@]}"; do
echo ---- Content of ${err_log} ----
cat ${err_log}
done
fi
if [ -f ${test_root}/${test}/test-stdout*.log ]; then
echo ---- Content of test-stdout*.log ----
cat ${test_root}/${test}/test-stdout*.log
out_logs=($(ls ${test_root}/${test}/test-stdout*.log))
for out_log in "${out_logs[@]}"; do
echo ---- Content of ${out_log} ----
cat ${out_log}
done
fi
echo "::endgroup::"
done
Expand Down
14 changes: 10 additions & 4 deletions .github/workflows/ubuntu-elmerice.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -115,12 +115,18 @@ jobs:
echo ---- Files ----
ls -Rl ${test_root}/${test}
if [ -f ${test_root}/${test}/test-stderr*.log ]; then
echo ---- Content of test-stderr*.log ----
cat ${test_root}/${test}/test-stderr*.log
err_logs=($(ls ${test_root}/${test}/test-stderr*.log))
for err_log in "${err_logs[@]}"; do
echo ---- Content of ${err_log} ----
cat ${err_log}
done
fi
if [ -f ${test_root}/${test}/test-stdout*.log ]; then
echo ---- Content of test-stdout*.log ----
cat ${test_root}/${test}/test-stdout*.log
out_logs=($(ls ${test_root}/${test}/test-stdout*.log))
for out_log in "${out_logs[@]}"; do
echo ---- Content of ${out_log} ----
cat ${out_log}
done
fi
echo "::endgroup::"
done
Expand Down
14 changes: 10 additions & 4 deletions .github/workflows/ubuntu-gcc-full.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -111,12 +111,18 @@ jobs:
echo ---- Files ----
ls -Rl ${test_root}/${test}
if [ -f ${test_root}/${test}/test-stderr*.log ]; then
echo ---- Content of test-stderr*.log ----
cat ${test_root}/${test}/test-stderr*.log
err_logs=($(ls ${test_root}/${test}/test-stderr*.log))
for err_log in "${err_logs[@]}"; do
echo ---- Content of ${err_log} ----
cat ${err_log}
done
fi
if [ -f ${test_root}/${test}/test-stdout*.log ]; then
echo ---- Content of test-stdout*.log ----
cat ${test_root}/${test}/test-stdout*.log
out_logs=($(ls ${test_root}/${test}/test-stdout*.log))
for out_log in "${out_logs[@]}"; do
echo ---- Content of ${out_log} ----
cat ${out_log}
done
fi
echo "::endgroup::"
done
Expand Down
14 changes: 10 additions & 4 deletions .github/workflows/ubuntu-parallel.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -115,12 +115,18 @@ jobs:
echo ---- Files ----
ls -Rl ${test_root}/${test}
if [ -f ${test_root}/${test}/test-stderr*.log ]; then
echo ---- Content of test-stderr*.log ----
cat ${test_root}/${test}/test-stderr*.log
err_logs=($(ls ${test_root}/${test}/test-stderr*.log))
for err_log in "${err_logs[@]}"; do
echo ---- Content of ${err_log} ----
cat ${err_log}
done
fi
if [ -f ${test_root}/${test}/test-stdout*.log ]; then
echo ---- Content of test-stdout*.log ----
cat ${test_root}/${test}/test-stdout*.log
out_logs=($(ls ${test_root}/${test}/test-stdout*.log))
for out_log in "${out_logs[@]}"; do
echo ---- Content of ${out_log} ----
cat ${out_log}
done
fi
echo "::endgroup::"
done
Expand Down

0 comments on commit 52290db

Please sign in to comment.