1 #!/usr/bin/env python 2 # Copyright 2016 The Chromium Authors. All rights reserved. 3 # Use of this source code is governed by a BSD-style license that can be 4 # found in the LICENSE file. 5 6 import os 7 import sys 8 9 _CATAPULT_PATH = os.path.abspath(os.path.join( 10 os.path.dirname(__file__), '..', '..')) 11 _DEVIL_PATH = os.path.abspath(os.path.join( 12 os.path.dirname(__file__), '..')) 13 _TYP_PATH = os.path.abspath(os.path.join(_CATAPULT_PATH, 'third_party', 'typ')) 14 15 sys.path.append(_TYP_PATH) 16 import typ 17 18 sys.path.append(_DEVIL_PATH) 19 from devil.android import device_test_case 20 21 22 def main(): 23 runner = typ.Runner() 24 runner.setup_fn = device_test_case.PrepareDevices 25 return runner.main( 26 coverage_source=[_DEVIL_PATH], 27 jobs=1, 28 suffixes=['*_devicetest.py'], 29 top_level_dir=_DEVIL_PATH) 30 31 if __name__ == '__main__': 32 sys.exit(main()) 33