Skip to content

Commit

Permalink
lint_tool_test: On issues, print out patch that broke.
Browse files Browse the repository at this point in the history
Observed issues with recent MacOS CI.
  • Loading branch information
hzeller committed May 4, 2024
1 parent ec69cae commit 7d13bf5
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/verible-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,7 @@ jobs:
.github/bin/run-clang-tidy-cached.cc --checks="-*"
MacOsBuild:
runs-on: macos-latest
runs-on: macos-13
steps:

- name: Cancel previous
Expand Down
18 changes: 15 additions & 3 deletions verilog/tools/lint/lint_tool_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -558,8 +558,12 @@ patch_out="$(patch "${TEST_FILE}" "${PATCH_FILE}" 2>&1)"
status="$?"
(( $status )) && {
echo "Expected exit code 0 from 'patch' tool, but got $status"
echo "--- 'patch' output ---"
echo "--- 'patch' output [#1] ---"
echo "$patch_out"
echo "Patch was"
echo "------------------"
cat "${PATCH_FILE}"
echo "------------------"
exit 1
}

Expand Down Expand Up @@ -616,8 +620,12 @@ patch_out="$(cd $TEST_TMPDIR; patch -p1 < "${PATCH_FILE}" 2>&1)"
status="$?"
(( $status )) && {
echo "Expected exit code 0 from 'patch' tool, but got $status"
echo "--- 'patch' output ---"
echo "--- 'patch' output [#2] ---"
echo "$patch_out"
echo "Patch was"
echo "------------------"
cat "${PATCH_FILE}"
echo "------------------"
exit 1
}

Expand Down Expand Up @@ -714,8 +722,12 @@ interactive_autofix_test() {
status="$?"
(( $status )) && {
echo "Expected exit code 0 from 'patch' tool, but got $status"
echo "--- 'patch' output ---"
echo "--- 'patch' output (interactive_autofix_test) ---"
echo "$patch_out"
echo "Patch was"
echo "------------------"
cat "${PATCH_FILE}"
echo "------------------"
exit 1
}

Expand Down

0 comments on commit 7d13bf5

Please sign in to comment.