From da9cea9b3922fe34196de68ae4e0ca3e947e3478 Mon Sep 17 00:00:00 2001 From: Martin Kinkelin Date: Sun, 17 Dec 2023 20:30:06 +0100 Subject: [PATCH] [try fix] --- Makefile | 9 ++++++--- rdmd_test.d | 2 +- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index c020f81a7..7b82afaad 100644 --- a/Makefile +++ b/Makefile @@ -97,12 +97,15 @@ $(ROOT)/tests_extractor$(DOTEXE): tests_extractor.d # Build & run tests ################################################################################ +# diff's `--strip-trailing-cr` isn't enough for some reason +DOS2UNIX:=$(if $(findstring windows,$(OS)),| dos2unix,) + test_tests_extractor: $(ROOT)/tests_extractor$(DOTEXE) for file in ascii iteration ; do \ - $< -i "./test/tests_extractor/$${file}.d" | diff -u --strip-trailing-cr -p - "./test/tests_extractor/$${file}.d.ext"; \ + $< -i "./test/tests_extractor/$${file}.d" $(DOS2UNIX) | diff -u --strip-trailing-cr -p - "./test/tests_extractor/$${file}.d.ext"; \ done - $< -a betterc -i "./test/tests_extractor/attributes.d" | diff -u --strip-trailing-cr -p - "./test/tests_extractor/attributes.d.ext"; - $< --betterC -i "./test/tests_extractor/betterc.d" | diff -u --strip-trailing-cr -p - "./test/tests_extractor/betterc.d.ext"; + $< -a betterc -i "./test/tests_extractor/attributes.d" $(DOS2UNIX) | diff -u --strip-trailing-cr -p - "./test/tests_extractor/attributes.d.ext"; + $< --betterC -i "./test/tests_extractor/betterc.d" $(DOS2UNIX) | diff -u --strip-trailing-cr -p - "./test/tests_extractor/betterc.d.ext"; RDMD_TEST_COMPILERS = $(DMD) RDMD_TEST_EXECUTABLE = $(ROOT)/rdmd$(DOTEXE) diff --git a/rdmd_test.d b/rdmd_test.d index 77f02e0bd..4abe02e94 100755 --- a/rdmd_test.d +++ b/rdmd_test.d @@ -684,7 +684,7 @@ void runFallbackTest(string rdmdApp, string buildCompiler, string model) if an explicit --compiler flag is not provided, rdmd should search its own binary path first when looking for the default compiler (determined by the compiler used to build it) */ - string localDMD = buildPath(tempDir(), baseName(buildCompiler).setExtension(binExt)); + string localDMD = buildPath(dirName(rdmdApp), baseName(buildCompiler).setExtension(binExt)).absolutePath; std.file.write(localDMD, ""); // An empty file avoids the "Not a valid 16-bit application" pop-up on Windows scope(exit) std.file.remove(localDMD);