diff options
| author | AlexSm <[email protected]> | 2024-04-08 16:46:46 +0200 |
|---|---|---|
| committer | GitHub <[email protected]> | 2024-04-08 16:46:46 +0200 |
| commit | 5ebf1bc5956c43c050a7b08d9c266f35a10e2e71 (patch) | |
| tree | 39b3697735fab3b6872fa0c94875afc4c1938c29 /library/python/cpp_test | |
| parent | ba3d69df82d1e10f6bbac0f98da0217f2287692f (diff) | |
| parent | 2ccadbed5e49091384169de142a3829bd7c18f4f (diff) | |
Merge pull request #3543 from ydb-platform/mergelibs-240408-0819
Library import 240408-0819
Diffstat (limited to 'library/python/cpp_test')
| -rw-r--r-- | library/python/cpp_test/test_cpp.py | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/library/python/cpp_test/test_cpp.py b/library/python/cpp_test/test_cpp.py index efa10ea2833..b4c78f82716 100644 --- a/library/python/cpp_test/test_cpp.py +++ b/library/python/cpp_test/test_cpp.py @@ -10,20 +10,16 @@ from library.python.testing.style import rules import library.python.resource as lpr -STYLE_CONFIG_JSON_14 = json.dumps(yaml.safe_load(lpr.find('resfs/file/config.clang-format'))) -STYLE_CONFIG_JSON_16 = json.dumps(yaml.safe_load(lpr.find('resfs/file/config.clang-format-16'))) +# keep in sync with the logic in https://a.yandex-team.ru/arcadia/devtools/ya/handlers/style/cpp_style.py?rev=r12543375#L21 +STYLE_CONFIG_JSON = json.dumps(yaml.safe_load(lpr.find('resfs/file/config.clang-format'))) RES_FILE_PREFIX = '/cpp_style/files/' CHECKED_PATHS = list(lpr.iterkeys(RES_FILE_PREFIX, strip_prefix=True)) def check_style(filename, actual_source): - try: - clang_format_binary = yatest.common.binary_path('contrib/libs/clang14/tools/clang-format/clang-format') - config = STYLE_CONFIG_JSON_14 - except Exception: - clang_format_binary = yatest.common.binary_path('contrib/libs/clang16/tools/clang-format/clang-format') - config = STYLE_CONFIG_JSON_16 + clang_format_binary = yatest.common.binary_path('contrib/libs/clang16/tools/clang-format/clang-format') + config = STYLE_CONFIG_JSON command = [clang_format_binary, '-assume-filename=' + filename, '-style=' + config] styled_source = subprocess.check_output(command, input=actual_source) |
