예제 #1
0
def main():
  # Set our own paths to the .isolate files.
  # pylint: disable=protected-access
  gtest_test_instance._DEFAULT_ISOLATE_FILE_PATHS.update({
    'audio_decoder_unittests':
        'webrtc/modules/audio_decoder_unittests.isolate',
    'common_audio_unittests':
        'webrtc/common_audio/common_audio_unittests.isolate',
    'common_video_unittests':
        'webrtc/common_video/common_video_unittests.isolate',
    'modules_tests': 'webrtc/modules/modules_tests.isolate',
    'modules_unittests': 'webrtc/modules/modules_unittests.isolate',
    'rtc_unittests': 'webrtc/rtc_unittests.isolate',
    'system_wrappers_unittests':
        'webrtc/system_wrappers/system_wrappers_unittests.isolate',
    'test_support_unittests': 'webrtc/test/test_support_unittests.isolate',
    'tools_unittests': 'webrtc/tools/tools_unittests.isolate',
    'video_capture_tests':
        'webrtc/modules/video_capture/video_capture_tests.isolate',
    'video_engine_tests': 'webrtc/video_engine_tests.isolate',
    'video_engine_core_unittests':
        'webrtc/video_engine/video_engine_core_unittests.isolate',
    'voice_engine_unittests':
        'webrtc/voice_engine/voice_engine_unittests.isolate',
    'webrtc_perf_tests': 'webrtc/webrtc_perf_tests.isolate',
  })
  # Override environment variable to make it possible for the scripts to find
  # the root directory (our symlinking of the Chromium build toolchain would
  # otherwise make them fail to do so).
  os.environ['CHECKOUT_SOURCE_ROOT'] = SRC_DIR
  return test_runner.main()
예제 #2
0
  def test_tast_lacros(self, use_vm):
    """Tests running a tast tests for Lacros."""
    with open(os.path.join(self._tmp_dir, 'streamed_results.jsonl'), 'w') as f:
      json.dump(_TAST_TEST_RESULTS_JSON, f)

    args = self.get_common_tast_args(use_vm) + [
        '-t=lacros.Basic',
        '--deploy-lacros',
    ]

    with mock.patch.object(sys, 'argv', args),\
         mock.patch.object(test_runner.subprocess, 'Popen') as mock_popen:
      mock_popen.return_value.returncode = 0

      test_runner.main()
      expected_cmd = self.get_common_tast_expectations(
          use_vm, is_lacros=True) + [
              '--tast',
              'lacros.Basic',
              '--deploy-lacros',
          ]

      self.safeAssertItemsEqual(expected_cmd, mock_popen.call_args[0][0])
예제 #3
0
    def test_tast_attr_expr(self, use_vm):
        """Tests running a tast tests specified by an attribute expression."""
        with open(os.path.join(self._tmp_dir, 'streamed_results.jsonl'),
                  'w') as f:
            json.dump(_TAST_TEST_RESULTS_JSON, f)

        args = [
            'script_name',
            'tast',
            '--suite-name=chrome_all_tast_tests',
            '--board=eve',
            '--flash',
            '--path-to-outdir=out_eve/Release',
            '--logs-dir=%s' % self._tmp_dir,
            '--attr-expr=( "group:mainline" && "dep:chrome" && !informational)',
            '--use-vm' if use_vm else '--device=localhost:2222',
        ]
        with mock.patch.object(sys, 'argv', args),\
             mock.patch.object(test_runner.subprocess, 'Popen') as mock_popen:
            mock_popen.return_value.returncode = 0

            test_runner.main()
            expected_cmd = [
                test_runner.CROS_RUN_TEST_PATH, '--board', 'eve',
                '--cache-dir', test_runner.DEFAULT_CROS_CACHE,
                '--results-dest-dir',
                '%s/system_logs' % self._tmp_dir, '--mount', '--deploy',
                '--nostrip', '--flash', '--build-dir', 'out_eve/Release',
                '--results-dir', self._tmp_dir,
                '--tast=( "group:mainline" && "dep:chrome" && !informational)'
            ]
            expected_cmd.extend(['--start', '--copy-on-write']
                                if use_vm else ['--device', 'localhost:2222'])
            for p in test_runner.SYSTEM_LOG_LOCATIONS:
                expected_cmd.extend(['--results-src', p])

            self.assertItemsEqual(expected_cmd, mock_popen.call_args[0][0])
