tools/perf/core/benchmark_runner_test.py
def testMain_ReturnCode(self):
    """Test that benchmark_runner.main() respects return code from Telemetry."""
    config = mock.Mock()
    with mock.patch('core.benchmark_runner.command_line') as telemetry_cli:
      telemetry_cli.ParseArgs.side_effect = _FakeParseArgs
      telemetry_cli.RunCommand.return_value = 42

      # Note: We pass `--output-format none` and a non-existent output
      # dir to prevent the results processor from processing any results.
      return_code = benchmark_runner.main(config, [
          'run', 'some.benchmark', '--browser', 'stable',
          '--output-dir', '/does/not/exist', '--output-format', 'none'])
      self.assertEqual(return_code, 42)
Test that benchmark_runner.main() respects return code from Telemetry.
Test that benchmark_runner.main() respects return code from Telemetry.
Test that benchmark_runner . main () respects return code from Telemetry .
def testMain_ReturnCode(self):
    config = mock.Mock()
    with mock.patch('core.benchmark_runner.command_line') as telemetry_cli:
      telemetry_cli.ParseArgs.side_effect = _FakeParseArgs
      telemetry_cli.RunCommand.return_value = 42
      return_code = benchmark_runner.main(config, [
          'run', 'some.benchmark', '--browser', 'stable',
          '--output-dir', '/does/not/exist', '--output-format', 'none'])
      self.assertEqual(return_code, 42)
def testMain_ReturnCode ( self ) : config = mock . Mock ( ) with mock . patch ( 'core.benchmark_runner.command_line' ) as telemetry_cli : telemetry_cli . ParseArgs . side_effect = _FakeParseArgs telemetry_cli . RunCommand . return_value = 42 return_code = benchmark_runner . main ( config , [ 'run' , 'some.benchmark' , '--browser' , 'stable' , '--output-dir' , '/does/not/exist' , '--output-format' , 'none' ] ) self . assertEqual ( return_code , 42 )
Test that benchmark_runner.main() respects return code from Telemetry.
Test that benchmark_runner . main () respects return code from Telemetry .
"""Test that benchmark_runner.main() respects return code from Telemetry.""" # Note: We pass `--output-format none` and a non-existent output # dir to prevent the results processor from processing any results.
self