forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
debuginfo: Fix gdbr-check expectations of formatting
This was a largely automated process, driven by the hack of a shell script below. The process to generate the patch was to repeatedly run the script until the changes reached a fixed-point. ```bash set -euo pipefail O=$(mktemp) ./x.py test src/test/debuginfo 2>&1 | tee $O || true awk ' function escape_pattern(pat, safe) { safe = pat gsub(/[][^$.*?+{}\\()|]/, "\\\\&", safe) return safe } BEGIN { p = 0; n = 0; } /---- \[debuginfo-gdb\]/ { if (p == 1) { printf("%s|%s|%s\n", src, error, expected); } src = $3; p = 1; n = 0; name = ""; } n == 1 && $0 ~ name { expected = $0; n = 0; } /error: line not found in debugger output/ { error = substr($0,43); split(error, pieces); name = escape_pattern(pieces[1]); print "Found " name " in: " $0 > "/dev/stderr" n = 1; } END { printf("%s|%s|%s\n", src, error, expected); } ' $O | while read l; do SRC="$(echo "$l" | cut -d'|' -f1 | sed 's/debuginfo-gdb/debuginfo/')" ERR="$(echo "$l" | cut -d'|' -f2)" V="$(echo "$ERR" | cut -d' ' -f1 | sed 's/\$/\\$/g')" EX="$(echo "$l" | cut -d'|' -f3)" if echo "$EX" | grep '^\$' > /dev/null; then echo $SRC sed -ri '/\/\/ gdbr-check:'"$V"' /s|(// gdbr-check:).*|\1'"$EX"'|' src/test/$SRC else # this is a bit questionable EX="$(echo "$l" | cut -d'|' -f2)" sed -ri '/\/\/ gdbr-check:'"$V"' /s|(// gdbr-check:).*|\1'"$EX"'|' src/test/$SRC echo $SRC: Failed to patch with: $l fi done echo $O ```
- Loading branch information
Showing
49 changed files
with
233 additions
and
233 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.