Skip to content

Commit 31c60f6

Browse files
committedFeb 24, 2024·
Always print output of DMD
1 parent 74a5675 commit 31c60f6

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed
 

‎runtests.d

+8-6
Original file line numberDiff line numberDiff line change
@@ -121,9 +121,11 @@ bool runCommand(string[] args, string desc, Verbosity verbosity, Mutex outputMut
121121
}
122122

123123
bool hasOutput;
124-
if ((verbosity & Verbosity.outputCommandAlways) || (!r && (verbosity & Verbosity.outputOnError)))
124+
if (!r && (verbosity & Verbosity.outputOnError))
125125
hasOutput = true;
126-
if ((verbosity & Verbosity.outputAlways) || (!r && (verbosity & Verbosity.outputOnError)))
126+
if (verbosity & Verbosity.outputCommandAlways)
127+
hasOutput = true;
128+
if ((verbosity & Verbosity.outputAlways) && (app.data.length || wrongOutput))
127129
hasOutput = true;
128130

129131
bool anyOutput;
@@ -438,7 +440,7 @@ bool runGrammarTests(Test[] tests, string model, Verbosity verbosity,
438440
foreach (ref testBundle; parallel(testBundles, 1))
439441
{
440442
if (!runCommand(testBundle.dmdArgs,
441-
"Compiling " ~ testBundle.filename, verbosity, outputMutex))
443+
"Compiling " ~ testBundle.filename, verbosity | Verbosity.outputAlways, outputMutex))
442444
testBundle.failed = true;
443445
}
444446
}
@@ -447,7 +449,7 @@ bool runGrammarTests(Test[] tests, string model, Verbosity verbosity,
447449
foreach (ref testBundle; testBundles)
448450
{
449451
if (!runCommand(testBundle.dmdArgs,
450-
"Compiling " ~ testBundle.filename, verbosity, outputMutex))
452+
"Compiling " ~ testBundle.filename, verbosity | Verbosity.outputAlways, outputMutex))
451453
testBundle.failed = true;
452454
}
453455
}
@@ -648,7 +650,7 @@ int main(string[] args)
648650
compiler, "-g", "-w", "-m" ~ model, "-i=dparsergen", "-Icore",
649651
"-Igenerator", "generator/dparsergen/generator/generator.d",
650652
"-of" ~ generator
651-
], "Compiling dparsergen", verbosity, outputMutex))
653+
], "Compiling dparsergen", verbosity | Verbosity.outputAlways, outputMutex))
652654
return 1;
653655

654656
if (!runCommand([
@@ -711,7 +713,7 @@ int main(string[] args)
711713
{
712714
dmdArgsGeneratortests ~= e.name;
713715
}
714-
if (!runCommand(dmdArgsGeneratortests, "Compiling generatortests", verbosity, outputMutex))
716+
if (!runCommand(dmdArgsGeneratortests, "Compiling generatortests", verbosity | Verbosity.outputAlways, outputMutex))
715717
{
716718
anyFailure = true;
717719
}

0 commit comments

Comments
 (0)
Please sign in to comment.