public static void shrQAFinish(string[] args, eQAstatus iStatus) { // By default QATest is disabled and NoPrompt is Enabled (times out at seconds passed into ExitInTime() ) bool bQATest = false, bNoPrompt = true, bQuitInTime = true; string[] sStatus = new string[] { "FAILED", "PASSED", "WAIVED" }; for (int i = 1; i < args.Length; i++) { if (args[i].ToLower().Contains("-qatest")) { bQATest = true; } // For SDK individual samples that don't specify -noprompt or -prompt, // a 3 second delay will happen before exiting, giving a user time to view results if (args[i].ToLower().Contains("-noprompt")) { bNoPrompt = true; bQuitInTime = false; } if (args[i].ToLower().Contains("-prompt")) { bNoPrompt = false; bQuitInTime = false; } } if (bQATest) { Console.Write("&&&& {0} {1}", sStatus[(int)iStatus], Assembly.GetEntryAssembly().GetName().Name + ".exe"); foreach (var item in args) { Console.Write(" "); Console.Write(item); } Console.WriteLine(); } else { Console.Write("[{0}] test results...\n{1}\n", Assembly.GetEntryAssembly().GetName().Name + ".exe", sStatus[(int)iStatus]); } if (bQuitInTime) { ExitInTime(3); } else { if (!bNoPrompt) { Console.WriteLine("\nPress <Enter> to exit..."); Console.ReadLine(); } } }
public static void shrQAFinish(string[] args, eQAstatus iStatus) { // By default QATest is disabled and NoPrompt is Enabled (times out at seconds passed into ExitInTime() ) bool bQATest = false, bNoPrompt = true, bQuitInTime = true; string[] sStatus = new string[] { "FAILED", "PASSED", "WAIVED" }; for (int i = 1; i < args.Length; i++) { if (args[i].ToLower().Contains("-qatest")) bQATest = true; // For SDK individual samples that don't specify -noprompt or -prompt, // a 3 second delay will happen before exiting, giving a user time to view results if (args[i].ToLower().Contains("-noprompt")) { bNoPrompt = true; bQuitInTime = false; } if (args[i].ToLower().Contains("-prompt")) { bNoPrompt = false; bQuitInTime = false; } } if (bQATest) { Console.Write("&&&& {0} {1}", sStatus[(int)iStatus], Assembly.GetEntryAssembly().GetName().Name + ".exe"); foreach (var item in args) { Console.Write(" "); Console.Write(item); } Console.WriteLine(); } else { Console.Write("[{0}] test results...\n{1}\n", Assembly.GetEntryAssembly().GetName().Name + ".exe", sStatus[(int)iStatus]); } if (bQuitInTime) { ExitInTime(3); } else { if (!bNoPrompt) { Console.WriteLine("\nPress <Enter> to exit..."); Console.ReadLine(); } } }
public static void shrQAFinishExit2(bool bQAtest, string[] args, eQAstatus iStatus) { shrQAFinish2(bQAtest, args, iStatus); Environment.Exit(iStatus == eQAstatus.QA_PASSED ? EXIT_SUCCESS : EXIT_FAILURE); }