public static void Main(string[] args) { NUnitRunner runner = new NUnitRunner(args); if (Debugger.IsAttached) { runner.ExcludeCategory(CategoryContants.ExceptionExpected); } Environment.ExitCode = runner.RunTests(1); }
public static void Main(string[] args) { NUnitRunner runner = new NUnitRunner(args); if (runner.HasCustomArg("--full-suite")) { Console.WriteLine("Running the full suite of tests"); FileSystemRunners.FileSystemRunner.UseAllRunners = true; } if (!runner.HasCustomArg("--run-builds")) { runner.ExcludeCategory(CategoryConstants.Build); } Environment.ExitCode = runner.RunTests(Properties.Settings.Default.TestRepeatCount); }
public static void Main(string[] args) { NUnitRunner runner = new NUnitRunner(args); if (Debugger.IsAttached) { runner.ExcludeCategory(CategoryConstants.ExceptionExpected); } Environment.ExitCode = runner.RunTests(); if (Debugger.IsAttached) { Console.WriteLine("Tests completed. Press Enter to exit."); Console.ReadLine(); } }
public static void Main(string[] args) { NUnitRunner runner = new NUnitRunner(args); if (runner.HasCustomArg("--full-suite")) { Console.WriteLine("Running the full suite of tests"); FileSystemRunners.FileSystemRunner.UseAllRunners = true; } if (!runner.HasCustomArg("--run-builds")) { runner.ExcludeCategory(CategoryConstants.Build); } string servicePath = Path.Combine(TestContext.CurrentContext.TestDirectory, Properties.Settings.Default.PathToGVFSService); GVFSServiceProcess.InstallService(servicePath); try { Environment.ExitCode = runner.RunTests(Properties.Settings.Default.TestRepeatCount); } finally { string serviceLogFolder = Path.Combine( Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData), "GVFS", GVFSServiceProcess.TestServiceName, "Logs"); Console.WriteLine("GVFS.Service logs at '{0}' attached below.\n\n", serviceLogFolder); foreach (string filename in TestResultsHelper.GetAllFilesInDirectory(serviceLogFolder)) { TestResultsHelper.OutputFileContents(filename); } GVFSServiceProcess.UninstallService(); } if (Debugger.IsAttached) { Console.WriteLine("Tests completed. Press Enter to exit."); Console.ReadLine(); } }
public static void Main(string[] args) { NUnitRunner runner = new NUnitRunner(args); if (runner.HasCustomArg("--no-shared-gvfs-cache")) { Console.WriteLine("Running without a shared git object cache"); GVFSTestConfig.NoSharedCache = true; } if (runner.HasCustomArg("--test-gvfs-on-path")) { Console.WriteLine("Running tests against GVFS on path"); GVFSTestConfig.TestGVFSOnPath = true; } GVFSTestConfig.LocalCacheRoot = runner.GetCustomArgWithParam("--shared-gvfs-cache-root"); if (runner.HasCustomArg("--full-suite")) { Console.WriteLine("Running the full suite of tests"); GVFSTestConfig.UseAllRunners = true; } else { runner.ExcludeCategory(Categories.FullSuiteOnly); } GVFSTestConfig.RepoToClone = runner.GetCustomArgWithParam("--repo-to-clone") ?? Properties.Settings.Default.RepoToClone; string servicePath = GVFSTestConfig.TestGVFSOnPath ? Properties.Settings.Default.PathToGVFSService : Path.Combine(TestContext.CurrentContext.TestDirectory, Properties.Settings.Default.PathToGVFSService); GVFSServiceProcess.InstallService(servicePath); try { Environment.ExitCode = runner.RunTests(); } finally { string serviceLogFolder = Path.Combine( Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData), "GVFS", GVFSServiceProcess.TestServiceName, "Logs"); Console.WriteLine("GVFS.Service logs at '{0}' attached below.\n\n", serviceLogFolder); foreach (string filename in TestResultsHelper.GetAllFilesInDirectory(serviceLogFolder)) { TestResultsHelper.OutputFileContents(filename); } GVFSServiceProcess.UninstallService(); } PrintTestCaseStats.PrintRunTimeStats(); if (Debugger.IsAttached) { Console.WriteLine("Tests completed. Press Enter to exit."); Console.ReadLine(); } }
public static void Main(string[] args) { Properties.Settings.Default.Initialize(); NUnitRunner runner = new NUnitRunner(args); if (runner.HasCustomArg("--no-shared-gvfs-cache")) { Console.WriteLine("Running without a shared git object cache"); GVFSTestConfig.NoSharedCache = true; } if (runner.HasCustomArg("--test-gvfs-on-path")) { Console.WriteLine("Running tests against GVFS on path"); GVFSTestConfig.TestGVFSOnPath = true; } if (runner.HasCustomArg("--replace-inbox-projfs")) { Console.WriteLine("Tests will replace inbox ProjFS"); GVFSTestConfig.ReplaceInboxProjFS = true; } GVFSTestConfig.LocalCacheRoot = runner.GetCustomArgWithParam("--shared-gvfs-cache-root"); if (runner.HasCustomArg("--full-suite")) { Console.WriteLine("Running the full suite of tests"); if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) { GVFSTestConfig.FileSystemRunners = FileSystemRunners.FileSystemRunner.AllWindowsRunners; } else if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX)) { GVFSTestConfig.FileSystemRunners = FileSystemRunners.FileSystemRunner.AllMacRunners; } } else { runner.ExcludeCategory(Categories.FullSuiteOnly); GVFSTestConfig.FileSystemRunners = FileSystemRunners.FileSystemRunner.DefaultRunners; } if (runner.HasCustomArg("--windows-only")) { runner.IncludeCategory(Categories.Windows); } if (runner.HasCustomArg("--mac-only")) { runner.IncludeCategory(Categories.Mac.M1); runner.ExcludeCategory(Categories.Mac.M2); runner.ExcludeCategory(Categories.Mac.M3); runner.ExcludeCategory(Categories.Mac.M4); runner.ExcludeCategory(Categories.Windows); } GVFSTestConfig.RepoToClone = runner.GetCustomArgWithParam("--repo-to-clone") ?? Properties.Settings.Default.RepoToClone; RunBeforeAnyTests(); Environment.ExitCode = runner.RunTests(); RunAfterAllTests(); if (Debugger.IsAttached) { Console.WriteLine("Tests completed. Press Enter to exit."); Console.ReadLine(); } }