Skip to content

Commit

Permalink
Rollup merge of rust-lang#119663 - petrochenkov:rmakefix, r=Mark-Simu…
Browse files Browse the repository at this point in the history
…lacrum

tests: Normalize `\r\n` to `\n` in some run-make tests

The output is produced by printf from C code in these cases, and printf prints in text mode, which means `\n` will be printed as `\r\n` on Windows.

In --bless mode the new output with `\r\n` will replace expected output in `tests/run-make/raw-dylib-*\output.txt` files, which use \n, always resulting in dirty files in the repo.
  • Loading branch information
matthiaskrgr authored Jan 8, 2024
2 parents bd1e42b + c51828a commit 09a9308
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion tests/run-make/raw-dylib-c/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ else
$(CC) "$(TMPDIR)"/extern_1.obj -shared -o "$(TMPDIR)"/extern_1.dll
$(CC) "$(TMPDIR)"/extern_2.obj -shared -o "$(TMPDIR)"/extern_2.dll
endif
"$(TMPDIR)"/driver > "$(TMPDIR)"/output.txt
"$(TMPDIR)"/driver | tr -d '\r' > "$(TMPDIR)"/output.txt
"$(TMPDIR)"/raw_dylib_test_bin > "$(TMPDIR)"/output_bin.txt

ifdef RUSTC_BLESS_TEST
Expand Down
2 changes: 1 addition & 1 deletion tests/run-make/raw-dylib-inline-cross-dylib/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,5 @@ else
$(CC) "$(TMPDIR)"/extern_1.obj -shared -o "$(TMPDIR)"/extern_1.dll
$(CC) "$(TMPDIR)"/extern_2.obj -shared -o "$(TMPDIR)"/extern_2.dll
endif
$(call RUN,driver) > "$(TMPDIR)"/output.txt
$(call RUN,driver) | tr -d '\r' > "$(TMPDIR)"/output.txt
$(RUSTC_TEST_OP) "$(TMPDIR)"/output.txt output.txt
2 changes: 1 addition & 1 deletion tests/run-make/raw-dylib-link-ordinal/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@ ifdef IS_MSVC
else
$(CC) "$(TMPDIR)"/exporter.obj exporter.def -shared -o "$(TMPDIR)"/exporter.dll
endif
"$(TMPDIR)"/driver > "$(TMPDIR)"/output.txt
"$(TMPDIR)"/driver | tr -d '\r' > "$(TMPDIR)"/output.txt
$(RUSTC_TEST_OP) "$(TMPDIR)"/output.txt output.txt

0 comments on commit 09a9308

Please sign in to comment.