Tests: Disable parallelization for tests with plugins

This commit is contained in:
Katy Coe
2020-12-30 18:13:12 +01:00
parent c57fa592b9
commit c6ed3a096c

View File

@@ -25,8 +25,15 @@ gci -Directory $bin | % {
if (Test-Path $loadOptionsFile -PathType Leaf) {
$loadOptions = cat $loadOptionsFile
}
$pluginsPath = "$($_.FullName)\plugins"
$attributes = ""
if (Test-Path $pluginsPath -PathType Container) {
$attributes = "[NonParallelizable]"
}
echo @"
[Test]
$attributes
public async Task $($_.Name -Replace '\W','_')() {
await runTest(@"$($_.FullName)", new LoadOptions { $loadOptions });
}