static int Main(string[] args) { if (args.Length > 0 && IsDllFilePath(args[0])) { var dllPath = args[0]; var passThruArgs = args.Skip(1).ToArray(); return(RunXunitConsole(dllPath, passThruArgs)); } var runner = new NetCoreXunitRunner(); runner.ShowHelp(); Console.WriteLine(); Console.WriteLine("Additional options:"); Console.WriteLine(" -x86 : Force tests to run in an x86 process (Windows, .NET Framework only)"); return(ExitCodes.HelpShown); }
static int RunXunitConsole(string dllPath, string[] args) { XUnitRunner runner; IEnumerable <string> xunitArgs = args; if (IsDllNetCoreApp(dllPath)) { runner = new NetCoreXunitRunner(); } else { var forceX86 = args.Any(a => a == "-x86"); xunitArgs = args.Where(a => a != "-x86"); runner = new NetFrameworkXunitRunner(forceX86); } return(runner.Run(dllPath, xunitArgs)); }