Commit f0a439da authored by Henrik Kjellander's avatar Henrik Kjellander

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}
parent 46c5b30d
...@@ -801,24 +801,6 @@ ...@@ -801,24 +801,6 @@
'../ui/ui_unittests.gyp:ui_unittests_apk', '../ui/ui_unittests.gyp:ui_unittests_apk',
], ],
}, },
{
# 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. # WebRTC Chromium tests to run on Android.
'target_name': 'android_builder_chromium_webrtc', 'target_name': 'android_builder_chromium_webrtc',
......
...@@ -76,7 +76,7 @@ INSTRUMENTATION_TESTS = dict((suite.name, suite) for suite in [ ...@@ -76,7 +76,7 @@ INSTRUMENTATION_TESTS = dict((suite.name, suite) for suite in [
VALID_TESTS = set(['chromedriver', 'chrome_proxy', 'gpu', 'mojo', 'sync', VALID_TESTS = set(['chromedriver', 'chrome_proxy', 'gpu', 'mojo', 'sync',
'telemetry_perf_unittests', 'ui', 'unit', 'webkit', 'telemetry_perf_unittests', 'ui', 'unit', 'webkit',
'webkit_layout', 'webrtc_chromium', 'webrtc_native']) 'webkit_layout'])
RunCmd = bb_utils.RunCmd RunCmd = bb_utils.RunCmd
...@@ -498,14 +498,6 @@ def RunWebkitTests(options): ...@@ -498,14 +498,6 @@ def RunWebkitTests(options):
RunWebkitLint(options.target) 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): def RunGPUTests(options):
revision = _GetRevision(options) revision = _GetRevision(options)
builder_name = options.build_properties.get('buildername', 'noname') builder_name = options.build_properties.get('buildername', 'noname')
...@@ -553,8 +545,6 @@ def GetTestStepCmds(): ...@@ -553,8 +545,6 @@ def GetTestStepCmds():
('unit', RunUnitTests), ('unit', RunUnitTests),
('webkit', RunWebkitTests), ('webkit', RunWebkitTests),
('webkit_layout', RunWebkitLayoutTests), ('webkit_layout', RunWebkitLayoutTests),
('webrtc_chromium', RunWebRTCChromiumTests),
('webrtc_native', RunWebRTCNativeTests),
] ]
......
...@@ -187,18 +187,6 @@ def GetBotStepMap(): ...@@ -187,18 +187,6 @@ def GetBotStepMap():
B('webkit-latest-contentshell', H(compile_step), B('webkit-latest-contentshell', H(compile_step),
T(['webkit_layout'], ['--auto-reconnect'])), T(['webkit_layout'], ['--auto-reconnect'])),
B('builder-unit-tests', H(compile_step), T(['unit'])), 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). # Generic builder config (for substring match).
B('builder', H(std_build_steps)), B('builder', H(std_build_steps)),
......
...@@ -11,8 +11,9 @@ import os ...@@ -11,8 +11,9 @@ import os
import subprocess import subprocess
DIR_SOURCE_ROOT = os.path.abspath(os.path.join(os.path.dirname(__file__), DIR_SOURCE_ROOT = os.environ.get('CHECKOUT_SOURCE_ROOT',
os.pardir, os.pardir, os.pardir)) 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') ISOLATE_DEPS_DIR = os.path.join(DIR_SOURCE_ROOT, 'isolate_deps_dir')
CHROME_SHELL_HOST_DRIVEN_DIR = os.path.join( CHROME_SHELL_HOST_DRIVEN_DIR = os.path.join(
......
...@@ -41,20 +41,3 @@ ASAN_EXCLUDED_TEST_SUITES = [ ...@@ -41,20 +41,3 @@ ASAN_EXCLUDED_TEST_SUITES = [
'breakpad_unittests', 'breakpad_unittests',
'sandbox_linux_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',
]
...@@ -46,29 +46,6 @@ _ISOLATE_FILE_PATHS = { ...@@ -46,29 +46,6 @@ _ISOLATE_FILE_PATHS = {
'third_party/WebKit/Source/web/WebKitUnitTests.isolate', '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 # Used for filtering large data deps at a finer grain than what's allowed in
# isolate files since pushing deps to devices is expensive. # isolate files since pushing deps to devices is expensive.
# Wildcards are allowed. # Wildcards are allowed.
...@@ -121,7 +98,7 @@ def _GenerateDepsDirUsingIsolate(suite_name, isolate_file_path=None): ...@@ -121,7 +98,7 @@ def _GenerateDepsDirUsingIsolate(suite_name, isolate_file_path=None):
isolated_abs_path = os.path.join( isolated_abs_path = os.path.join(
constants.GetOutDirectory(), '%s.isolated' % suite_name) 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 # This needs to be kept in sync with the cmd line options for isolate.py
# in src/build/isolate.gypi. # in src/build/isolate.gypi.
isolate_cmd = [ isolate_cmd = [
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment