Avoid running tests for different target frameworks in parallel.
This lets us run more things in parallel which involve shared resources.
This commit is contained in:
parent
e3373d54ab
commit
d457b54a36
|
|
@ -8,6 +8,7 @@ k-test
|
||||||
|
|
||||||
projectFile=''
|
projectFile=''
|
||||||
Required. Path to the test project.json to execute
|
Required. Path to the test project.json to execute
|
||||||
|
|
||||||
*/}
|
*/}
|
||||||
|
|
||||||
@{
|
@{
|
||||||
|
|
@ -33,31 +34,20 @@ projectFile=''
|
||||||
};
|
};
|
||||||
|
|
||||||
// Currently only dnx* targets are supported. See aspnet/Universe#53
|
// Currently only dnx* targets are supported. See aspnet/Universe#53
|
||||||
var targetFrameworks = configs.Keys.Where(k => k.StartsWith("dnx", StringComparison.OrdinalIgnoreCase)).ToList();
|
var targetFrameworks = configs.Keys.Where(k => k.StartsWith("dnx", StringComparison.OrdinalIgnoreCase));
|
||||||
|
|
||||||
if (testParallel)
|
foreach (var framework in targetFrameworks)
|
||||||
{
|
{
|
||||||
Parallel.ForEach (targetFrameworks, framework => RunTest(projectFolder, framework));
|
var testArgs = IsMono ? " -parallel none" : "";
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
targetFrameworks.ForEach(framework => RunTest(projectFolder, framework));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
functions @{
|
if (!framework.StartsWith("dnxcore", StringComparison.OrdinalIgnoreCase))
|
||||||
private void RunTest(string projectFolder, string framework)
|
{
|
||||||
{
|
K(("test" + testArgs), projectFolder, "");
|
||||||
var testArgs = IsMono ? " -parallel none" : "";
|
}
|
||||||
|
else if (!IsMono)
|
||||||
if (!framework.StartsWith("dnxcore", StringComparison.OrdinalIgnoreCase))
|
{
|
||||||
{
|
K("test", projectFolder, "default -runtime CoreCLR");
|
||||||
K(("test" + testArgs), projectFolder, "");
|
}
|
||||||
}
|
|
||||||
else if (!IsMono)
|
|
||||||
{
|
|
||||||
K("test", projectFolder, "default -runtime CoreCLR");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue