diff options
author | Henrik Kjellander <kjellander@chromium.org> | 2014-09-01 13:04:55 +0200 |
---|---|---|
committer | Henrik Kjellander <kjellander@chromium.org> | 2014-09-01 11:09:00 +0000 |
commit | f0a439da1aba8e22b30ede87087418e806f7fa75 (patch) | |
tree | 0c32a0859d95fa7021523137593eaba6440ca4fa /build | |
parent | 46c5b30d31a0fa9b5f8200af08d80babbf305d41 (diff) | |
download | chromium_src-f0a439da1aba8e22b30ede87087418e806f7fa75.zip chromium_src-f0a439da1aba8e22b30ede87087418e806f7fa75.tar.gz chromium_src-f0a439da1aba8e22b30ede87087418e806f7fa75.tar.bz2 |
Refactor/cleanup WebRTC-specific Andorid glue code.
Remove a bunch of code that is already longer used or
will become unused when https://review.webrtc.org/22149004/
and https://codereview.chromium.org/505153002/ are landed.
Remove hardcoded paths to the WebRTC isolate files to make
it easier for us to make changes to them, since we can pass
the path to the .isolate file on test execution instead
(keeping the configuration in the WebRTC buildbot recipe instead).
Previously we had to roll our Chromium revision in WebRTC DEPS
every time a change was made before it became used.
Add support for a CHECKOUT_SOURCE_ROOT environment variable
used to make it possible to override the hardcoded path traversal
that is done to find the src/ directory (since it's different for
WebRTC bots). I considered passing a flag into the test_runner.py
scripts instead of using an environment variable, but my opinion is
that it would pollute the code too much since
constants.DIR_SOURCE_ROOT is used in 70 different places.
BUG=webrtc:3741
TEST=local building and test execution using command lines like this:
cd /path/to/webrtc/src
export CHECKOUT_SOURCE_ROOT=`pwd`
build/android/test_runner.py gtest -s tools_unittests --isolate-file-path=webrtc/tools/tools_unittests.isolate
R=navabi@chromium.org
Review URL: https://codereview.chromium.org/500423004
Cr-Commit-Position: refs/heads/master@{#292861}
Diffstat (limited to 'build')
-rw-r--r-- | build/all.gyp | 18 | ||||
-rwxr-xr-x | build/android/buildbot/bb_device_steps.py | 12 | ||||
-rwxr-xr-x | build/android/buildbot/bb_run_bot.py | 12 | ||||
-rw-r--r-- | build/android/pylib/constants.py | 5 | ||||
-rw-r--r-- | build/android/pylib/gtest/gtest_config.py | 17 | ||||
-rw-r--r-- | build/android/pylib/gtest/setup.py | 25 |
6 files changed, 5 insertions, 84 deletions
diff --git a/build/all.gyp b/build/all.gyp index 833c3dd..6bb6a86 100644 --- a/build/all.gyp +++ b/build/all.gyp @@ -802,24 +802,6 @@ ], }, { - # WebRTC Android APK tests. - 'target_name': 'android_builder_webrtc', - 'type': 'none', - 'variables': { - # Set default value for include_tests to '0'. It is normally only - # used in WebRTC GYP files. It is set to '1' only when building - # WebRTC for Android, inside a Chromium checkout. - 'include_tests%': 0, - }, - 'conditions': [ - ['include_tests==1', { - 'dependencies': [ - '../third_party/webrtc/build/apk_tests.gyp:*', - ], - }], - ], - }, # target_name: android_builder_webrtc - { # WebRTC Chromium tests to run on Android. 'target_name': 'android_builder_chromium_webrtc', 'type': 'none', diff --git a/build/android/buildbot/bb_device_steps.py b/build/android/buildbot/bb_device_steps.py index 1d865e8..a99d4e1 100755 --- a/build/android/buildbot/bb_device_steps.py +++ b/build/android/buildbot/bb_device_steps.py @@ -76,7 +76,7 @@ INSTRUMENTATION_TESTS = dict((suite.name, suite) for suite in [ VALID_TESTS = set(['chromedriver', 'chrome_proxy', 'gpu', 'mojo', 'sync', 'telemetry_perf_unittests', 'ui', 'unit', 'webkit', - 'webkit_layout', 'webrtc_chromium', 'webrtc_native']) + 'webkit_layout']) RunCmd = bb_utils.RunCmd @@ -498,14 +498,6 @@ def RunWebkitTests(options): RunWebkitLint(options.target) -def RunWebRTCChromiumTests(options): - RunTestSuites(options, gtest_config.WEBRTC_CHROMIUM_TEST_SUITES) - - -def RunWebRTCNativeTests(options): - RunTestSuites(options, gtest_config.WEBRTC_NATIVE_TEST_SUITES) - - def RunGPUTests(options): revision = _GetRevision(options) builder_name = options.build_properties.get('buildername', 'noname') @@ -553,8 +545,6 @@ def GetTestStepCmds(): ('unit', RunUnitTests), ('webkit', RunWebkitTests), ('webkit_layout', RunWebkitLayoutTests), - ('webrtc_chromium', RunWebRTCChromiumTests), - ('webrtc_native', RunWebRTCNativeTests), ] diff --git a/build/android/buildbot/bb_run_bot.py b/build/android/buildbot/bb_run_bot.py index 96b558d..2acde09 100755 --- a/build/android/buildbot/bb_run_bot.py +++ b/build/android/buildbot/bb_run_bot.py @@ -187,18 +187,6 @@ def GetBotStepMap(): B('webkit-latest-contentshell', H(compile_step), T(['webkit_layout'], ['--auto-reconnect'])), B('builder-unit-tests', H(compile_step), T(['unit'])), - B('webrtc-chromium-builder', - H(std_build_steps, - extra_args=['--build-targets=android_builder_chromium_webrtc'])), - B('webrtc-native-builder', - H(std_build_steps, - extra_args=['--build-targets=android_builder_webrtc'], - extra_gyp='include_tests=1 enable_tracing=1')), - B('webrtc-chromium-tests', H(std_test_steps), - T(['webrtc_chromium'], - [flakiness_server, '--gtest-filter=WebRtc*', '--cleanup'])), - B('webrtc-native-tests', H(std_test_steps), - T(['webrtc_native'], ['--cleanup', flakiness_server])), # Generic builder config (for substring match). B('builder', H(std_build_steps)), diff --git a/build/android/pylib/constants.py b/build/android/pylib/constants.py index 3d0dfbc..8b800ab 100644 --- a/build/android/pylib/constants.py +++ b/build/android/pylib/constants.py @@ -11,8 +11,9 @@ import os import subprocess -DIR_SOURCE_ROOT = os.path.abspath(os.path.join(os.path.dirname(__file__), - os.pardir, os.pardir, os.pardir)) +DIR_SOURCE_ROOT = os.environ.get('CHECKOUT_SOURCE_ROOT', + os.path.abspath(os.path.join(os.path.dirname(__file__), + os.pardir, os.pardir, os.pardir))) ISOLATE_DEPS_DIR = os.path.join(DIR_SOURCE_ROOT, 'isolate_deps_dir') CHROME_SHELL_HOST_DRIVEN_DIR = os.path.join( diff --git a/build/android/pylib/gtest/gtest_config.py b/build/android/pylib/gtest/gtest_config.py index ce3aef4..65d7fc0 100644 --- a/build/android/pylib/gtest/gtest_config.py +++ b/build/android/pylib/gtest/gtest_config.py @@ -41,20 +41,3 @@ ASAN_EXCLUDED_TEST_SUITES = [ 'breakpad_unittests', 'sandbox_linux_unittests' ] - -WEBRTC_CHROMIUM_TEST_SUITES = [ - 'content_browsertests', -] - -WEBRTC_NATIVE_TEST_SUITES = [ - 'audio_decoder_unittests', - 'common_audio_unittests', - 'common_video_unittests', - 'modules_tests', - 'modules_unittests', - 'system_wrappers_unittests', - 'test_support_unittests', - 'tools_unittests', - 'video_engine_core_unittests', - 'voice_engine_unittests', -] diff --git a/build/android/pylib/gtest/setup.py b/build/android/pylib/gtest/setup.py index 00a5753..da885c0 100644 --- a/build/android/pylib/gtest/setup.py +++ b/build/android/pylib/gtest/setup.py @@ -46,29 +46,6 @@ _ISOLATE_FILE_PATHS = { 'third_party/WebKit/Source/web/WebKitUnitTests.isolate', } -# Paths relative to third_party/webrtc/ (kept separate for readability). -_WEBRTC_ISOLATE_FILE_PATHS = { - 'audio_decoder_unittests': - 'modules/audio_coding/neteq/audio_decoder_unittests.isolate', - 'common_audio_unittests': 'common_audio/common_audio_unittests.isolate', - 'common_video_unittests': 'common_video/common_video_unittests.isolate', - 'modules_tests': 'modules/modules_tests.isolate', - 'modules_unittests': 'modules/modules_unittests.isolate', - 'system_wrappers_unittests': - 'system_wrappers/source/system_wrappers_unittests.isolate', - 'test_support_unittests': 'test/test_support_unittests.isolate', - 'tools_unittests': 'tools/tools_unittests.isolate', - 'video_engine_tests': 'video_engine_tests.isolate', - 'video_engine_core_unittests': - 'video_engine/video_engine_core_unittests.isolate', - 'voice_engine_unittests': 'voice_engine/voice_engine_unittests.isolate', - 'webrtc_perf_tests': 'webrtc_perf_tests.isolate', -} - -# Append the WebRTC tests with the full path from Chromium's src/ root. -for webrtc_test, isolate_path in _WEBRTC_ISOLATE_FILE_PATHS.items(): - _ISOLATE_FILE_PATHS[webrtc_test] = 'third_party/webrtc/%s' % isolate_path - # Used for filtering large data deps at a finer grain than what's allowed in # isolate files since pushing deps to devices is expensive. # Wildcards are allowed. @@ -121,7 +98,7 @@ def _GenerateDepsDirUsingIsolate(suite_name, isolate_file_path=None): isolated_abs_path = os.path.join( constants.GetOutDirectory(), '%s.isolated' % suite_name) - assert os.path.exists(isolate_abs_path) + assert os.path.exists(isolate_abs_path), 'Cannot find %s' % isolate_abs_path # This needs to be kept in sync with the cmd line options for isolate.py # in src/build/isolate.gypi. isolate_cmd = [ |