Browse Source

Fix leaktests

pull/9096/head
Benedikt Stebner 4 years ago
parent
commit
c3da4df93a
  1. 7
      nukebuild/Build.cs

7
nukebuild/Build.cs

@ -215,8 +215,6 @@ partial class Build : NukeBuild
RunCoreTest("Avalonia.DesignerSupport.Tests"); RunCoreTest("Avalonia.DesignerSupport.Tests");
}); });
[PackageExecutable("JetBrains.dotMemoryUnit", "dotMemoryUnit.exe")] readonly Tool DotMemoryUnit;
Target RunLeakTests => _ => _ Target RunLeakTests => _ => _
.OnlyWhenStatic(() => !Parameters.SkipTests && Parameters.IsRunningOnWindows) .OnlyWhenStatic(() => !Parameters.SkipTests && Parameters.IsRunningOnWindows)
.DependsOn(Compile) .DependsOn(Compile)
@ -224,10 +222,7 @@ partial class Build : NukeBuild
{ {
void DoMemoryTest() void DoMemoryTest()
{ {
var testAssembly = "tests\\Avalonia.LeakTests\\bin\\Release\\net461\\Avalonia.LeakTests.dll"; RunCoreTest("Avalonia.LeakTests");
DotMemoryUnit(
$"{XunitPath.DoubleQuoteIfNeeded()} --propagate-exit-code -- {testAssembly}",
timeout: 120_000);
} }
ControlFlow.ExecuteWithRetry(DoMemoryTest, delay: TimeSpan.FromMilliseconds(3)); ControlFlow.ExecuteWithRetry(DoMemoryTest, delay: TimeSpan.FromMilliseconds(3));
}); });

Loading…
Cancel
Save