dotnet build /t:Test
```
-It is possible to pass parameters to the underlying xunit runner via the `XUnitOptions` parameter, e.g.:
+### Running only certain tests
+
+It is possible to pass parameters to the underlying xunit runner via the `XUnitOptions` parameter, e.g., to filter to tests in just one fixture (class):
```cmd
dotnet build /t:Test /p:XUnitOptions="-class Test.ClassUnderTests"
```
-Which is very useful when you want to run tests as `x86` on a `x64` machine:
+or to just one test method:
+
+```cmd
+dotnet build /t:test /p:outerloop=true /p:xunitoptions="-method System.Text.RegularExpressions.Tests.RegexMatchTests.StressTestDeepNestingOfLoops"
+```
+
+### Running only specific architectures
+
+To run tests as `x86` on a `x64` machine:
```cmd
dotnet build /t:Test /p:TargetArchitecture=x86
- `-nonamespace`
- `-parallel`
+### Viewing XUnit logs
+
+It's usually sufficient to see the test failure output in the console. There is also a test log file, which you can find in a location like `...\runtime\artifacts\bin\System.Text.RegularExpressions.Tests\Debug\net8.0\testResults.xml`. It can be helpful, for example, to grep through a series of failures, or to see how long a slow test actually took.
{
foreach (RegexEngine engine in RegexHelpers.AvailableEngines)
{
- yield return new object[] { engine, "(", "a", ")*", "a", 2000, 1000 };
+ if (engine != RegexEngine.NonBacktracking) // Hangs, or effectively hangs. https://github.com/dotnet/runtime/issues/84188
+ {
+ yield return new object[] { engine, "(", "a", ")*", "a", 2000, 1000 };
+ }
+
yield return new object[] { engine, "(", "[aA]", ")+", "aA", 2000, 3000 };
yield return new object[] { engine, "(", "ab", "){0,1}", "ab", 2000, 1000 };
}
}
- [OuterLoop("Can take over 10 seconds")]
+ [OuterLoop("Can take a few seconds")]
[ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.Is64BitProcess))] // consumes a lot of memory
[MemberData(nameof(StressTestDeepNestingOfLoops_TestData))]
public async Task StressTestDeepNestingOfLoops(RegexEngine engine, string begin, string inner, string end, string input, int pattern_repetition, int input_repetition)