blob: f2bc801d2042c5b4ccf77a63b103b5669a51c894 [file] [log] [blame]
kjellander@webrtc.orgc3e097c2014-12-03 09:57:08 +00001#!/usr/bin/env python
2# Copyright (c) 2014 The WebRTC project authors. All Rights Reserved.
3#
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
6# tree. An additional intellectual property rights grant can be found
7# in the file PATENTS. All contributing project authors may
8# be found in the AUTHORS file in the root of the source tree.
9
10"""
11Runs tests on Android devices.
12
13This script exists to avoid WebRTC being broken by changes in the Chrome Android
kjellander@webrtc.org7ba9f272014-12-09 06:46:13 +000014test execution toolchain. It also conveniently sets the CHECKOUT_SOURCE_ROOT
15environment variable.
kjellander@webrtc.orgc3e097c2014-12-03 09:57:08 +000016"""
17
18import os
19import sys
20
kjellander@webrtc.org7ba9f272014-12-09 06:46:13 +000021SCRIPT_DIR = os.path.dirname(__file__)
22SRC_DIR = os.path.abspath(os.path.join(SCRIPT_DIR, os.pardir, os.pardir,
kjellander499dcb12016-09-09 01:38:52 -070023 os.pardir))
kjellander@webrtc.org7ba9f272014-12-09 06:46:13 +000024CHROMIUM_BUILD_ANDROID_DIR = os.path.join(SRC_DIR, 'build', 'android')
kjellander@webrtc.orgc3e097c2014-12-03 09:57:08 +000025sys.path.insert(0, CHROMIUM_BUILD_ANDROID_DIR)
26
27
Henrik Kjellander57e5fd22015-05-25 12:55:39 +020028import test_runner # pylint: disable=W0406
kjellander@webrtc.orgc3e097c2014-12-03 09:57:08 +000029
30def main():
kjellander@webrtc.org626c09f2014-12-11 11:59:46 +000031 # Override environment variable to make it possible for the scripts to find
32 # the root directory (our symlinking of the Chromium build toolchain would
33 # otherwise make them fail to do so).
kjellander@webrtc.org7ba9f272014-12-09 06:46:13 +000034 os.environ['CHECKOUT_SOURCE_ROOT'] = SRC_DIR
kjellander@webrtc.orgc3e097c2014-12-03 09:57:08 +000035 return test_runner.main()
36
37if __name__ == '__main__':
38 sys.exit(main())