Add Android test runner script for WebRTC.

The Android test execution toolchain scripts in Chromium
has been causing headaches for us several times. Mostly
because they're tailored at running Chrome tests only.

Wrapping their script in our own avoids the pain of
upstreaming new test names to Chromium and rolling them
in to get them running on our bots.

TESTED=Ran a test on a local device using:
webrtc/build/android/test_runner.py gtest -s audio_decoder_unittests  --verbose --isolate-file-path webrtc/modules/audio_coding/neteq/audio_decoder_unittests.isolate --release
TBR=phoglund@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/25269004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@7794 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
kjellander@webrtc.org 2014-12-03 09:57:08 +00:00
parent 8e5c814ef0
commit c3e097cdc5

View File

@ -0,0 +1,50 @@
#!/usr/bin/env python
# Copyright (c) 2014 The WebRTC project authors. All Rights Reserved.
#
# Use of this source code is governed by a BSD-style license
# that can be found in the LICENSE file in the root of the source
# tree. An additional intellectual property rights grant can be found
# in the file PATENTS. All contributing project authors may
# be found in the AUTHORS file in the root of the source tree.
"""
Runs tests on Android devices.
This script exists to avoid WebRTC being broken by changes in the Chrome Android
test execution toolchain.
"""
import os
import sys
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
ROOT_DIR = os.path.join(SCRIPT_DIR, os.pardir, os.pardir, os.pardir)
CHROMIUM_BUILD_ANDROID_DIR = os.path.join(ROOT_DIR, 'build', 'android')
sys.path.insert(0, CHROMIUM_BUILD_ANDROID_DIR)
import test_runner
from pylib.gtest import gtest_config
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',
'system_wrappers_unittests',
'test_support_unittests',
'tools_unittests',
'video_capture_tests',
'video_engine_tests',
'video_engine_core_unittests',
'voice_engine_unittests',
'webrtc_perf_tests',
]
return test_runner.main()
if __name__ == '__main__':
sys.exit(main())