Movatterモバイル変換


[0]ホーム

URL:


Google Git
Sign in
chromium /chromium /src /refs/heads/main /. /testing /run_pytype.py
blob: db406d49fbb9bf03117e0a49d1631e0e738ab407 [file] [log] [blame]
Brian Sheedy739eb6a2022-06-10 06:01:34[diff] [blame]1#!/usr/bin/env vpython3
Avi Drissmandfd880852022-09-15 20:11:09[diff] [blame]2# Copyright 2022 The Chromium Authors
Brian Sheedy739eb6a2022-06-10 06:01:34[diff] [blame]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
7import os
8import sys
9
Brian Sheedyfe2702e2024-12-13 21:48:20[diff] [blame]10# //testing imports.
Brian Sheedy739eb6a2022-06-10 06:01:34[diff] [blame]11from pytype_commonimport pytype_runner
12
13TESTING_DIR= os.path.abspath(os.path.dirname(__file__))
14CHROMIUM_SRC_DIR= os.path.realpath(os.path.join(TESTING_DIR,'..'))
15
16EXTRA_PATHS_COMPONENTS=[
17('third_party','catapult','third_party','typ'),
18]
19EXTRA_PATHS=[
20 os.path.join(CHROMIUM_SRC_DIR,*p)for pin EXTRA_PATHS_COMPONENTS
21]
22EXTRA_PATHS.append(TESTING_DIR)
23
24FILES_AND_DIRECTORIES_TO_CHECK=[
25'unexpected_passes_common',
Preethi Mohan6d478e462022-10-13 18:51:59[diff] [blame]26'flake_suppressor_common',
Brian Sheedy739eb6a2022-06-10 06:01:34[diff] [blame]27]
28FILES_AND_DIRECTORIES_TO_CHECK=[
29 os.path.join(TESTING_DIR, f)for fin FILES_AND_DIRECTORIES_TO_CHECK
30]
31
32TEST_NAME='testing_pytype'
Brian Sheedy0d2300f32024-08-13 23:14:41[diff] [blame]33TEST_LOCATION='//testing/run_pytype.py'
Brian Sheedy739eb6a2022-06-10 06:01:34[diff] [blame]34
35
36def main()-> int:
Ben Pasteneb5c67262024-05-15 21:24:01[diff] [blame]37return pytype_runner.run_pytype(TEST_NAME, TEST_LOCATION,
38 FILES_AND_DIRECTORIES_TO_CHECK, EXTRA_PATHS,
39 TESTING_DIR)
Brian Sheedy739eb6a2022-06-10 06:01:34[diff] [blame]40
41
42if __name__=='__main__':
Ben Pasteneb5c67262024-05-15 21:24:01[diff] [blame]43 sys.exit(main())

[8]ページ先頭

©2009-2025 Movatter.jp