def testPinpointParams_SkipsConvertingHashes(self, mock_crrev):
        params = {
            'test_path':
            'ChromiumPerf/android-webview-nexus5x/system_health/foo',
            'start_commit': 'abcd1234',
            'end_commit': 'efgh5678',
            'extra_test_args': '',
            'story_filter': '',
        }
        results = pinpoint_request.PinpointParamsFromPerfTryParams(params)

        self.assertEqual('abcd1234', results['start_git_hash'])
        self.assertEqual('efgh5678', results['end_git_hash'])
        self.assertFalse(mock_crrev.called)
  def testPinpointParams_IsolateTarget_WebviewTelemetry(self):
    params = {
        'test_path': 'ChromiumPerf/android-webview-nexus5x/system_health/foo',
        'start_commit': 'abcd1234',
        'end_commit': 'efgh5678',
        'extra_test_args': '',
    }
    results = pinpoint_request.PinpointParamsFromPerfTryParams(params)

    self.assertEqual('android-webview-nexus5x', results['configuration'])
    self.assertEqual('system_health', results['benchmark'])
    self.assertEqual('telemetry_perf_webview_tests', results['target'])
    self.assertEqual('*****@*****.**', results['user'])
    self.assertEqual('abcd1234', results['start_git_hash'])
    self.assertEqual('efgh5678', results['end_git_hash'])
  def testPinpointParams_V8(self, mock_crrev):
    mock_crrev.return_value = {'git_sha': 'acbd'}
    params = {
        'test_path': 'internal.client.v8/Pixel2/v8/JSTests/Array/Total',
        'start_commit': '1234',
        'end_commit': '5678',
        'extra_test_args': '',
        'story_filter': '',
    }
    results = pinpoint_request.PinpointParamsFromPerfTryParams(params)

    self.assertEqual('', results['target'])
    mock_crrev.assert_any_call(
        number='1234', numbering_identifier='refs/heads/master',
        numbering_type='COMMIT_POSITION', project='chromium', repo='v8/v8')
    def testPinpointParams_IsolateTarget_LacrosEve(self):
        params = {
            'test_path': 'ChromiumPerf/lacros-eve-perf/system_health/foo',
            'start_commit': 'abcd1234',
            'end_commit': 'efgh5678',
            'extra_test_args': '',
            'story_filter': '',
        }
        results = pinpoint_request.PinpointParamsFromPerfTryParams(params)

        self.assertEqual('lacros-eve-perf', results['configuration'])
        self.assertEqual('system_health', results['benchmark'])
        self.assertEqual('performance_test_suite_eve', results['target'])
        self.assertEqual('*****@*****.**', results['user'])
        self.assertEqual('abcd1234', results['base_git_hash'])
        self.assertEqual('efgh5678', results['end_git_hash'])
  def testPinpointParams_IsolateTarget_WebviewTelemetry(self):
    params = {
        'test_path':
            'ChromiumPerf/Android Nexus5X WebView Perf/system_health/foo',
        'start_commit': 'abcd1234',
        'end_commit': 'efgh5678',
        'extra_test_args': '',
        'story_filter': '',
    }
    results = pinpoint_request.PinpointParamsFromPerfTryParams(params)

    self.assertEqual('Android Nexus5X WebView Perf', results['configuration'])
    self.assertEqual('system_health', results['benchmark'])
    self.assertEqual('performance_webview_test_suite', results['target'])
    self.assertEqual('*****@*****.**', results['user'])
    self.assertEqual('abcd1234', results['base_git_hash'])
    self.assertEqual('efgh5678', results['end_git_hash'])
Example #6
0
    def testPinpointParams_IsolateTarget_Telemetry(self):
        params = {
            'test_path': 'ChromiumPerf/mac/system_health/foo',
            'start_commit': 'abcd1234',
            'end_commit': 'efgh5678',
            'extra_test_args':
            json.dumps(['--extra-trace-args', 'abc,123,foo']),
        }
        results = pinpoint_request.PinpointParamsFromPerfTryParams(params)

        self.assertEqual('mac', results['configuration'])
        self.assertEqual('system_health', results['benchmark'])
        self.assertEqual('performance_test_suite', results['target'])
        self.assertEqual('*****@*****.**', results['user'])
        self.assertEqual('abcd1234', results['start_git_hash'])
        self.assertEqual('efgh5678', results['end_git_hash'])
        self.assertEqual(['--extra-trace-args', 'abc,123,foo'],
                         json.loads(results['extra_test_args']))
Example #7
0
 def testPinpointParams_InvalidSheriff_RaisesError(self):
     params = {'test_path': 'ChromiumPerf/foo/blah/foo'}
     with self.assertRaises(pinpoint_request.InvalidParamsError):
         pinpoint_request.PinpointParamsFromPerfTryParams(params)