This repository has been archived on 2023-03-16. You can view files and clone it, but cannot push or open issues or pull requests.
Android-Mobile-Toolkit/platform-tools/systrace/catapult/devil/bin/run_py_tests
2019-09-27 23:56:01 -04:00

29 lines
849 B
Python

#!/usr/bin/env python
# Copyright 2016 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import os
import sys
_CATAPULT_PATH = os.path.abspath(os.path.join(
os.path.dirname(__file__), '..', '..'))
_DEVIL_PATH = os.path.abspath(os.path.join(
os.path.dirname(__file__), '..'))
sys.path.append(_CATAPULT_PATH)
from catapult_build import run_with_typ
def main():
# Tests mock out internal details of methods, and the ANDROID_SERIAL can
# change which internal methods are called. Since tests don't actually use
# devices, it should be fine to delete the variable.
if 'ANDROID_SERIAL' in os.environ:
del os.environ['ANDROID_SERIAL']
return run_with_typ.Run(top_level_dir=_DEVIL_PATH)
if __name__ == '__main__':
sys.exit(main())