Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(95)

Side by Side Diff: webrtc/build/android/test_runner.py

Issue 2024843002: Refactor VideoCapturerAndroid tests in WebRTC. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Changes according to magjed's comments #2 Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. 2 # Copyright (c) 2014 The WebRTC project authors. All Rights Reserved.
3 # 3 #
4 # Use of this source code is governed by a BSD-style license 4 # Use of this source code is governed by a BSD-style license
5 # that can be found in the LICENSE file in the root of the source 5 # that can be found in the LICENSE file in the root of the source
6 # tree. An additional intellectual property rights grant can be found 6 # tree. An additional intellectual property rights grant can be found
7 # in the file PATENTS. All contributing project authors may 7 # in the file PATENTS. All contributing project authors may
8 # be found in the AUTHORS file in the root of the source tree. 8 # be found in the AUTHORS file in the root of the source tree.
9 9
10 """ 10 """
11 Runs tests on Android devices. 11 Runs tests on Android devices.
12 12
13 This script exists to avoid WebRTC being broken by changes in the Chrome Android 13 This script exists to avoid WebRTC being broken by changes in the Chrome Android
14 test execution toolchain. It also conveniently sets the CHECKOUT_SOURCE_ROOT 14 test execution toolchain. It also conveniently sets the CHECKOUT_SOURCE_ROOT
15 environment variable. 15 environment variable.
16 """ 16 """
17 17
18 import os 18 import os
19 import sys 19 import sys
20 20
21 SCRIPT_DIR = os.path.dirname(__file__) 21 SCRIPT_DIR = os.path.dirname(__file__)
22 SRC_DIR = os.path.abspath(os.path.join(SCRIPT_DIR, os.pardir, os.pardir, 22 SRC_DIR = os.path.abspath(os.path.join(SCRIPT_DIR, os.pardir, os.pardir,
23 os.pardir)) 23 os.pardir))
24 CHROMIUM_BUILD_ANDROID_DIR = os.path.join(SRC_DIR, 'build', 'android') 24 CHROMIUM_BUILD_ANDROID_DIR = os.path.join(SRC_DIR, 'build', 'android')
25 sys.path.insert(0, CHROMIUM_BUILD_ANDROID_DIR) 25 sys.path.insert(0, CHROMIUM_BUILD_ANDROID_DIR)
26 26
27 27
28 import test_runner # pylint: disable=W0406 28 import test_runner # pylint: disable=W0406
29 from pylib.gtest import gtest_test_instance 29 from pylib.gtest import gtest_test_instance
30 from pylib.instrumentation import instrumentation_test_instance
perkj_webrtc 2016/06/08 08:48:10 what is this doing?
sakal 2016/06/08 09:20:14 The test runner tries to run the tests defined in
sakal 2016/06/08 11:12:30 Changing the name of the CameraVideoCapturerTest c
30 31
31 def main(): 32 def main():
32 # Set our own paths to the .isolate files. 33 # Set our own paths to the .isolate files.
33 # pylint: disable=protected-access 34 # pylint: disable=protected-access
34 gtest_test_instance._DEFAULT_ISOLATE_FILE_PATHS.update({ 35 gtest_test_instance._DEFAULT_ISOLATE_FILE_PATHS.update({
35 'audio_decoder_unittests': 36 'audio_decoder_unittests':
36 'webrtc/modules/audio_decoder_unittests.isolate', 37 'webrtc/modules/audio_decoder_unittests.isolate',
37 'common_audio_unittests': 38 'common_audio_unittests':
38 'webrtc/common_audio/common_audio_unittests.isolate', 39 'webrtc/common_audio/common_audio_unittests.isolate',
39 'common_video_unittests': 40 'common_video_unittests':
40 'webrtc/common_video/common_video_unittests.isolate', 41 'webrtc/common_video/common_video_unittests.isolate',
41 'peerconnection_unittests': 42 'peerconnection_unittests':
42 'webrtc/api/peerconnection_unittests.isolate', 43 'webrtc/api/peerconnection_unittests.isolate',
43 'modules_tests': 'webrtc/modules/modules_tests.isolate', 44 'modules_tests': 'webrtc/modules/modules_tests.isolate',
44 'modules_unittests': 'webrtc/modules/modules_unittests.isolate', 45 'modules_unittests': 'webrtc/modules/modules_unittests.isolate',
45 'rtc_unittests': 'webrtc/rtc_unittests.isolate', 46 'rtc_unittests': 'webrtc/rtc_unittests.isolate',
46 'system_wrappers_unittests': 47 'system_wrappers_unittests':
47 'webrtc/system_wrappers/system_wrappers_unittests.isolate', 48 'webrtc/system_wrappers/system_wrappers_unittests.isolate',
48 'test_support_unittests': 'webrtc/test/test_support_unittests.isolate', 49 'test_support_unittests': 'webrtc/test/test_support_unittests.isolate',
49 'tools_unittests': 'webrtc/tools/tools_unittests.isolate', 50 'tools_unittests': 'webrtc/tools/tools_unittests.isolate',
50 'video_capture_tests': 51 'video_capture_tests':
51 'webrtc/modules/video_capture/video_capture_tests.isolate', 52 'webrtc/modules/video_capture/video_capture_tests.isolate',
52 'video_engine_tests': 'webrtc/video_engine_tests.isolate', 53 'video_engine_tests': 'webrtc/video_engine_tests.isolate',
53 'voice_engine_unittests': 54 'voice_engine_unittests':
54 'webrtc/voice_engine/voice_engine_unittests.isolate', 55 'webrtc/voice_engine/voice_engine_unittests.isolate',
55 'webrtc_nonparallel_tests': 'webrtc/webrtc_nonparallel_tests.isolate', 56 'webrtc_nonparallel_tests': 'webrtc/webrtc_nonparallel_tests.isolate',
56 'webrtc_perf_tests': 'webrtc/webrtc_perf_tests.isolate', 57 'webrtc_perf_tests': 'webrtc/webrtc_perf_tests.isolate',
57 }) 58 })
59 instrumentation_test_instance._EXCLUDE_UNLESS_REQUESTED_ANNOTATIONS += [
60 'Suppress']
58 # Override environment variable to make it possible for the scripts to find 61 # Override environment variable to make it possible for the scripts to find
59 # the root directory (our symlinking of the Chromium build toolchain would 62 # the root directory (our symlinking of the Chromium build toolchain would
60 # otherwise make them fail to do so). 63 # otherwise make them fail to do so).
61 os.environ['CHECKOUT_SOURCE_ROOT'] = SRC_DIR 64 os.environ['CHECKOUT_SOURCE_ROOT'] = SRC_DIR
62 return test_runner.main() 65 return test_runner.main()
63 66
64 if __name__ == '__main__': 67 if __name__ == '__main__':
65 sys.exit(main()) 68 sys.exit(main())
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698