File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -96,7 +96,6 @@ int main(string[] args)
96
96
const rootDir = __FILE_FULL_PATH__.dirName.dirName;
97
97
const specDir = rootDir.buildPath(" spec" );
98
98
const stdDir = rootDir.buildPath(" .." , " phobos" , " std" );
99
- bool hasFailed;
100
99
101
100
config.dmdBinPath = environment.get (" DMD" , " dmd" );
102
101
auto helpInformation = getopt(
@@ -122,6 +121,7 @@ int main(string[] args)
122
121
];
123
122
auto files = chain(specDir.dirEntries(" *.dd" , SpanMode.depth),
124
123
stdDir.dirEntries(" *.d" , SpanMode.depth));
124
+ shared bool hasFailed;
125
125
foreach (file; files.parallel(1 ))
126
126
{
127
127
// auto-import current module if in phobos
@@ -143,9 +143,10 @@ int main(string[] args)
143
143
.joiner;
144
144
if (! allTests.empty)
145
145
{
146
+ import core.atomic ;
146
147
writefln(" %s: %d examples found" , file[rootDir.length+ 1 .. $], allTests.walkLength);
147
148
if (allTests.any! (a => a != 0 ))
148
- hasFailed = true ;
149
+ atomicStore( hasFailed, true ) ;
149
150
}
150
151
}
151
152
return hasFailed;
You can’t perform that action at this time.
0 commit comments