예제 #1
0
        public void Bisect(string boot_title = "")
        {
            string base_url = "https://dl.dolphin-emu.org/builds/dolphin-master-" + m_major_version + "-";
            int test_index = 0;
            RunBuild run_build = new RunBuild();

            while (m_first_index <= m_second_index)
            {

                test_index = m_first_index == -1 ? (0 + m_second_index) / 2 : (m_first_index + m_second_index) / 2;

                Download(base_url + m_build_list[test_index] + "-x64.7z", m_major_version, m_build_list[test_index]);

                if (!string.IsNullOrEmpty(boot_title))
                    run_build.Run(boot_title);
                else
                    run_build.Run();

                UserInput return_val = BisectEvent(test_index);

                if (return_val == UserInput.Yes)
                    m_second_index = test_index - 1;
                else if (return_val == UserInput.No)
                    m_first_index = test_index + 1;
                else
                    return;
            }

            UserInput open_url = BisectEvent(test_index, true);

            if (open_url == UserInput.Yes)
            {
                Process.Start("https://dolp.in/" + m_major_version + "-" + m_build_list[test_index+1]);
            }
        }
예제 #2
0
        public void Bisect(string boot_title = "")
        {
            string   base_url   = "https://dl.dolphin-emu.org/builds/dolphin-master-" + m_major_version + "-";
            int      test_index = 0;
            RunBuild run_build  = new RunBuild();

            while (m_first_index <= m_second_index)
            {
                test_index = m_first_index == -1 ? (0 + m_second_index) / 2 : (m_first_index + m_second_index) / 2;

                Download(base_url + m_build_list[test_index] + "-x64.7z", m_major_version, m_build_list[test_index]);

                if (!string.IsNullOrEmpty(boot_title))
                {
                    run_build.Run(boot_title);
                }
                else
                {
                    run_build.Run();
                }

                UserInput return_val = BisectEvent(test_index);

                if (return_val == UserInput.Yes)
                {
                    m_second_index = test_index - 1;
                }
                else if (return_val == UserInput.No)
                {
                    m_first_index = test_index + 1;
                }
                else
                {
                    return;
                }
            }

            UserInput open_url = BisectEvent(test_index, true);

            if (open_url == UserInput.Yes)
            {
                Process.Start("https://dolp.in/" + m_major_version + "-" + m_build_list[test_index + 1]);
            }
        }
예제 #3
0
        public void Bisect(string boot_title = "")
        {
            string        base_url       = "https://dl.dolphin-emu.org/builds/dolphin-master-";
            int           test_index     = 0;
            int           test_direction = 0;
            List <String> skipped_builds = new List <string>();
            RunBuild      run_build      = new RunBuild();
            Logger        log            = new Logger();

            while (!(m_first_index == m_second_index - 1))
            {
                test_index = m_first_index == -1 ? (0 + m_second_index) / 2 : (m_first_index + m_second_index) / 2;

                // dumb thing to make sure we keep trying to download a build until we get a valid build
                do
                {
                    try
                    {
                        Download(base_url + m_build_list[test_index] + "-x64.7z", m_build_list[test_index]);
                        log.Write("Testing build " + m_build_list[test_index]);
                        break;
                    }
                    catch (Exception e)
                    {
                        log.Write("ERROR. Skipping build " + m_build_list[test_index]);
                        skipped_builds.Add(m_build_list[test_index]);
                        BisectError(e.Message);
                        if (test_direction == 0)
                        {
                            --test_index;
                        }
                        else
                        {
                            ++test_index;
                        }
                    }
                }while (true);

                if (!string.IsNullOrEmpty(boot_title))
                {
                    run_build.Run(boot_title);
                }
                else
                {
                    run_build.Run();
                }

                UserInput return_val = BisectEvent(test_index);

                if (return_val == UserInput.Yes)
                {
                    log.Write("Build " + m_build_list[test_index] + " marked as a BAD build");
                    m_first_index  = test_index;
                    test_direction = 1;
                }
                else if (return_val == UserInput.No)
                {
                    log.Write("Build " + m_build_list[test_index] + " marked as a GOOD build");
                    m_second_index = test_index;
                    test_direction = 0;
                }
                else
                {
                    return;
                }
            }

            log.Write("Bisect completed. " + m_build_list[test_index] + " may be the culprit.");
            if (!(skipped_builds.Count == 0))
            {
                string sb = string.Join(", ", skipped_builds.ToArray());
                log.Write("Skipped builds: " + sb);
                log.Dispose();
            }
            UserInput open_url = BisectEvent(test_index, true);

            if (open_url == UserInput.Yes)
            {
                Process.Start("https://dolp.in/" + m_build_list[test_index - 1]);
            }
        }