@@ -134,3 +134,24 @@ public sealed class TwinCATTheoryAttribute : TheoryAttribute
|
||||
"for setup; typical cause is the trial license expired or TWINCAT_TARGET_NETID is unset.";
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Perf-tier <c>[Fact]</c> equivalent. Runs only when the XAR runtime is reachable
|
||||
/// <em>and</em> <c>TWINCAT_PERF=1</c> is set. Perf tests are gated separately because
|
||||
/// they exercise the wire heavily (1000+ tags) + can extend test runs by tens of
|
||||
/// seconds — the operator opts in.
|
||||
/// </summary>
|
||||
public sealed class TwinCATPerfFactAttribute : FactAttribute
|
||||
{
|
||||
public TwinCATPerfFactAttribute()
|
||||
{
|
||||
if (!TwinCATXarFixture.IsRuntimeAvailable())
|
||||
{
|
||||
Skip = "TwinCAT XAR not reachable. See docs/drivers/TwinCAT-Test-Fixture.md " +
|
||||
"for setup; typical cause is the trial license expired or TWINCAT_TARGET_NETID is unset.";
|
||||
return;
|
||||
}
|
||||
if (Environment.GetEnvironmentVariable("TWINCAT_PERF") != "1")
|
||||
Skip = "Perf tier disabled. Set TWINCAT_PERF=1 to run; see docs/drivers/TwinCAT-Test-Fixture.md §Performance.";
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user