[M108 Migration][Callback] Bring up ewk callbacks which are related with page loading
[platform/framework/web/chromium-efl.git] / testing / run_pytype.py
1 #!/usr/bin/env vpython3
2 # Copyright 2022 The Chromium Authors
3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file.
5 """Simple helper script to run pytype on //testing code."""
6
7 import os
8 import sys
9
10 from pytype_common import pytype_runner
11
12 TESTING_DIR = os.path.abspath(os.path.dirname(__file__))
13 CHROMIUM_SRC_DIR = os.path.realpath(os.path.join(TESTING_DIR, '..'))
14
15 EXTRA_PATHS_COMPONENTS = [
16     ('third_party', 'catapult', 'third_party', 'typ'),
17 ]
18 EXTRA_PATHS = [
19     os.path.join(CHROMIUM_SRC_DIR, *p) for p in EXTRA_PATHS_COMPONENTS
20 ]
21 EXTRA_PATHS.append(TESTING_DIR)
22
23 FILES_AND_DIRECTORIES_TO_CHECK = [
24     'unexpected_passes_common',
25     'flake_suppressor_common',
26 ]
27 FILES_AND_DIRECTORIES_TO_CHECK = [
28     os.path.join(TESTING_DIR, f) for f in FILES_AND_DIRECTORIES_TO_CHECK
29 ]
30
31 TEST_NAME = 'testing_pytype'
32 TEST_LOCATION = "//testing/run_pytype.py"
33
34
35 def main() -> int:
36     return pytype_runner.run_pytype(TEST_NAME, TEST_LOCATION,
37                                     FILES_AND_DIRECTORIES_TO_CHECK,
38                                     EXTRA_PATHS, TESTING_DIR)
39
40
41 if __name__ == '__main__':
42     sys.exit(main())