예제 #4
0
def main():
    # Override the stable test suites with the WebRTC tests.
    gtest_config.STABLE_TEST_SUITES = [
        'audio_decoder_unittests',
        'common_audio_unittests',
        'common_video_unittests',
        'modules_tests',
        'modules_unittests',
        'rtc_unittests',
        'system_wrappers_unittests',
        'test_support_unittests',
        'tools_unittests',
        'video_capture_tests',
        'video_engine_tests',
        'video_engine_core_unittests',
        'voice_engine_unittests',
        'webrtc_perf_tests',
    ]
    gtest_config.EXPERIMENTAL_TEST_SUITES = []

    # Set our own paths to the .isolate files.
    setup.ISOLATE_FILE_PATHS = {
        'audio_decoder_unittests':
        'webrtc/modules/audio_coding/neteq/audio_decoder_unittests.isolate',
        'common_audio_unittests':
        'webrtc/common_audio/common_audio_unittests.isolate',
        'common_video_unittests':
        'webrtc/common_video/common_video_unittests.isolate',
        'modules_tests': 'webrtc/modules/modules_tests.isolate',
        'modules_unittests': 'webrtc/modules/modules_unittests.isolate',
        'rtc_unittests': 'webrtc/rtc_unittests.isolate',
        'system_wrappers_unittests':
        'webrtc/system_wrappers/system_wrappers_unittests.isolate',
        'test_support_unittests': 'webrtc/test/test_support_unittests.isolate',
        'tools_unittests': 'webrtc/tools/tools_unittests.isolate',
        'video_capture_tests':
        'webrtc/modules/video_capture/video_capture_tests.isolate',
        'video_engine_tests': 'webrtc/video_engine_tests.isolate',
        'video_engine_core_unittests':
        'webrtc/video_engine/video_engine_core_unittests.isolate',
        'voice_engine_unittests':
        'webrtc/voice_engine/voice_engine_unittests.isolate',
        'webrtc_perf_tests': 'webrtc/webrtc_perf_tests.isolate',
    }
    # Override environment variable to make it possible for the scripts to find
    # the root directory (our symlinking of the Chromium build toolchain would
    # otherwise make them fail to do so).
    os.environ['CHECKOUT_SOURCE_ROOT'] = SRC_DIR
    return test_runner.main()
예제 #5
0
def main():
  # Override the stable test suites with the WebRTC tests.
  gtest_config.STABLE_TEST_SUITES = [
    'audio_decoder_unittests',
    'common_audio_unittests',
    'common_video_unittests',
    'modules_tests',
    'modules_unittests',
    'rtc_unittests',
    'system_wrappers_unittests',
    'test_support_unittests',
    'tools_unittests',
    'video_capture_tests',
    'video_engine_tests',
    'video_engine_core_unittests',
    'voice_engine_unittests',
    'webrtc_perf_tests',
  ]
  gtest_config.EXPERIMENTAL_TEST_SUITES = []

  # Set our own paths to the .isolate files.
  setup.ISOLATE_FILE_PATHS = {
    'audio_decoder_unittests':
        'webrtc/modules/audio_coding/neteq/audio_decoder_unittests.isolate',
    'common_audio_unittests':
        'webrtc/common_audio/common_audio_unittests.isolate',
    'common_video_unittests':
        'webrtc/common_video/common_video_unittests.isolate',
    'modules_tests': 'webrtc/modules/modules_tests.isolate',
    'modules_unittests': 'webrtc/modules/modules_unittests.isolate',
    'rtc_unittests': 'webrtc/rtc_unittests.isolate',
    'system_wrappers_unittests':
        'webrtc/system_wrappers/system_wrappers_unittests.isolate',
    'test_support_unittests': 'webrtc/test/test_support_unittests.isolate',
    'tools_unittests': 'webrtc/tools/tools_unittests.isolate',
    'video_capture_tests':
        'webrtc/modules/video_capture/video_capture_tests.isolate',
    'video_engine_tests': 'webrtc/video_engine_tests.isolate',
    'video_engine_core_unittests':
        'webrtc/video_engine/video_engine_core_unittests.isolate',
    'voice_engine_unittests':
        'webrtc/voice_engine/voice_engine_unittests.isolate',
    'webrtc_perf_tests': 'webrtc/webrtc_perf_tests.isolate',
  }
  # Override environment variable to make it possible for the scripts to find
  # the root directory (our symlinking of the Chromium build toolchain would
  # otherwise make them fail to do so).
  os.environ['CHECKOUT_SOURCE_ROOT'] = SRC_DIR
  return test_runner.main()
예제 #6
0
    def test_tast_with_vars(self, use_vm):
        """Tests running a tast tests with runtime variables."""
        with open(os.path.join(self._tmp_dir, 'streamed_results.jsonl'),
                  'w') as f:
            json.dump(_TAST_TEST_RESULTS_JSON, f)

        args = self.common_tast_args + [
            '-t=ui.ChromeLogin',
            '--tast-var=key=value',
            '--use-vm' if use_vm else '--device=localhost:2222',
        ]
        with mock.patch.object(sys, 'argv', args),\
             mock.patch.object(test_runner.subprocess, 'Popen') as mock_popen:
            mock_popen.return_value.returncode = 0
            test_runner.main()
            expected_cmd = self.common_tast_expectations + [
                '--tast', 'ui.ChromeLogin', '--tast-var', 'key=value'
            ]
            expected_cmd.extend(['--start', '--copy-on-write']
                                if use_vm else ['--device', 'localhost:2222'])
            for p in test_runner.SYSTEM_LOG_LOCATIONS:
                expected_cmd.extend(['--results-src', p])

            self.assertItemsEqual(expected_cmd, mock_popen.call_args[0][0])
