Ejemplo n.º 1
0
        private static ProcessOutput Coverage(string folder)
        {
            var profile = GoRunner.RunGoTool(folder, runCoverageArgs); // create cover profile

            if (profile.StandardError.Any())
            {
                return(profile);
            }

            return(GoRunner.RunGoTool(folder, coverageArgs));
        }
Ejemplo n.º 2
0
        private static async void RunTests(string folder)
        {
            // asynchronously run test and coverage tasks
            var tests    = Task.Run(() => GoRunner.RunGoTool(folder, runTestsArgs));
            var coverage = Task.Run(() => Coverage(folder));

            var testResult     = ProcessTests(await tests);
            var coverageResult = ProcessCodeCoverage(await coverage);

            if (!testResult && !coverageResult)
            {
                BeepSuccess();
            }
        }