Beispiel #1
0
    def _AssertCompatibleCommand(self, expected_command, original_command,
                                 revision, target_platform):
        """Tests the modification of the command that might be done.

    This modification to the command is done in order to get a Telemetry
    command that works; before some revisions, the browser name that Telemetry
    expects is different in some cases, but we want it to work anyway.

    Specifically, only for android:
      After r276628, only android-chrome-shell works.
      Prior to r274857, only android-chromium-testshell works.
      In the range [274857, 276628], both work.
    """
        bisect_options = bisect_perf_regression.BisectOptions()
        bisect_options.output_buildbot_annotations = None
        source_control = source_control_module.DetermineAndCreateSourceControl(
            bisect_options)
        bisect_instance = bisect_perf_regression.BisectPerformanceMetrics(
            source_control, bisect_options)
        bisect_instance.opts.target_platform = target_platform
        git_revision = bisect_instance.source_control.ResolveToRevision(
            revision, 'chromium', bisect_perf_regression.DEPOT_DEPS_NAME, 100)
        depot = 'chromium'
        command = bisect_instance.GetCompatibleCommand(original_command,
                                                       git_revision, depot)
        self.assertEqual(expected_command, command)
Beispiel #2
0
 def testBisectOptionsCanPrintHelp(self):
   """Tests that the argument parser can be made and can print help."""
   bisect_options = bisect_perf_regression.BisectOptions()
   parser = bisect_options._CreateCommandLineParser()
   parser.format_help()