예제 #7
0
    def test_tast_attr_expr(self, use_vm):
        """Tests running a tast tests specified by an attribute expression."""
        with open(os.path.join(self._tmp_dir, 'streamed_results.jsonl'),
                  'w') as f:
            json.dump(_TAST_TEST_RESULTS_JSON, f)

        args = self.common_tast_args + [
            '--attr-expr=( "group:mainline" && "dep:chrome" && !informational)',
            '--use-vm' if use_vm else '--device=localhost:2222',
        ]
        with mock.patch.object(sys, 'argv', args),\
             mock.patch.object(test_runner.subprocess, 'Popen') as mock_popen:
            mock_popen.return_value.returncode = 0

            test_runner.main()
            expected_cmd = self.common_tast_expectations + [
                '--tast=( "group:mainline" && "dep:chrome" && !informational)',
            ]
            expected_cmd.extend(['--start', '--copy-on-write']
                                if use_vm else ['--device', 'localhost:2222'])
            for p in test_runner.SYSTEM_LOG_LOCATIONS:
                expected_cmd.extend(['--results-src', p])

            self.assertItemsEqual(expected_cmd, mock_popen.call_args[0][0])
예제 #8
0
def main():
    # Override the stable test suites with the WebRTC tests.
    gtest_config.STABLE_TEST_SUITES = [
        'peeracle_datastream_unittest',
    ]
    gtest_config.EXPERIMENTAL_TEST_SUITES = []

    # Set our own paths to the .isolate files.
    setup.ISOLATE_FILE_PATHS = {
        'peeracle_datastream_unittest':
        'peeracle/DataStream/peeracle_datastream_unittest.isolate'
    }
    # Override environment variable to make it possible for the scripts to find
    # the root directory (our symlinking of the Chromium build toolchain would
    # otherwise make them fail to do so).
    return test_runner.main()
예제 #9
0
def main():
  # Override the stable test suites with the WebRTC tests.
  gtest_config.STABLE_TEST_SUITES = [
    'peeracle_datastream_unittest',
  ]
  gtest_config.EXPERIMENTAL_TEST_SUITES = []

  # Set our own paths to the .isolate files.
  setup.ISOLATE_FILE_PATHS = {
    'peeracle_datastream_unittest':
        'peeracle/DataStream/peeracle_datastream_unittest.isolate'
  }
  # Override environment variable to make it possible for the scripts to find
  # the root directory (our symlinking of the Chromium build toolchain would
  # otherwise make them fail to do so).
  return test_runner.main()
예제 #10
0
def main():
    # Set our own paths to the .isolate files.
    # pylint: disable=protected-access
    gtest_test_instance._DEFAULT_ISOLATE_FILE_PATHS.update({
        'audio_decoder_unittests':
        'webrtc/modules/audio_decoder_unittests.isolate',
        'common_audio_unittests':
        'webrtc/common_audio/common_audio_unittests.isolate',
        'common_video_unittests':
        'webrtc/common_video/common_video_unittests.isolate',
        'peerconnection_unittests':
        'talk/peerconnection_unittests.isolate',
        'modules_tests':
        'webrtc/modules/modules_tests.isolate',
        'modules_unittests':
        'webrtc/modules/modules_unittests.isolate',
        'rtc_unittests':
        'webrtc/rtc_unittests.isolate',
        'system_wrappers_unittests':
        'webrtc/system_wrappers/system_wrappers_unittests.isolate',
        'test_support_unittests':
        'webrtc/test/test_support_unittests.isolate',
        'tools_unittests':
        'webrtc/tools/tools_unittests.isolate',
        'video_capture_tests':
        'webrtc/modules/video_capture/video_capture_tests.isolate',
        'video_engine_tests':
        'webrtc/video_engine_tests.isolate',
        'voice_engine_unittests':
        'webrtc/voice_engine/voice_engine_unittests.isolate',
        'webrtc_nonparallel_tests':
        'webrtc/webrtc_nonparallel_tests.isolate',
        'webrtc_perf_tests':
        'webrtc/webrtc_perf_tests.isolate',
    })
    # Override environment variable to make it possible for the scripts to find
    # the root directory (our symlinking of the Chromium build toolchain would
    # otherwise make them fail to do so).
    os.environ['CHECKOUT_SOURCE_ROOT'] = SRC_DIR
    return test_runner.main()
def main():
  # Override environment variable to make it possible for the scripts to find
  # the root directory (our symlinking of the Chromium build toolchain would
  # otherwise make them fail to do so).
  os.environ['CHECKOUT_SOURCE_ROOT'] = SRC_DIR
  return test_runner.main()