From 50a692c1d43cb3ec900528a1597140d2e2bb3da1 Mon Sep 17 00:00:00 2001 From: MoonlightSentinel Date: Sat, 5 Feb 2022 17:40:51 +0100 Subject: [PATCH] Stuff --- test/dshell/defaults.d | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/test/dshell/defaults.d b/test/dshell/defaults.d index 2cbabaa5ee68..4231f9e23ab8 100644 --- a/test/dshell/defaults.d +++ b/test/dshell/defaults.d @@ -41,6 +41,8 @@ void testConfigurations() // Static configuration file for the final release string configPath = buildNormalizedPath(dirName(__FILE_FULL_PATH__), "..", "..", "ini", OS, config); + string extraArgs; + version (Windows) if (MODEL == "32omf") { // 32-OMF tries to use `optlink.exe` located next to `sc.ini` @@ -52,11 +54,11 @@ void testConfigurations() assert(fixed !is content, "Patching failed!"); const LIB = environment["LIB"].findSplitBefore(";")[0]; - const withLib = fixed.replace(`LIB="%@P%\..\lib"`, `LIB="` ~ LIB ~ `"`); - assert(withLib !is fixed, "Patching 2 failed"); + writeln("LIB = ", LIB); + extraArgs = buildPath(LIB, "phobos.lib"); writeln("\nNew config file:\n======================================"); - writeln(withLib); + writeln(fixed); writeln("======================================"); stdout.flush(); @@ -67,7 +69,7 @@ void testConfigurations() // Save the new file configPath = buildPath(OUTPUT_BASE, baseName(configPath)); - std.file.write(configPath, withLib); + std.file.write(configPath, fixed); } // Flag sets to test @@ -80,10 +82,10 @@ void testConfigurations() // Override these environment variables s.t. they don't mess with the values found in the configuration files string[string] env; - // version (Windows) env = [ - // "DFLAGS": "", - // "LIB": "", - // ]; + version (Windows) if (MODEL == "32omf") env = [ + "DFLAGS": "", + "LIB": "", + ]; foreach (const target; targets) { @@ -94,7 +96,8 @@ void testConfigurations() ~ ` -I$EXTRA_FILES/defaults ` ~ DFLAGS ~ ` $EXTRA_FILES/defaults/hello.d ` - ~ ` -of=$OUTPUT_BASE/hello$EXE `, + ~ ` -of=$OUTPUT_BASE/hello$EXE ` + ~ extraArgs, stdout, stderr, env, );