Rollup merge of #119663 - petrochenkov:rmakefix, r=Mark-Simulacrum

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.
This commit is contained in:
Matthias Krüger 2024-01-09 00:19:34 +01:00 committed by GitHub
commit e6bc9f0637
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 3 deletions

View File

@ -17,7 +17,7 @@ else
$(CC) "$(TMPDIR)"/extern_1.obj -shared -o "$(TMPDIR)"/extern_1.dll $(CC) "$(TMPDIR)"/extern_1.obj -shared -o "$(TMPDIR)"/extern_1.dll
$(CC) "$(TMPDIR)"/extern_2.obj -shared -o "$(TMPDIR)"/extern_2.dll $(CC) "$(TMPDIR)"/extern_2.obj -shared -o "$(TMPDIR)"/extern_2.dll
endif endif
"$(TMPDIR)"/driver > "$(TMPDIR)"/output.txt "$(TMPDIR)"/driver | tr -d '\r' > "$(TMPDIR)"/output.txt
"$(TMPDIR)"/raw_dylib_test_bin > "$(TMPDIR)"/output_bin.txt "$(TMPDIR)"/raw_dylib_test_bin > "$(TMPDIR)"/output_bin.txt
ifdef RUSTC_BLESS_TEST ifdef RUSTC_BLESS_TEST

View File

@ -26,5 +26,5 @@ else
$(CC) "$(TMPDIR)"/extern_1.obj -shared -o "$(TMPDIR)"/extern_1.dll $(CC) "$(TMPDIR)"/extern_1.obj -shared -o "$(TMPDIR)"/extern_1.dll
$(CC) "$(TMPDIR)"/extern_2.obj -shared -o "$(TMPDIR)"/extern_2.dll $(CC) "$(TMPDIR)"/extern_2.obj -shared -o "$(TMPDIR)"/extern_2.dll
endif endif
$(call RUN,driver) > "$(TMPDIR)"/output.txt $(call RUN,driver) | tr -d '\r' > "$(TMPDIR)"/output.txt
$(RUSTC_TEST_OP) "$(TMPDIR)"/output.txt output.txt $(RUSTC_TEST_OP) "$(TMPDIR)"/output.txt output.txt

View File

@ -13,5 +13,5 @@ ifdef IS_MSVC
else else
$(CC) "$(TMPDIR)"/exporter.obj exporter.def -shared -o "$(TMPDIR)"/exporter.dll $(CC) "$(TMPDIR)"/exporter.obj exporter.def -shared -o "$(TMPDIR)"/exporter.dll
endif endif
"$(TMPDIR)"/driver > "$(TMPDIR)"/output.txt "$(TMPDIR)"/driver | tr -d '\r' > "$(TMPDIR)"/output.txt
$(RUSTC_TEST_OP) "$(TMPDIR)"/output.txt output.txt $(RUSTC_TEST_OP) "$(TMPDIR)"/output.txt output.txt