diff --git a/NWN.Anvil.TestRunner/src/main/TestRunnerService.cs b/NWN.Anvil.TestRunner/src/main/TestRunnerService.cs index 0de197f71..126b93688 100644 --- a/NWN.Anvil.TestRunner/src/main/TestRunnerService.cs +++ b/NWN.Anvil.TestRunner/src/main/TestRunnerService.cs @@ -25,6 +25,8 @@ internal sealed class TestRunnerService private readonly Queue testAssemblyQueue = new Queue(); private readonly string outputDir; + private readonly string additionalArgs = Environment.GetEnvironmentVariable("ANVIL_NUNIT_ARGS"); + private Thread testWorkerThread; public TestRunnerService(MainThreadSynchronizationContext mainThreadSynchronizationContext, PluginStorageService pluginStorageService) @@ -78,7 +80,8 @@ private async void Shutdown() private string[] GetRunnerArguments(Assembly assembly) { string outputPath = Path.Combine(outputDir, assembly.GetName().Name!); - string args = $"--mainthread --work={outputPath}"; + + string args = $"--mainthread --work={outputPath} {additionalArgs}"; return string.IsNullOrEmpty(args) ? Array.Empty() : CommandLineParser.SplitCommandLineIntoArguments(args, false).ToArray(); } }