diff options
author | snowball <snowball@yandex-team.ru> | 2022-02-10 16:46:32 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:46:32 +0300 |
commit | 83a8efcf3af051e3dd59c00d1d5dafc96412ec1e (patch) | |
tree | 1a2c5ffcf89eb53ecd79dbc9bc0a195c27404d0c | |
parent | 4d57126b1bae3cfd0f4f95c32d1a85ca684ee92c (diff) | |
download | ydb-83a8efcf3af051e3dd59c00d1d5dafc96412ec1e.tar.gz |
Restoring authorship annotation for <snowball@yandex-team.ru>. Commit 2 of 2.
133 files changed, 1295 insertions, 1295 deletions
diff --git a/build/external_resources/codenavigation/ya.make b/build/external_resources/codenavigation/ya.make index 1bd218c9ad..8cfdf0d3d5 100644 --- a/build/external_resources/codenavigation/ya.make +++ b/build/external_resources/codenavigation/ya.make @@ -1,4 +1,4 @@ -OWNER(g:yatool) +OWNER(g:yatool) RESOURCES_LIBRARY() diff --git a/build/plugins/_common.py b/build/plugins/_common.py index 11e87a7d34..2f831a94db 100644 --- a/build/plugins/_common.py +++ b/build/plugins/_common.py @@ -185,9 +185,9 @@ def filter_out_by_keyword(test_data, keyword): return list(_iterate()) -def generate_chunks(lst, chunk_size): - for i in xrange(0, len(lst), chunk_size): - yield lst[i:(i + chunk_size)] +def generate_chunks(lst, chunk_size): + for i in xrange(0, len(lst), chunk_size): + yield lst[i:(i + chunk_size)] def strip_roots(path): diff --git a/build/plugins/_requirements.py b/build/plugins/_requirements.py index a10b75110f..c27635e852 100644 --- a/build/plugins/_requirements.py +++ b/build/plugins/_requirements.py @@ -1,49 +1,49 @@ -import _test_const as consts - - -def check_cpu(suite_cpu_requirements, test_size, is_kvm=False): - min_cpu_requirements = consts.TestRequirementsConstants.MinCpu - max_cpu_requirements = consts.TestSize.get_max_requirements(test_size).get(consts.TestRequirements.Cpu) - if isinstance(suite_cpu_requirements, str): - if all(consts.TestRequirementsConstants.is_all_cpu(req) for req in (max_cpu_requirements, suite_cpu_requirements)): +import _test_const as consts + + +def check_cpu(suite_cpu_requirements, test_size, is_kvm=False): + min_cpu_requirements = consts.TestRequirementsConstants.MinCpu + max_cpu_requirements = consts.TestSize.get_max_requirements(test_size).get(consts.TestRequirements.Cpu) + if isinstance(suite_cpu_requirements, str): + if all(consts.TestRequirementsConstants.is_all_cpu(req) for req in (max_cpu_requirements, suite_cpu_requirements)): return None return "Wrong 'cpu' requirements: {}, should be in [{}..{}] for {}-size tests".format(suite_cpu_requirements, min_cpu_requirements, max_cpu_requirements, test_size) - - if not isinstance(suite_cpu_requirements, int): + + if not isinstance(suite_cpu_requirements, int): return "Wrong 'cpu' requirements: {}, should be integer".format(suite_cpu_requirements) - - if suite_cpu_requirements < min_cpu_requirements or suite_cpu_requirements > consts.TestRequirementsConstants.get_cpu_value(max_cpu_requirements): + + if suite_cpu_requirements < min_cpu_requirements or suite_cpu_requirements > consts.TestRequirementsConstants.get_cpu_value(max_cpu_requirements): return "Wrong 'cpu' requirement: {}, should be in [{}..{}] for {}-size tests".format(suite_cpu_requirements, min_cpu_requirements, max_cpu_requirements, test_size) - + return None - - -# TODO: Remove is_kvm param when there will be guarantees on RAM -def check_ram(suite_ram_requirements, test_size, is_kvm=False): - if not isinstance(suite_ram_requirements, int): + + +# TODO: Remove is_kvm param when there will be guarantees on RAM +def check_ram(suite_ram_requirements, test_size, is_kvm=False): + if not isinstance(suite_ram_requirements, int): return "Wrong 'ram' requirements: {}, should be integer".format(suite_ram_requirements) - min_ram_requirements = consts.TestRequirementsConstants.MinRam - max_ram_requirements = consts.MAX_RAM_REQUIREMENTS_FOR_KVM if is_kvm else consts.TestSize.get_max_requirements(test_size).get(consts.TestRequirements.Ram) - if suite_ram_requirements < min_ram_requirements or suite_ram_requirements > max_ram_requirements: - err_msg = "Wrong 'ram' requirements: {}, should be in [{}..{}] for {}-size tests".format(suite_ram_requirements, min_ram_requirements, max_ram_requirements, test_size) - if is_kvm: - err_msg += ' with kvm requirements' - return err_msg + min_ram_requirements = consts.TestRequirementsConstants.MinRam + max_ram_requirements = consts.MAX_RAM_REQUIREMENTS_FOR_KVM if is_kvm else consts.TestSize.get_max_requirements(test_size).get(consts.TestRequirements.Ram) + if suite_ram_requirements < min_ram_requirements or suite_ram_requirements > max_ram_requirements: + err_msg = "Wrong 'ram' requirements: {}, should be in [{}..{}] for {}-size tests".format(suite_ram_requirements, min_ram_requirements, max_ram_requirements, test_size) + if is_kvm: + err_msg += ' with kvm requirements' + return err_msg return None - - -def check_ram_disk(suite_ram_disk, test_size, is_kvm=False): - min_ram_disk = consts.TestRequirementsConstants.MinRamDisk - max_ram_disk = consts.TestSize.get_max_requirements(test_size).get(consts.TestRequirements.RamDisk) - if isinstance(suite_ram_disk, str): - if all(consts.TestRequirementsConstants.is_all_ram_disk(req) for req in (max_ram_disk, suite_ram_disk)): + + +def check_ram_disk(suite_ram_disk, test_size, is_kvm=False): + min_ram_disk = consts.TestRequirementsConstants.MinRamDisk + max_ram_disk = consts.TestSize.get_max_requirements(test_size).get(consts.TestRequirements.RamDisk) + if isinstance(suite_ram_disk, str): + if all(consts.TestRequirementsConstants.is_all_ram_disk(req) for req in (max_ram_disk, suite_ram_disk)): return None return "Wrong 'ram_disk' requirements: {}, should be in [{}..{}] for {}-size tests".format(suite_ram_disk, 0, max_ram_disk, test_size) - - if not isinstance(suite_ram_disk, int): + + if not isinstance(suite_ram_disk, int): return "Wrong 'ram_disk' requirements: {}, should be integer".format(suite_ram_disk) - - if suite_ram_disk < min_ram_disk or suite_ram_disk > consts.TestRequirementsConstants.get_ram_disk_value(max_ram_disk): + + if suite_ram_disk < min_ram_disk or suite_ram_disk > consts.TestRequirementsConstants.get_ram_disk_value(max_ram_disk): return "Wrong 'ram_disk' requirement: {}, should be in [{}..{}] for {}-size tests".format(suite_ram_disk, min_ram_disk, max_ram_disk, test_size) - + return None diff --git a/build/plugins/_test_const.py b/build/plugins/_test_const.py index 62683d40f8..0d03cc3d17 100644 --- a/build/plugins/_test_const.py +++ b/build/plugins/_test_const.py @@ -1,5 +1,5 @@ # coding: utf-8 -import re +import re import sys @@ -24,25 +24,25 @@ REPORT_SNIPPET_LIMIT = 10000 SANITIZER_ERROR_RC = 100 TEST_SUBTEST_SEPARATOR = '::' TESTING_OUT_DIR_NAME = "testing_out_stuff" -TESTING_OUT_TAR_NAME = TESTING_OUT_DIR_NAME + ".tar" +TESTING_OUT_TAR_NAME = TESTING_OUT_DIR_NAME + ".tar" TIMESTAMP_FORMAT = "%Y-%m-%d %H:%M:%S.%f" TRACE_FILE_NAME = "ytest.report.trace" TRUNCATING_IGNORE_FILE_LIST = {TRACE_FILE_NAME, "run_test.log"} -# kvm -DEFAULT_RAM_REQUIREMENTS_FOR_KVM = 4 -MAX_RAM_REQUIREMENTS_FOR_KVM = 16 - -# distbuild -TEST_NODE_FINISHING_TIME = 5 * 60 -DEFAULT_TEST_NODE_TIMEOUT = 15 * 60 - +# kvm +DEFAULT_RAM_REQUIREMENTS_FOR_KVM = 4 +MAX_RAM_REQUIREMENTS_FOR_KVM = 16 + +# distbuild +TEST_NODE_FINISHING_TIME = 5 * 60 +DEFAULT_TEST_NODE_TIMEOUT = 15 * 60 + # coverage -COVERAGE_TESTS_TIMEOUT_FACTOR = 1.5 -COVERAGE_RESOLVED_FILE_NAME_PATTERN = "coverage_resolved.{}.json" -CPP_COVERAGE_RESOLVED_FILE_NAME = COVERAGE_RESOLVED_FILE_NAME_PATTERN.format("cpp") -JAVA_COVERAGE_RESOLVED_FILE_NAME = COVERAGE_RESOLVED_FILE_NAME_PATTERN.format("java") -PYTHON_COVERAGE_RESOLVED_FILE_NAME = COVERAGE_RESOLVED_FILE_NAME_PATTERN.format("python") +COVERAGE_TESTS_TIMEOUT_FACTOR = 1.5 +COVERAGE_RESOLVED_FILE_NAME_PATTERN = "coverage_resolved.{}.json" +CPP_COVERAGE_RESOLVED_FILE_NAME = COVERAGE_RESOLVED_FILE_NAME_PATTERN.format("cpp") +JAVA_COVERAGE_RESOLVED_FILE_NAME = COVERAGE_RESOLVED_FILE_NAME_PATTERN.format("java") +PYTHON_COVERAGE_RESOLVED_FILE_NAME = COVERAGE_RESOLVED_FILE_NAME_PATTERN.format("python") CLANG_COVERAGE_TEST_TYPES = ("unittest", "coverage_extractor", "pytest", "py3test", "gtest", "boost_test", "exectest") COVERAGE_TABLE_CHUNKS = 20 COVERAGE_YT_PROXY = "hahn.yt.yandex.net" @@ -55,26 +55,26 @@ CORPUS_DATA_ROOT_DIR = 'fuzzing' CORPUS_DIR_NAME = 'corpus' FUZZING_COMPRESSION_COEF = 1.1 FUZZING_DEFAULT_TIMEOUT = 3600 -FUZZING_FINISHING_TIME = 600 +FUZZING_FINISHING_TIME = 600 FUZZING_TIMEOUT_RE = re.compile(r'(^|\s)-max_total_time=(?P<max_time>\d+)') GENERATED_CORPUS_DIR_NAME = 'mined_corpus' MAX_CORPUS_RESOURCES_ALLOWED = 5 -TEST_TOOL_HOST = 'TEST_TOOL_HOST_RESOURCE_GLOBAL' -TEST_TOOL_TARGET = 'TEST_TOOL_TARGET_RESOURCE_GLOBAL' -TEST_TOOL_HOST_LOCAL = 'TEST_TOOL_HOST_LOCAL' -TEST_TOOL_TARGET_LOCAL = 'TEST_TOOL_TARGET_LOCAL' -XCODE_TOOLS_RESOURCE = 'XCODE_TOOLS_ROOT_RESOURCE_GLOBAL' -GO_TOOLS_RESOURCE = 'GO_TOOLS_RESOURCE_GLOBAL' -LLVM_COV9_RESOURCE = 'LLVM_COV9_RESOURCE_GLOBAL' -PEP8_PY2_RESOURCE = 'PEP8_PY2_RESOURCE_GLOBAL' -PEP8_PY3_RESOURCE = 'PEP8_PY3_RESOURCE_GLOBAL' -FLAKES_PY2_RESOURCE = 'FLAKES_PY2_RESOURCE_GLOBAL' -FLAKES_PY3_RESOURCE = 'FLAKES_PY3_RESOURCE_GLOBAL' +TEST_TOOL_HOST = 'TEST_TOOL_HOST_RESOURCE_GLOBAL' +TEST_TOOL_TARGET = 'TEST_TOOL_TARGET_RESOURCE_GLOBAL' +TEST_TOOL_HOST_LOCAL = 'TEST_TOOL_HOST_LOCAL' +TEST_TOOL_TARGET_LOCAL = 'TEST_TOOL_TARGET_LOCAL' +XCODE_TOOLS_RESOURCE = 'XCODE_TOOLS_ROOT_RESOURCE_GLOBAL' +GO_TOOLS_RESOURCE = 'GO_TOOLS_RESOURCE_GLOBAL' +LLVM_COV9_RESOURCE = 'LLVM_COV9_RESOURCE_GLOBAL' +PEP8_PY2_RESOURCE = 'PEP8_PY2_RESOURCE_GLOBAL' +PEP8_PY3_RESOURCE = 'PEP8_PY3_RESOURCE_GLOBAL' +FLAKES_PY2_RESOURCE = 'FLAKES_PY2_RESOURCE_GLOBAL' +FLAKES_PY3_RESOURCE = 'FLAKES_PY3_RESOURCE_GLOBAL' FLAKE8_PY2_RESOURCE = 'FLAKE8_PY2_RESOURCE_GLOBAL' FLAKE8_PY3_RESOURCE = 'FLAKE8_PY3_RESOURCE_GLOBAL' - + class Enum(object): @classmethod @@ -82,134 +82,134 @@ class Enum(object): return [v for k, v in cls.__dict__.items() if not k.startswith("_")] -class TestRequirements(Enum): - Container = 'container' - Cpu = 'cpu' - DiskUsage = 'disk_usage' - Ram = 'ram' - RamDisk = 'ram_disk' - SbVault = 'sb_vault' - Network = 'network' - Dns = 'dns' - Kvm = 'kvm' - - -class TestRequirementsConstants(Enum): - All = 'all' - AllCpuValue = 50 - AllRamDiskValue = 50 - MinCpu = 1 - MinRam = 1 - MinRamDisk = 0 - - @classmethod - def is_all_cpu(cls, value): - return value == cls.All - - @classmethod - def get_cpu_value(cls, value): - return cls.AllCpuValue if cls.is_all_cpu(value) else value - - @classmethod - def is_all_ram_disk(cls, value): - return value == cls.All - - @classmethod - def get_ram_disk_value(cls, value): - return cls.AllRamDiskValue if cls.is_all_ram_disk(value) else value - - +class TestRequirements(Enum): + Container = 'container' + Cpu = 'cpu' + DiskUsage = 'disk_usage' + Ram = 'ram' + RamDisk = 'ram_disk' + SbVault = 'sb_vault' + Network = 'network' + Dns = 'dns' + Kvm = 'kvm' + + +class TestRequirementsConstants(Enum): + All = 'all' + AllCpuValue = 50 + AllRamDiskValue = 50 + MinCpu = 1 + MinRam = 1 + MinRamDisk = 0 + + @classmethod + def is_all_cpu(cls, value): + return value == cls.All + + @classmethod + def get_cpu_value(cls, value): + return cls.AllCpuValue if cls.is_all_cpu(value) else value + + @classmethod + def is_all_ram_disk(cls, value): + return value == cls.All + + @classmethod + def get_ram_disk_value(cls, value): + return cls.AllRamDiskValue if cls.is_all_ram_disk(value) else value + + class TestSize(Enum): Small = 'small' Medium = 'medium' Large = 'large' - DefaultTimeouts = { + DefaultTimeouts = { Small: 60, Medium: 600, Large: 3600, } - DefaultPriorities = { - Small: -1, - Medium: -2, - Large: -3, - } - - DefaultRequirements = { - Small: { - TestRequirements.Cpu: 1, - TestRequirements.Ram: 32, - # TestRequirements.Ram: 2, - TestRequirements.RamDisk: 0, - }, - Medium: { - TestRequirements.Cpu: 1, - TestRequirements.Ram: 32, - # TestRequirements.Ram: 4, - TestRequirements.RamDisk: 0, - }, - Large: { - TestRequirements.Cpu: 1, - TestRequirements.Ram: 32, - # TestRequirements.Ram: 8, - TestRequirements.RamDisk: 0, - }, - } - - MaxRequirements = { - Small: { - TestRequirements.Cpu: 4, - TestRequirements.Ram: 32, - # TestRequirements.Ram: 4, - TestRequirements.RamDisk: 4, - }, - Medium: { - TestRequirements.Cpu: 4, - # TestRequirements.Cpu: 8, - TestRequirements.Ram: 32, - # TestRequirements.Ram: 16, - TestRequirements.RamDisk: 4, - }, - Large: { + DefaultPriorities = { + Small: -1, + Medium: -2, + Large: -3, + } + + DefaultRequirements = { + Small: { + TestRequirements.Cpu: 1, + TestRequirements.Ram: 32, + # TestRequirements.Ram: 2, + TestRequirements.RamDisk: 0, + }, + Medium: { + TestRequirements.Cpu: 1, + TestRequirements.Ram: 32, + # TestRequirements.Ram: 4, + TestRequirements.RamDisk: 0, + }, + Large: { + TestRequirements.Cpu: 1, + TestRequirements.Ram: 32, + # TestRequirements.Ram: 8, + TestRequirements.RamDisk: 0, + }, + } + + MaxRequirements = { + Small: { + TestRequirements.Cpu: 4, + TestRequirements.Ram: 32, + # TestRequirements.Ram: 4, + TestRequirements.RamDisk: 4, + }, + Medium: { + TestRequirements.Cpu: 4, + # TestRequirements.Cpu: 8, + TestRequirements.Ram: 32, + # TestRequirements.Ram: 16, + TestRequirements.RamDisk: 4, + }, + Large: { TestRequirements.Cpu: 4, - TestRequirements.Ram: 32, - TestRequirements.RamDisk: 4, - }, - } - + TestRequirements.Ram: 32, + TestRequirements.RamDisk: 4, + }, + } + @classmethod def sizes(cls): - return cls.DefaultTimeouts.keys() + return cls.DefaultTimeouts.keys() @classmethod def get_default_timeout(cls, size): - if size in cls.DefaultTimeouts: - return cls.DefaultTimeouts[size] + if size in cls.DefaultTimeouts: + return cls.DefaultTimeouts[size] + raise Exception("Unknown test size '{}'".format(size)) + + @classmethod + def get_default_priorities(cls, size): + if size in cls.DefaultPriorities: + return cls.DefaultPriorities[size] + raise Exception("Unknown test size '{}'".format(size)) + + @classmethod + def get_default_requirements(cls, size): + if size in cls.DefaultRequirements: + return cls.DefaultRequirements[size] raise Exception("Unknown test size '{}'".format(size)) - @classmethod - def get_default_priorities(cls, size): - if size in cls.DefaultPriorities: - return cls.DefaultPriorities[size] - raise Exception("Unknown test size '{}'".format(size)) - - @classmethod - def get_default_requirements(cls, size): - if size in cls.DefaultRequirements: - return cls.DefaultRequirements[size] - raise Exception("Unknown test size '{}'".format(size)) - - @classmethod - def get_max_requirements(cls, size): - if size in cls.MaxRequirements: - return cls.MaxRequirements[size] - raise Exception("Unknown test size '{}'".format(size)) - - + @classmethod + def get_max_requirements(cls, size): + if size in cls.MaxRequirements: + return cls.MaxRequirements[size] + raise Exception("Unknown test size '{}'".format(size)) + + class TestRunExitCode(Enum): Skipped = 2 - Failed = 3 + Failed = 3 TimeOut = 10 InfrastructureError = 12 @@ -223,8 +223,8 @@ class YaTestTags(Enum): Fat = "ya:fat" RunWithAsserts = "ya:relwithdebinfo" Privileged = "ya:privileged" - ExoticPlatform = "ya:exotic_platform" - NotAutocheck = "ya:not_autocheck" + ExoticPlatform = "ya:exotic_platform" + NotAutocheck = "ya:not_autocheck" class Status(object): @@ -256,7 +256,7 @@ class _Colors(object): "white", "yellow", ] - _PREFIXES = ["", "light", "dark"] + _PREFIXES = ["", "light", "dark"] def __init__(self): self._table = {} diff --git a/build/plugins/_xsyn_includes.py b/build/plugins/_xsyn_includes.py index ce23222a93..8d33cea2f0 100644 --- a/build/plugins/_xsyn_includes.py +++ b/build/plugins/_xsyn_includes.py @@ -48,7 +48,7 @@ def process_xsyn(filepath, on_element): # keep a stack of filepathes if on_element calls process_xsyn recursively with open(filepath) as xsyn_file: - from xml.dom.minidom import parse + from xml.dom.minidom import parse tree = parse(xsyn_file) tree.normalize() res = traverse_xsyn(tree, on_element) diff --git a/build/plugins/build_mn_files.py b/build/plugins/build_mn_files.py index 207339ae24..4da76f1852 100644 --- a/build/plugins/build_mn_files.py +++ b/build/plugins/build_mn_files.py @@ -1,6 +1,6 @@ from os.path import basename, splitext - + def on_build_mns_files(unit, *args): files = [] name = '' diff --git a/build/plugins/cp.py b/build/plugins/cp.py index 7341204cff..5c663a3bdd 100644 --- a/build/plugins/cp.py +++ b/build/plugins/cp.py @@ -4,12 +4,12 @@ from _common import sort_by_keywords def oncopy(unit, *args): - keywords = {'RESULT': 1, 'KEEP_DIR_STRUCT': 0, 'DESTINATION': 1, 'FROM': 1} + keywords = {'RESULT': 1, 'KEEP_DIR_STRUCT': 0, 'DESTINATION': 1, 'FROM': 1} flat_args, spec_args = sort_by_keywords(keywords, args) dest_dir = spec_args['DESTINATION'][0] if 'DESTINATION' in spec_args else '' - from_dir = spec_args['FROM'][0] if 'FROM' in spec_args else '' + from_dir = spec_args['FROM'][0] if 'FROM' in spec_args else '' keep_struct = 'KEEP_DIR_STRUCT' in spec_args save_in_var = 'RESULT' in spec_args targets = [] @@ -21,10 +21,10 @@ def oncopy(unit, *args): if keep_struct: if path_list[:-1]: rel_path = os.path.join(*path_list[:-1]) - source_path = os.path.join(from_dir, rel_path, filename) - target_path = os.path.join(dest_dir, rel_path, filename) + source_path = os.path.join(from_dir, rel_path, filename) + target_path = os.path.join(dest_dir, rel_path, filename) if save_in_var: - targets.append(target_path) - unit.oncopy_file([source_path, target_path]) + targets.append(target_path) + unit.oncopy_file([source_path, target_path]) if save_in_var: unit.set([spec_args["RESULT"][0], " ".join(targets)]) diff --git a/build/plugins/create_init_py.py b/build/plugins/create_init_py.py index 90d61c4c25..e41a4d22df 100644 --- a/build/plugins/create_init_py.py +++ b/build/plugins/create_init_py.py @@ -3,13 +3,13 @@ import os from _common import sort_by_keywords -def oncreate_init_py_structure(unit, *args): +def oncreate_init_py_structure(unit, *args): if unit.get('DISTBUILD'): return - target_dir = unit.get('PY_PROTOS_FOR_DIR') - path_list = target_dir.split(os.path.sep)[1:] - inits = [os.path.join("${ARCADIA_BUILD_ROOT}", '__init__.py')] - for i in range(1, len(path_list) + 1): - inits.append(os.path.join("${ARCADIA_BUILD_ROOT}", os.path.join(*path_list[0:i]), '__init__.py')) - unit.ontouch(inits) + target_dir = unit.get('PY_PROTOS_FOR_DIR') + path_list = target_dir.split(os.path.sep)[1:] + inits = [os.path.join("${ARCADIA_BUILD_ROOT}", '__init__.py')] + for i in range(1, len(path_list) + 1): + inits.append(os.path.join("${ARCADIA_BUILD_ROOT}", os.path.join(*path_list[0:i]), '__init__.py')) + unit.ontouch(inits) diff --git a/build/plugins/lib/_metric_resolvers.py b/build/plugins/lib/_metric_resolvers.py index 7c5ea4a9ea..270eb78345 100644 --- a/build/plugins/lib/_metric_resolvers.py +++ b/build/plugins/lib/_metric_resolvers.py @@ -1,11 +1,11 @@ -import re - -VALUE_PATTERN = re.compile(r"^\s*(?P<value>\d+)\s*$") - - -def resolve_value(val): - match = VALUE_PATTERN.match(val) - if not match: - return None - val = match.group('value') - return int(val) +import re + +VALUE_PATTERN = re.compile(r"^\s*(?P<value>\d+)\s*$") + + +def resolve_value(val): + match = VALUE_PATTERN.match(val) + if not match: + return None + val = match.group('value') + return int(val) diff --git a/build/plugins/print_module_type.py b/build/plugins/print_module_type.py index 723970609d..cc54c55675 100644 --- a/build/plugins/print_module_type.py +++ b/build/plugins/print_module_type.py @@ -1,5 +1,5 @@ def onprint_module_type(unit, *args): filepath = unit.get('KIWI_OUT_FILE') - if len(args) >= 2 and filepath is not None: + if len(args) >= 2 and filepath is not None: with open(filepath, "a") as file_handler: print >>file_handler, "{0} {1} {2}".format(args[0], args[1], unit.path()) diff --git a/build/plugins/pybuild.py b/build/plugins/pybuild.py index 5639da6fb0..f32a2d39a0 100644 --- a/build/plugins/pybuild.py +++ b/build/plugins/pybuild.py @@ -48,10 +48,10 @@ def proto_arg(path, mod, unit): def pb_cc_arg(suf, path, unit): return '{}{suf}'.format(stripext(to_build_root(path, unit)), suf=suf) - -def ev_cc_arg(path, unit): - return '{}.ev.pb.cc'.format(stripext(to_build_root(path, unit))) - + +def ev_cc_arg(path, unit): + return '{}.ev.pb.cc'.format(stripext(to_build_root(path, unit))) + def ev_arg(path, mod, unit): return '{}__int___ev_pb2.py={}_ev_pb2'.format(stripext(to_build_root(path, unit)), mod) @@ -301,9 +301,9 @@ def onpy_srcs(unit, *args): else: if arg.startswith('../'): ymake.report_configure_error('PY_SRCS item starts with "../": {!r}'.format(arg)) - if arg.startswith('/'): - ymake.report_configure_error('PY_SRCS item starts with "/": {!r}'.format(arg)) - continue + if arg.startswith('/'): + ymake.report_configure_error('PY_SRCS item starts with "/": {!r}'.format(arg)) + continue mod_name = stripext(arg).replace('/', '.') if py3 and path.endswith('.py') and is_extended_source_search_enabled(path, unit): # Dig out real path from the file path. Unit.path is not enough because of SRCDIR and ADDINCL @@ -499,7 +499,7 @@ def onpy_srcs(unit, *args): unit.onpeerdir(unit.get("PY_PROTO_DEPS").split()) - proto_paths = [path for path, mod in protos] + proto_paths = [path for path, mod in protos] unit.on_generate_py_protos_internal(proto_paths) unit.onpy_srcs([ pb2_arg(py_suf, path, mod, unit) diff --git a/build/plugins/split_codegen.py b/build/plugins/split_codegen.py index 03c534c834..f1e60bc142 100644 --- a/build/plugins/split_codegen.py +++ b/build/plugins/split_codegen.py @@ -4,7 +4,7 @@ from _common import sort_by_keywords _DEFAULT_CPP_PARTS = 20 # See TCodegenParams::MethodStream usage in factor codegen _ADDITIONAL_STREAM_COUNT = 5 - + def onsplit_codegen(unit, *args): ''' diff --git a/build/plugins/swig.py b/build/plugins/swig.py index 6dd30a1ff2..32a37204a6 100644 --- a/build/plugins/swig.py +++ b/build/plugins/swig.py @@ -49,7 +49,7 @@ class Swig(iw.CustomCommand): self._library_dir ] self._incl_dirs = ['$S', '$B'] + [posixpath.join('$S', d) for d in incl_dirs] - + modname = unit.get('REALPRJNAME') self._flags.extend(['-module', modname]) diff --git a/build/plugins/tests/test_common.py b/build/plugins/tests/test_common.py index 6490b6d7c4..e1780354f8 100644 --- a/build/plugins/tests/test_common.py +++ b/build/plugins/tests/test_common.py @@ -1,49 +1,49 @@ -import pytest - -import build.plugins._common as pc - - -def test_sort_by_keywords(): - keywords = {'KEY1': 2, 'KEY2': 0, 'KEY3': 1} - args = 'aaaa bbbb KEY2 KEY1 kkk10 kkk11 ccc ddd KEY3 kkk3 eee'.split() - flat, spec = pc.sort_by_keywords(keywords, args) - assert flat == ['aaaa', 'bbbb', 'ccc', 'ddd', 'eee'] - assert spec == {'KEY1': ['kkk10', 'kkk11'], 'KEY2': True, 'KEY3': ['kkk3']} - - keywords = {'KEY1': 0, 'KEY2': 4} - args = 'aaaa KEY2 eee'.split() - flat, spec = pc.sort_by_keywords(keywords, args) - assert flat == ['aaaa'] - assert spec == {'KEY2': ['eee']} - - keywords = {'KEY1': 2, 'KEY2': 2} - args = 'KEY1 k10 KEY2 k20 KEY1 k11 KEY2 k21 KEY1 k13'.split() - flat, spec = pc.sort_by_keywords(keywords, args) - assert flat == [] - assert spec == {'KEY1': ['k10', 'k11', 'k13'], 'KEY2': ['k20', 'k21']} - - -def test_filter_out_by_keyword(): - assert pc.filter_out_by_keyword([], 'A') == [] - assert pc.filter_out_by_keyword(['x'], 'A') == ['x'] - assert pc.filter_out_by_keyword(['x', 'A'], 'A') == ['x'] - assert pc.filter_out_by_keyword(['x', 'A', 'B'], 'A') == ['x'] - assert pc.filter_out_by_keyword(['x', 'A', 'B', 'y'], 'A') == ['x', 'y'] - assert pc.filter_out_by_keyword(['x', 'A', 'A', 'y'], 'A') == ['x', 'y'] - assert pc.filter_out_by_keyword(['x', 'A', 'A', 'A'], 'A') == ['x'] - assert pc.filter_out_by_keyword(['x', 'A', 'A', 'A', 'B', 'y'], 'A') == ['x', 'y'] - assert pc.filter_out_by_keyword(['x', 'A', 'A', 'A', 'B', 'y', 'A'], 'A') == ['x', 'y'] - assert pc.filter_out_by_keyword(['x', 'A', 'A', 'A', 'B', 'y', 'A', 'F', 'z'], 'A') == ['x', 'y', 'z'] - - -test_data = [ - [[1, 2, 3], 1, [[1], [2], [3]]], - [[1, 2, 3], 2, [[1, 2], [3]]], - [[1, 2, 3, 4], 2, [[1, 2], [3, 4]]], - [[1], 5, [[1]]], -] - - -@pytest.mark.parametrize('lst, chunk_size, expected', test_data, ids=[str(num + 1) for num in range(len(test_data))]) -def test_generate_chunks(lst, chunk_size, expected): - assert list(pc.generate_chunks(lst, chunk_size)) == expected +import pytest + +import build.plugins._common as pc + + +def test_sort_by_keywords(): + keywords = {'KEY1': 2, 'KEY2': 0, 'KEY3': 1} + args = 'aaaa bbbb KEY2 KEY1 kkk10 kkk11 ccc ddd KEY3 kkk3 eee'.split() + flat, spec = pc.sort_by_keywords(keywords, args) + assert flat == ['aaaa', 'bbbb', 'ccc', 'ddd', 'eee'] + assert spec == {'KEY1': ['kkk10', 'kkk11'], 'KEY2': True, 'KEY3': ['kkk3']} + + keywords = {'KEY1': 0, 'KEY2': 4} + args = 'aaaa KEY2 eee'.split() + flat, spec = pc.sort_by_keywords(keywords, args) + assert flat == ['aaaa'] + assert spec == {'KEY2': ['eee']} + + keywords = {'KEY1': 2, 'KEY2': 2} + args = 'KEY1 k10 KEY2 k20 KEY1 k11 KEY2 k21 KEY1 k13'.split() + flat, spec = pc.sort_by_keywords(keywords, args) + assert flat == [] + assert spec == {'KEY1': ['k10', 'k11', 'k13'], 'KEY2': ['k20', 'k21']} + + +def test_filter_out_by_keyword(): + assert pc.filter_out_by_keyword([], 'A') == [] + assert pc.filter_out_by_keyword(['x'], 'A') == ['x'] + assert pc.filter_out_by_keyword(['x', 'A'], 'A') == ['x'] + assert pc.filter_out_by_keyword(['x', 'A', 'B'], 'A') == ['x'] + assert pc.filter_out_by_keyword(['x', 'A', 'B', 'y'], 'A') == ['x', 'y'] + assert pc.filter_out_by_keyword(['x', 'A', 'A', 'y'], 'A') == ['x', 'y'] + assert pc.filter_out_by_keyword(['x', 'A', 'A', 'A'], 'A') == ['x'] + assert pc.filter_out_by_keyword(['x', 'A', 'A', 'A', 'B', 'y'], 'A') == ['x', 'y'] + assert pc.filter_out_by_keyword(['x', 'A', 'A', 'A', 'B', 'y', 'A'], 'A') == ['x', 'y'] + assert pc.filter_out_by_keyword(['x', 'A', 'A', 'A', 'B', 'y', 'A', 'F', 'z'], 'A') == ['x', 'y', 'z'] + + +test_data = [ + [[1, 2, 3], 1, [[1], [2], [3]]], + [[1, 2, 3], 2, [[1, 2], [3]]], + [[1, 2, 3, 4], 2, [[1, 2], [3, 4]]], + [[1], 5, [[1]]], +] + + +@pytest.mark.parametrize('lst, chunk_size, expected', test_data, ids=[str(num + 1) for num in range(len(test_data))]) +def test_generate_chunks(lst, chunk_size, expected): + assert list(pc.generate_chunks(lst, chunk_size)) == expected diff --git a/build/plugins/tests/test_requirements.py b/build/plugins/tests/test_requirements.py index 4cc913ec15..24d57ac901 100644 --- a/build/plugins/tests/test_requirements.py +++ b/build/plugins/tests/test_requirements.py @@ -1,52 +1,52 @@ -import pytest - -import build.plugins._requirements as requirements -import build.plugins._test_const as consts - - -class TestRequirements(object): - @pytest.mark.parametrize('test_size', consts.TestSize.sizes()) - def test_cpu(self, test_size): - max_cpu = consts.TestSize.get_max_requirements(test_size).get(consts.TestRequirements.Cpu) - min_cpu = consts.TestRequirementsConstants.MinCpu - assert requirements.check_cpu(-1, test_size) - assert requirements.check_cpu(min_cpu - 1, test_size) - assert requirements.check_cpu("unknown", test_size) - assert not requirements.check_cpu(1, test_size) - assert not requirements.check_cpu(3, test_size) - assert requirements.check_cpu(1000, test_size) - if max_cpu != consts.TestRequirementsConstants.All: - assert requirements.check_cpu(max_cpu + 1, test_size) - assert requirements.check_cpu(max_cpu + 4, test_size) - assert requirements.check_cpu(consts.TestRequirementsConstants.All, test_size) - else: - assert not requirements.check_cpu(consts.TestRequirementsConstants.All, test_size) - - @pytest.mark.parametrize('test_size', consts.TestSize.sizes()) - def test_ram(self, test_size): - max_ram = consts.TestSize.get_max_requirements(test_size).get(consts.TestRequirements.Ram) - min_ram = consts.TestRequirementsConstants.MinRam - assert requirements.check_ram(-1, test_size) - assert requirements.check_ram(min_ram - 1, test_size) - assert requirements.check_ram(max_ram + 1, test_size) - assert not requirements.check_ram(1, test_size) - assert not requirements.check_ram(4, test_size) - assert not requirements.check_ram(5, test_size) +import pytest + +import build.plugins._requirements as requirements +import build.plugins._test_const as consts + + +class TestRequirements(object): + @pytest.mark.parametrize('test_size', consts.TestSize.sizes()) + def test_cpu(self, test_size): + max_cpu = consts.TestSize.get_max_requirements(test_size).get(consts.TestRequirements.Cpu) + min_cpu = consts.TestRequirementsConstants.MinCpu + assert requirements.check_cpu(-1, test_size) + assert requirements.check_cpu(min_cpu - 1, test_size) + assert requirements.check_cpu("unknown", test_size) + assert not requirements.check_cpu(1, test_size) + assert not requirements.check_cpu(3, test_size) + assert requirements.check_cpu(1000, test_size) + if max_cpu != consts.TestRequirementsConstants.All: + assert requirements.check_cpu(max_cpu + 1, test_size) + assert requirements.check_cpu(max_cpu + 4, test_size) + assert requirements.check_cpu(consts.TestRequirementsConstants.All, test_size) + else: + assert not requirements.check_cpu(consts.TestRequirementsConstants.All, test_size) + + @pytest.mark.parametrize('test_size', consts.TestSize.sizes()) + def test_ram(self, test_size): + max_ram = consts.TestSize.get_max_requirements(test_size).get(consts.TestRequirements.Ram) + min_ram = consts.TestRequirementsConstants.MinRam + assert requirements.check_ram(-1, test_size) + assert requirements.check_ram(min_ram - 1, test_size) + assert requirements.check_ram(max_ram + 1, test_size) + assert not requirements.check_ram(1, test_size) + assert not requirements.check_ram(4, test_size) + assert not requirements.check_ram(5, test_size) assert not requirements.check_ram(32, consts.TestSize.Large) - assert requirements.check_ram(48, consts.TestSize.Large) - - assert not requirements.check_ram(1, test_size, is_kvm=True) - assert not requirements.check_ram(4, test_size, is_kvm=True) - assert not requirements.check_ram(16, test_size, is_kvm=True) - assert requirements.check_ram(32, test_size, is_kvm=True) - - @pytest.mark.parametrize('test_size', consts.TestSize.sizes()) - def test_ram_disk(self, test_size): - max_ram_disk = consts.TestSize.get_max_requirements(test_size).get(consts.TestRequirements.RamDisk) - min_ram_disk = consts.TestRequirementsConstants.MinRamDisk - assert requirements.check_ram_disk(-1, test_size) - assert requirements.check_ram_disk(min_ram_disk - 1, test_size) - assert requirements.check_ram_disk(max_ram_disk + 1, test_size) - assert requirements.check_ram_disk(8, test_size) - assert not requirements.check_ram_disk(1, test_size) - assert not requirements.check_ram_disk(4, test_size) + assert requirements.check_ram(48, consts.TestSize.Large) + + assert not requirements.check_ram(1, test_size, is_kvm=True) + assert not requirements.check_ram(4, test_size, is_kvm=True) + assert not requirements.check_ram(16, test_size, is_kvm=True) + assert requirements.check_ram(32, test_size, is_kvm=True) + + @pytest.mark.parametrize('test_size', consts.TestSize.sizes()) + def test_ram_disk(self, test_size): + max_ram_disk = consts.TestSize.get_max_requirements(test_size).get(consts.TestRequirements.RamDisk) + min_ram_disk = consts.TestRequirementsConstants.MinRamDisk + assert requirements.check_ram_disk(-1, test_size) + assert requirements.check_ram_disk(min_ram_disk - 1, test_size) + assert requirements.check_ram_disk(max_ram_disk + 1, test_size) + assert requirements.check_ram_disk(8, test_size) + assert not requirements.check_ram_disk(1, test_size) + assert not requirements.check_ram_disk(4, test_size) diff --git a/build/plugins/tests/ya.make b/build/plugins/tests/ya.make index d42a278fe6..87228b98df 100644 --- a/build/plugins/tests/ya.make +++ b/build/plugins/tests/ya.make @@ -1,16 +1,16 @@ PY2TEST() - -OWNER(g:yatool) - -PEERDIR( - build/plugins -) - -TEST_SRCS( + +OWNER(g:yatool) + +PEERDIR( + build/plugins +) + +TEST_SRCS( test_code_generator.py - test_common.py - test_requirements.py + test_common.py + test_requirements.py test_ssqls.py -) - -END() +) + +END() diff --git a/build/plugins/ya.make b/build/plugins/ya.make index 106476752d..4ad5f5988e 100644 --- a/build/plugins/ya.make +++ b/build/plugins/ya.make @@ -2,22 +2,22 @@ OWNER(g:ymake) PY2_LIBRARY() -PY_SRCS( +PY_SRCS( code_generator.py ssqls.py swig.py - + _common.py - _custom_command.py - _import_wrapper.py - _requirements.py - _test_const.py + _custom_command.py + _import_wrapper.py + _requirements.py + _test_const.py ) PEERDIR(build/plugins/lib) END() - -RECURSE( - tests -) + +RECURSE( + tests +) diff --git a/build/plugins/yql_python_udf.py b/build/plugins/yql_python_udf.py index d47cb2e793..c4f949d8a9 100644 --- a/build/plugins/yql_python_udf.py +++ b/build/plugins/yql_python_udf.py @@ -37,10 +37,10 @@ def onregister_yql_python_udf(unit, *args): else: flavor = 'System' - output_includes = [ - 'yql/udfs/common/python/python_udf/python_udf.h', + output_includes = [ + 'yql/udfs/common/python/python_udf/python_udf.h', 'ydb/library/yql/public/udf/udf_registrator.h', - ] + ] if add_libra_modules: output_includes.append('yql/udfs/quality/libra/module/module.h') @@ -50,6 +50,6 @@ def onregister_yql_python_udf(unit, *args): 'build/scripts/gen_yql_python_udf.py', flavor, name, resource_name, path, libra_flag, 'OUT', path, - 'OUTPUT_INCLUDES', - ] + output_includes - ) + 'OUTPUT_INCLUDES', + ] + output_includes + ) diff --git a/build/plugins/ytest.py b/build/plugins/ytest.py index 228474b002..8970837f0f 100644 --- a/build/plugins/ytest.py +++ b/build/plugins/ytest.py @@ -2,13 +2,13 @@ import os import re import sys import json -import copy +import copy import base64 import shlex import _common import lib._metric_resolvers as mr -import _test_const as consts -import _requirements as reqs +import _test_const as consts +import _requirements as reqs import StringIO import subprocess import collections @@ -25,7 +25,7 @@ CANON_MDS_RESOURCE_REGEX = re.compile(re.escape(MDS_URI_PREFIX) + r'(.*?)($|#)') CANON_SB_VAULT_REGEX = re.compile(r"\w+=(value|file):[-\w]+:\w+") CANON_SBR_RESOURCE_REGEX = re.compile(r'(sbr:/?/?(\d+))') -VALID_NETWORK_REQUIREMENTS = ("full", "restricted") +VALID_NETWORK_REQUIREMENTS = ("full", "restricted") VALID_DNS_REQUIREMENTS = ("default", "local", "dns64") BLOCK_SEPARATOR = '=============================================================' SPLIT_FACTOR_MAX_VALUE = 1000 @@ -92,10 +92,10 @@ def validate_force_sandbox_requirement(name, value, test_size, is_force_sandbox, error_msg = validate_numerical_requirement(name, value) if error_msg: return error_msg - return check_func(mr.resolve_value(value), test_size, is_kvm) + return check_func(mr.resolve_value(value), test_size, is_kvm) -# TODO: Remove is_kvm param when there will be guarantees on RAM +# TODO: Remove is_kvm param when there will be guarantees on RAM def validate_requirement(req_name, value, test_size, is_force_sandbox, in_autocheck, is_fuzzing, is_kvm, is_ytexec_run): req_checks = { 'container': validate_numerical_requirement, @@ -125,26 +125,26 @@ def validate_test(unit, kw): def get_list(key): return deserialize_list(kw.get(key, "")) - valid_kw = copy.deepcopy(kw) + valid_kw = copy.deepcopy(kw) errors = [] warnings = [] - if valid_kw.get('SCRIPT-REL-PATH') == 'boost.test': - project_path = valid_kw.get('BUILD-FOLDER-PATH', "") + if valid_kw.get('SCRIPT-REL-PATH') == 'boost.test': + project_path = valid_kw.get('BUILD-FOLDER-PATH', "") if not project_path.startswith(("contrib", "mail", "maps", "tools/idl", "metrika", "devtools", "mds", "yandex_io", "smart_devices")): errors.append("BOOSTTEST is not allowed here") - elif valid_kw.get('SCRIPT-REL-PATH') == 'gtest': - project_path = valid_kw.get('BUILD-FOLDER-PATH', "") + elif valid_kw.get('SCRIPT-REL-PATH') == 'gtest': + project_path = valid_kw.get('BUILD-FOLDER-PATH', "") if not project_path.startswith(("contrib", "devtools", "mail", "mds", "taxi")): errors.append("GTEST_UGLY is not allowed here, use GTEST instead") - size_timeout = collections.OrderedDict(sorted(consts.TestSize.DefaultTimeouts.items(), key=lambda t: t[1])) + size_timeout = collections.OrderedDict(sorted(consts.TestSize.DefaultTimeouts.items(), key=lambda t: t[1])) - size = valid_kw.get('SIZE', consts.TestSize.Small).lower() - # TODO: use set instead list + size = valid_kw.get('SIZE', consts.TestSize.Small).lower() + # TODO: use set instead list tags = get_list("TAG") requirements_orig = get_list("REQUIREMENTS") - in_autocheck = "ya:not_autocheck" not in tags and 'ya:manual' not in tags + in_autocheck = "ya:not_autocheck" not in tags and 'ya:manual' not in tags is_fat = 'ya:fat' in tags is_force_sandbox = 'ya:force_distbuild' not in tags and is_fat is_ytexec_run = 'ya:yt' in tags @@ -153,10 +153,10 @@ def validate_test(unit, kw): requirements = {} list_requirements = ('sb_vault') for req in requirements_orig: - if req in ('kvm', ): - requirements[req] = str(True) - continue - + if req in ('kvm', ): + requirements[req] = str(True) + continue + if ":" in req: req_name, req_value = req.split(":", 1) if req_name in list_requirements: @@ -169,7 +169,7 @@ def validate_test(unit, kw): elif requirements[req_name] != req_value: warnings.append("Requirement [[imp]]{}[[rst]] is redefined [[imp]]{}[[rst]] -> [[imp]]{}[[rst]]".format(req_name, requirements[req_name], req_value)) requirements[req_name] = req_value - else: + else: requirements[req_name] = req_value else: errors.append("Invalid requirement syntax [[imp]]{}[[rst]]: expect <requirement>:<value>".format(req)) @@ -180,14 +180,14 @@ def validate_test(unit, kw): if error_msg: errors += [error_msg] - invalid_requirements_for_distbuild = [requirement for requirement in requirements.keys() if requirement not in ('ram', 'ram_disk', 'cpu', 'network')] + invalid_requirements_for_distbuild = [requirement for requirement in requirements.keys() if requirement not in ('ram', 'ram_disk', 'cpu', 'network')] sb_tags = [tag for tag in tags if tag.startswith('sb:')] - - if is_fat: + + if is_fat: if size != consts.TestSize.Large: errors.append("Only LARGE test may have ya:fat tag") - if in_autocheck and not is_force_sandbox: + if in_autocheck and not is_force_sandbox: if invalid_requirements_for_distbuild: errors.append("'{}' REQUIREMENTS options can be used only for FAT tests without ya:force_distbuild tag. Remove TAG(ya:force_distbuild) or an option.".format(invalid_requirements_for_distbuild)) if sb_tags: @@ -195,7 +195,7 @@ def validate_test(unit, kw): if 'ya:sandbox_coverage' in tags: errors.append("You can set 'ya:sandbox_coverage' tag only for FAT tests without ya:force_distbuild.") else: - if is_force_sandbox: + if is_force_sandbox: errors.append('ya:force_sandbox can be used with LARGE tests only') if 'ya:nofuse' in tags: errors.append('ya:nofuse can be used with LARGE tests only') @@ -203,15 +203,15 @@ def validate_test(unit, kw): errors.append("ya:privileged can be used with LARGE tests only") if in_autocheck and size == consts.TestSize.Large: errors.append("LARGE test must have ya:fat tag") - - if 'ya:privileged' in tags and 'container' not in requirements: - errors.append("Only tests with 'container' requirement can have 'ya:privileged' tag") - + + if 'ya:privileged' in tags and 'container' not in requirements: + errors.append("Only tests with 'container' requirement can have 'ya:privileged' tag") + if size not in size_timeout: - errors.append("Unknown test size: [[imp]]{}[[rst]], choose from [[imp]]{}[[rst]]".format(size.upper(), ", ".join([sz.upper() for sz in size_timeout.keys()]))) + errors.append("Unknown test size: [[imp]]{}[[rst]], choose from [[imp]]{}[[rst]]".format(size.upper(), ", ".join([sz.upper() for sz in size_timeout.keys()]))) else: try: - timeout = int(valid_kw.get('TEST-TIMEOUT', size_timeout[size]) or size_timeout[size]) + timeout = int(valid_kw.get('TEST-TIMEOUT', size_timeout[size]) or size_timeout[size]) script_rel_path = valid_kw.get('SCRIPT-REL-PATH') if timeout < 0: raise Exception("Timeout must be > 0") @@ -223,19 +223,19 @@ def validate_test(unit, kw): break if suggested_size: - suggested_size = ", suggested size: [[imp]]{}[[rst]]".format(suggested_size.upper()) + suggested_size = ", suggested size: [[imp]]{}[[rst]]".format(suggested_size.upper()) else: suggested_size = "" - errors.append("Max allowed timeout for test size [[imp]]{}[[rst]] is [[imp]]{} sec[[rst]]{}".format(size.upper(), size_timeout[size], suggested_size)) + errors.append("Max allowed timeout for test size [[imp]]{}[[rst]] is [[imp]]{} sec[[rst]]{}".format(size.upper(), size_timeout[size], suggested_size)) except Exception as e: errors.append("Error when parsing test timeout: [[bad]]{}[[rst]]".format(e)) - requiremtens_list = [] - for req_name, req_value in requirements.iteritems(): - requiremtens_list.append(req_name + ":" + req_value) - valid_kw['REQUIREMENTS'] = serialize_list(requiremtens_list) - - if valid_kw.get("FUZZ-OPTS"): + requiremtens_list = [] + for req_name, req_value in requirements.iteritems(): + requiremtens_list.append(req_name + ":" + req_value) + valid_kw['REQUIREMENTS'] = serialize_list(requiremtens_list) + + if valid_kw.get("FUZZ-OPTS"): for option in get_list("FUZZ-OPTS"): if not option.startswith("-"): errors.append("Unrecognized fuzzer option '[[imp]]{}[[rst]]'. All fuzzer options should start with '-'".format(option)) @@ -264,20 +264,20 @@ def validate_test(unit, kw): tags.append("ya:external") tags.append("ya:yt_research_pool") - if valid_kw.get("USE_ARCADIA_PYTHON") == "yes" and valid_kw.get("SCRIPT-REL-PATH") == "py.test": + if valid_kw.get("USE_ARCADIA_PYTHON") == "yes" and valid_kw.get("SCRIPT-REL-PATH") == "py.test": errors.append("PYTEST_SCRIPT is deprecated") partition = valid_kw.get('TEST_PARTITION', 'SEQUENTIAL') if partition not in PARTITION_MODS: raise ValueError('partition mode should be one of {}, detected: {}'.format(PARTITION_MODS, partition)) - if valid_kw.get('SPLIT-FACTOR'): - if valid_kw.get('FORK-MODE') == 'none': + if valid_kw.get('SPLIT-FACTOR'): + if valid_kw.get('FORK-MODE') == 'none': errors.append('SPLIT_FACTOR must be use with FORK_TESTS() or FORK_SUBTESTS() macro') value = 1 try: - value = int(valid_kw.get('SPLIT-FACTOR')) + value = int(valid_kw.get('SPLIT-FACTOR')) if value <= 0: raise ValueError("must be > 0") if value > SPLIT_FACTOR_MAX_VALUE: @@ -305,7 +305,7 @@ def validate_test(unit, kw): return valid_kw, warnings, errors - + def get_norm_unit_path(unit, extra=None): path = _common.strip_roots(unit.path()) if extra: @@ -319,10 +319,10 @@ def dump_test(unit, kw): unit.message(['warn', w]) for e in errors: ymake.report_configure_error(e) - if valid_kw is None: + if valid_kw is None: return None string_handler = StringIO.StringIO() - for k, v in valid_kw.iteritems(): + for k, v in valid_kw.iteritems(): print >>string_handler, k + ': ' + v print >>string_handler, BLOCK_SEPARATOR data = string_handler.getvalue() @@ -515,8 +515,8 @@ def onadd_ytest(unit, *args): if flat_args[1] == 'fuzz.test' and unit.get('FUZZING') == 'yes': test_record['FUZZING'] = '1' - # use all cores if fuzzing requested - test_record['REQUIREMENTS'] = serialize_list(filter(None, deserialize_list(test_record['REQUIREMENTS']) + ["cpu:all", "ram:all"])) + # use all cores if fuzzing requested + test_record['REQUIREMENTS'] = serialize_list(filter(None, deserialize_list(test_record['REQUIREMENTS']) + ["cpu:all", "ram:all"])) data = dump_test(unit, test_record) if data: @@ -548,7 +548,7 @@ def onadd_check(unit, *args): # graph changed for clang_tidy tests return flat_args, spec_args = _common.sort_by_keywords({"DEPENDS": -1, "TIMEOUT": 1, "DATA": -1, "TAG": -1, "REQUIREMENTS": -1, "FORK_MODE": 1, - "SPLIT_FACTOR": 1, "FORK_SUBTESTS": 0, "FORK_TESTS": 0, "SIZE": 1}, args) + "SPLIT_FACTOR": 1, "FORK_SUBTESTS": 0, "FORK_TESTS": 0, "SIZE": 1}, args) check_type = flat_args[0] test_dir = get_norm_unit_path(unit) diff --git a/build/scripts/_fake_src.cpp b/build/scripts/_fake_src.cpp index d99bfa2e4a..139597f9cb 100644 --- a/build/scripts/_fake_src.cpp +++ b/build/scripts/_fake_src.cpp @@ -1,2 +1,2 @@ - - + + diff --git a/build/scripts/build_mn.py b/build/scripts/build_mn.py index f09d935783..5bb03c247c 100755 --- a/build/scripts/build_mn.py +++ b/build/scripts/build_mn.py @@ -1,12 +1,12 @@ -#!/usr/bin/env python -# Ymake MatrixNet support - -import sys -import os -import shutil -import re +#!/usr/bin/env python +# Ymake MatrixNet support + +import sys +import os +import shutil +import re import subprocess - + def get_value(val): dct = val.split('=', 1) @@ -15,41 +15,41 @@ def get_value(val): return '' -class BuildMnBase(object): +class BuildMnBase(object): def Run(self, mninfo, mnname, mnrankingSuffix, mncppPath, check=False, ptr=False, multi=False): - self.mninfo = mninfo - self.mnname = mnname + self.mninfo = mninfo + self.mnname = mnname self.mnrankingSuffix = mnrankingSuffix - self.mncppPath = mncppPath - self.check = check - self.ptr = ptr - self.multi = multi + self.mncppPath = mncppPath + self.check = check + self.ptr = ptr + self.multi = multi dataprefix = "MN_External_" mninfoName = os.path.basename(self.mninfo) data = dataprefix + mnname datasize = data + "Size" - - if self.multi: - if self.ptr: - mntype = "const NMatrixnet::TMnMultiCategPtr" - mnload = "(new NMatrixnet::TMnMultiCateg( {1}, {2}, \"{0}\"))".format(mninfoName, data, datasize) - else: - mntype = "const NMatrixnet::TMnMultiCateg" - mnload = "({1}, {2}, \"{0}\")".format(mninfoName, data, datasize) - else: - if self.ptr: - mntype = "const NMatrixnet::TMnSsePtr" + + if self.multi: + if self.ptr: + mntype = "const NMatrixnet::TMnMultiCategPtr" + mnload = "(new NMatrixnet::TMnMultiCateg( {1}, {2}, \"{0}\"))".format(mninfoName, data, datasize) + else: + mntype = "const NMatrixnet::TMnMultiCateg" + mnload = "({1}, {2}, \"{0}\")".format(mninfoName, data, datasize) + else: + if self.ptr: + mntype = "const NMatrixnet::TMnSsePtr" mnload = "(new NMatrixnet::TMnSseInfo({1}, {2}, \"{0}\"))".format(mninfoName, data, datasize) - else: - mntype = "const NMatrixnet::TMnSseInfo" + else: + mntype = "const NMatrixnet::TMnSseInfo" mnload = "({1}, {2}, \"{0}\")".format(mninfoName, data, datasize) - - if self.check: - self.CheckMn() - - mncpptmpPath = self.mncppPath + ".tmp" - mncpptmp = open(mncpptmpPath, 'w') - + + if self.check: + self.CheckMn() + + mncpptmpPath = self.mncppPath + ".tmp" + mncpptmp = open(mncpptmpPath, 'w') + if self.multi: mncpptmp.write("#include <kernel/matrixnet/mn_multi_categ.h>\n") else: @@ -62,269 +62,269 @@ class BuildMnBase(object): mncpptmp.write(" extern const ui32 {1}{0}Size;\n".format(self.mnname, dataprefix)) mncpptmp.write(" }\n") mncpptmp.write("}\n") - archiverCall = subprocess.Popen([self.archiver, "-q", "-p", "-o", rodatapath, self.mninfo], stdout=None, stderr=subprocess.PIPE) + archiverCall = subprocess.Popen([self.archiver, "-q", "-p", "-o", rodatapath, self.mninfo], stdout=None, stderr=subprocess.PIPE) archiverCall.wait() - mncpptmp.write("extern {0} {1};\n".format(mntype, self.mnname)) - mncpptmp.write("{0} {1}{2};".format(mntype, self.mnname, mnload)) - mncpptmp.close() - shutil.move(mncpptmpPath, self.mncppPath) - - def CheckMn(self): - if not self.fml_unused_tool: - print >>sys.stderr, "fml_unused_tool undefined!" - failed_msg = "fml_unused_tool failed: {0} -A {1} -e -r {2}".format(self.fml_unused_tool, self.SrcRoot, self.mninfo) - assert not subprocess.call([self.fml_unused_tool, "-A", self.SrcRoot, "-e", "-r", self.mninfo]), failed_msg - - -class BuildMn(BuildMnBase): - def Run(self, argv): + mncpptmp.write("extern {0} {1};\n".format(mntype, self.mnname)) + mncpptmp.write("{0} {1}{2};".format(mntype, self.mnname, mnload)) + mncpptmp.close() + shutil.move(mncpptmpPath, self.mncppPath) + + def CheckMn(self): + if not self.fml_unused_tool: + print >>sys.stderr, "fml_unused_tool undefined!" + failed_msg = "fml_unused_tool failed: {0} -A {1} -e -r {2}".format(self.fml_unused_tool, self.SrcRoot, self.mninfo) + assert not subprocess.call([self.fml_unused_tool, "-A", self.SrcRoot, "-e", "-r", self.mninfo]), failed_msg + + +class BuildMn(BuildMnBase): + def Run(self, argv): if len(argv) < 6: print >>sys.stderr, "BuildMn.Run(<ARCADIA_ROOT> <archiver> <mninfo> <mnname> <mnrankingSuffix> <cppOutput> [params...])" - sys.exit(1) - - self.SrcRoot = argv[0] - self.archiver = argv[1] - + sys.exit(1) + + self.SrcRoot = argv[0] + self.archiver = argv[1] + mninfo = argv[2] mnname = argv[3] mnrankingSuffix = argv[4] mncppPath = argv[5] - check = False - ptr = False - multi = False + check = False + ptr = False + multi = False self.fml_unused_tool = '' for param in argv[6:]: - if param == "CHECK": - check = True - elif param == "PTR": - ptr = True - elif param == "MULTI": - multi = True + if param == "CHECK": + check = True + elif param == "PTR": + ptr = True + elif param == "MULTI": + multi = True elif param.startswith('fml_tool='): self.fml_unused_tool = get_value(param) - else: - print >>sys.stdout, "Unknown param: {0}".format(param) - super(BuildMn, self).Run(mninfo, mnname, mnrankingSuffix, mncppPath, check=check, ptr=ptr, multi=multi) - - -class BuildMns(BuildMnBase): + else: + print >>sys.stdout, "Unknown param: {0}".format(param) + super(BuildMn, self).Run(mninfo, mnname, mnrankingSuffix, mncppPath, check=check, ptr=ptr, multi=multi) + + +class BuildMns(BuildMnBase): def InitBase(self, listname, mnrankingSuffix): - self.autogen = '// DO NOT EDIT THIS FILE DIRECTLY, AUTOGENERATED!\n' + self.autogen = '// DO NOT EDIT THIS FILE DIRECTLY, AUTOGENERATED!\n' self.mnrankingSuffix = mnrankingSuffix self.mnlistname = listname + mnrankingSuffix - self.mnlistelem = "const NMatrixnet::TMnSsePtr*" + self.mnlistelem = "const NMatrixnet::TMnSsePtr*" mnlisttype = "TMap< TString, {0} >".format(self.mnlistelem) - self.mnlist = "const {0} {1}".format(mnlisttype, self.mnlistname) - + self.mnlist = "const {0} {1}".format(mnlisttype, self.mnlistname) + self.mnmultilistname = "{0}{1}Multi".format(listname, self.mnrankingSuffix) - self.mnmultilistelem = "const NMatrixnet::TMnMultiCategPtr*" + self.mnmultilistelem = "const NMatrixnet::TMnMultiCategPtr*" mnmultilisttype = "TMap< TString, {0} >".format(self.mnmultilistelem) - self.mnmultilist = "const {0} {1}".format(mnmultilisttype, self.mnmultilistname) - - def InitForAll(self, argv): + self.mnmultilist = "const {0} {1}".format(mnmultilisttype, self.mnmultilistname) + + def InitForAll(self, argv): if len(argv) < 8: print >>sys.stderr, "BuildMns.InitForAll(<ARCADIA_ROOT> <BINDIR> <archiver> <listname> <mnranking_suffix> <hdrfile> <srcfile> <mninfos> [fml_tool=<fml_unused_tool> CHECK])" - sys.exit(1) - - bmns_args = [] - self.check = False + sys.exit(1) + + bmns_args = [] + self.check = False self.fml_unused_tool = '' - for arg in argv: - if arg == "CHECK": - self.check = True + for arg in argv: + if arg == "CHECK": + self.check = True elif arg.startswith('fml_tool='): self.fml_unused_tool = get_value(arg) - else: - bmns_args.append(arg) - - self.SrcRoot = bmns_args[0] - self.BINDIR = bmns_args[1] - self.archiver = bmns_args[2] + else: + bmns_args.append(arg) + + self.SrcRoot = bmns_args[0] + self.BINDIR = bmns_args[1] + self.archiver = bmns_args[2] self.listname = bmns_args[3] self.mnrankingSuffix = get_value(bmns_args[4]) self.hdrfile = bmns_args[5] self.srcfile = bmns_args[6] self.mninfos = bmns_args[7:] - + self.InitBase(self.listname, self.mnrankingSuffix) - - def InitForHeader(self, argv): + + def InitForHeader(self, argv): if len(argv) < 4: print >>sys.stderr, "BuildMns.InitForHeader(<listname> <rankingSuffix> <hdrfile> <mninfos...>)" - sys.exit(1) - - self.listname = argv[0] + sys.exit(1) + + self.listname = argv[0] self.mnrankingSuffix = get_value(argv[1]) self.hdrfile = argv[2] self.mninfos = argv[3:] - + self.InitBase(self.listname, self.mnrankingSuffix) - - def InitForCpp(self, argv): + + def InitForCpp(self, argv): if len(argv) < 5: print >>sys.stderr, "BuildMns.InitForCpp(<listname> <rankingSuffix> <hdrfile> <srcfile> <mninfos...>)" - sys.exit(1) - - self.listname = argv[0] + sys.exit(1) + + self.listname = argv[0] self.mnrankingSuffix = get_value(argv[1]) self.hdrfile = argv[2] self.srcfile = argv[3] self.mninfos = argv[4:] - + self.InitBase(self.listname, self.mnrankingSuffix) - - def InitForFiles(self, argv): + + def InitForFiles(self, argv): if len(argv) < 7: print >>sys.stderr, "BuildMns.InitForFiles(<ARCADIA_ROOT> <BINDIR> <archiver> <fml_unused_tool> <listname> <rankingSuffix> <mninfos...> [CHECK])" - sys.exit(1) - - bmns_args = [] - self.check = False + sys.exit(1) + + bmns_args = [] + self.check = False self.fml_unused_tool = '' - for arg in argv: - if arg == "CHECK": - self.check = True + for arg in argv: + if arg == "CHECK": + self.check = True elif arg.startswith('fml_tool='): self.fml_unused_tool = get_value(arg) - else: - bmns_args.append(arg) - - self.SrcRoot = bmns_args[0] - self.BINDIR = bmns_args[1] - self.archiver = bmns_args[2] + else: + bmns_args.append(arg) + + self.SrcRoot = bmns_args[0] + self.BINDIR = bmns_args[1] + self.archiver = bmns_args[2] self.listname = bmns_args[3] self.mnrankingSuffix = get_value(bmns_args[4]) self.mninfos = bmns_args[5:] - - def BuildMnsHeader(self): - if self.mninfos: - self.mninfos = sorted(set(self.mninfos)) - - tmpHdrPath = self.hdrfile + ".tmp" - tmpHdrFile = open(tmpHdrPath, 'w') - - tmpHdrFile.write(self.autogen) - tmpHdrFile.write("#include <kernel/matrixnet/mn_sse.h>\n") - tmpHdrFile.write("#include <kernel/matrixnet/mn_multi_categ.h>\n\n") - tmpHdrFile.write("extern {0};\n".format(self.mnlist)) - tmpHdrFile.write("extern {0};\n".format(self.mnmultilist)) - - for item in self.mninfos: - mnfilename = os.path.basename(item) - mnfilename, ext = os.path.splitext(mnfilename) - - mnname = re.sub("[^-a-zA-Z0-9_]", "_", mnfilename) - - if ext == ".info": + + def BuildMnsHeader(self): + if self.mninfos: + self.mninfos = sorted(set(self.mninfos)) + + tmpHdrPath = self.hdrfile + ".tmp" + tmpHdrFile = open(tmpHdrPath, 'w') + + tmpHdrFile.write(self.autogen) + tmpHdrFile.write("#include <kernel/matrixnet/mn_sse.h>\n") + tmpHdrFile.write("#include <kernel/matrixnet/mn_multi_categ.h>\n\n") + tmpHdrFile.write("extern {0};\n".format(self.mnlist)) + tmpHdrFile.write("extern {0};\n".format(self.mnmultilist)) + + for item in self.mninfos: + mnfilename = os.path.basename(item) + mnfilename, ext = os.path.splitext(mnfilename) + + mnname = re.sub("[^-a-zA-Z0-9_]", "_", mnfilename) + + if ext == ".info": mnname = "staticMn{0}{1}Ptr".format(self.mnrankingSuffix, mnname) - tmpHdrFile.write("extern const NMatrixnet::TMnSsePtr {0};\n".format(mnname)) - elif ext == ".mnmc": + tmpHdrFile.write("extern const NMatrixnet::TMnSsePtr {0};\n".format(mnname)) + elif ext == ".mnmc": mnname = "staticMnMulti{0}{1}Ptr".format(self.mnrankingSuffix, mnname) - tmpHdrFile.write("extern const NMatrixnet::TMnMultiCategPtr {0};\n".format(mnname)) - - tmpHdrFile.close() - shutil.move(tmpHdrPath, self.hdrfile) - - def BuildMnFiles(self): - for item in self.mninfos: - mnfilename = os.path.basename(item) - mnfilename, ext = os.path.splitext(mnfilename) - - mnname = re.sub("[^-a-zA-Z0-9_]", "_", mnfilename) - - if ext == ".info": + tmpHdrFile.write("extern const NMatrixnet::TMnMultiCategPtr {0};\n".format(mnname)) + + tmpHdrFile.close() + shutil.move(tmpHdrPath, self.hdrfile) + + def BuildMnFiles(self): + for item in self.mninfos: + mnfilename = os.path.basename(item) + mnfilename, ext = os.path.splitext(mnfilename) + + mnname = re.sub("[^-a-zA-Z0-9_]", "_", mnfilename) + + if ext == ".info": mnname = "staticMn{0}{1}Ptr".format(self.mnrankingSuffix, mnname) - super(BuildMns, self).Run(item, mnname, self.mnrankingSuffix, self.BINDIR + "/mn.{0}.cpp".format(mnname), check=self.check, ptr=True, multi=False) - elif ext == ".mnmc": + super(BuildMns, self).Run(item, mnname, self.mnrankingSuffix, self.BINDIR + "/mn.{0}.cpp".format(mnname), check=self.check, ptr=True, multi=False) + elif ext == ".mnmc": mnname = "staticMnMulti{0}{1}Ptr".format(self.mnrankingSuffix, mnname) - # BUILD_MN_PTR_MULTI - super(BuildMns, self).Run(item, mnname, self.mnrankingSuffix, self.BINDIR + "/mnmulti.{0}.cpp".format(mnname), check=False, ptr=True, multi=True) - - def BuildMnsCpp(self): - if self.mninfos: - self.mninfos = sorted(set(self.mninfos)) - - tmpSrcPath = self.srcfile + ".tmp" - tmpSrcFile = open(tmpSrcPath, 'w') - hdrrel = os.path.basename(self.hdrfile) - - mnnames = [] - mnmultinames = [] - for item in self.mninfos: - mnfilename = os.path.basename(item) - mnfilename, ext = os.path.splitext(mnfilename) - - if ext == ".info": - mnnames.append(mnfilename) - elif ext == ".mnmc": + # BUILD_MN_PTR_MULTI + super(BuildMns, self).Run(item, mnname, self.mnrankingSuffix, self.BINDIR + "/mnmulti.{0}.cpp".format(mnname), check=False, ptr=True, multi=True) + + def BuildMnsCpp(self): + if self.mninfos: + self.mninfos = sorted(set(self.mninfos)) + + tmpSrcPath = self.srcfile + ".tmp" + tmpSrcFile = open(tmpSrcPath, 'w') + hdrrel = os.path.basename(self.hdrfile) + + mnnames = [] + mnmultinames = [] + for item in self.mninfos: + mnfilename = os.path.basename(item) + mnfilename, ext = os.path.splitext(mnfilename) + + if ext == ".info": + mnnames.append(mnfilename) + elif ext == ".mnmc": mnmultinames.append(mnfilename) - - tmpSrcFile.write(self.autogen) - tmpSrcFile.write("#include \"{0}\"\n\n".format(hdrrel)) - - if mnnames: - mndata = self.mnlistname + "_data" + + tmpSrcFile.write(self.autogen) + tmpSrcFile.write("#include \"{0}\"\n\n".format(hdrrel)) + + if mnnames: + mndata = self.mnlistname + "_data" tmpSrcFile.write("static const std::pair< TString, {0} > {1}[] = {{\n".format(self.mnlistelem, mndata)) - for item in mnnames: - mnname = re.sub("[^-a-zA-Z0-9_]", "_", item) + for item in mnnames: + mnname = re.sub("[^-a-zA-Z0-9_]", "_", item) tmpSrcFile.write(" std::make_pair(TString(\"{0}\"), &staticMn{1}{2}Ptr),\n".format(item, self.mnrankingSuffix, mnname)) - tmpSrcFile.write("};\n") - tmpSrcFile.write("{0}({1},{1} + sizeof({1}) / sizeof({1}[0]));\n\n".format(self.mnlist, mndata)) - else: - tmpSrcFile.write("{0};\n\n".format(self.mnlist)) - - if mnmultinames: - mnmultidata = self.mnmultilistname + "_data" + tmpSrcFile.write("};\n") + tmpSrcFile.write("{0}({1},{1} + sizeof({1}) / sizeof({1}[0]));\n\n".format(self.mnlist, mndata)) + else: + tmpSrcFile.write("{0};\n\n".format(self.mnlist)) + + if mnmultinames: + mnmultidata = self.mnmultilistname + "_data" tmpSrcFile.write("static const std::pair< TString, {0} > {1}[] = {{\n".format(self.mnmultilistelem, mnmultidata)) - for item in mnmultinames: - mnname = re.sub("[^-a-zA-Z0-9_]", "_", item) + for item in mnmultinames: + mnname = re.sub("[^-a-zA-Z0-9_]", "_", item) tmpSrcFile.write(" std::make_pair(TString(\"{0}\"), &staticMnMulti{1}{2}Ptr),\n".format(item, self.mnrankingSuffix, mnname)) - tmpSrcFile.write("};\n") - tmpSrcFile.write("{0}({1},{1} + sizeof({1}) / sizeof({1}[0]));\n".format(self.mnmultilist, mnmultidata)) - else: - tmpSrcFile.write("{0};\n".format(self.mnmultilist)) - - tmpSrcFile.close() - shutil.move(tmpSrcPath, self.srcfile) - - -def BuildMnsAllF(argv): - bldMns = BuildMns() - bldMns.InitForAll(argv) - bldMns.BuildMnsCpp() - bldMns.BuildMnsHeader() - bldMns.BuildMnFiles() - - -def BuildMnsCppF(argv): - bldMns = BuildMns() - bldMns.InitForCpp(argv) - bldMns.BuildMnsCpp() - - -def BuildMnsHeaderF(argv): - bldMns = BuildMns() - bldMns.InitForHeader(argv) - bldMns.BuildMnsHeader() - - -def BuildMnsFilesF(argv): - bldMns = BuildMns() - bldMns.InitForFiles(argv) - bldMns.BuildMnFiles() - - -def BuildMnF(argv): - bldMn = BuildMn() - bldMn.Run(argv) - - -if __name__ == '__main__': - if len(sys.argv) < 2: + tmpSrcFile.write("};\n") + tmpSrcFile.write("{0}({1},{1} + sizeof({1}) / sizeof({1}[0]));\n".format(self.mnmultilist, mnmultidata)) + else: + tmpSrcFile.write("{0};\n".format(self.mnmultilist)) + + tmpSrcFile.close() + shutil.move(tmpSrcPath, self.srcfile) + + +def BuildMnsAllF(argv): + bldMns = BuildMns() + bldMns.InitForAll(argv) + bldMns.BuildMnsCpp() + bldMns.BuildMnsHeader() + bldMns.BuildMnFiles() + + +def BuildMnsCppF(argv): + bldMns = BuildMns() + bldMns.InitForCpp(argv) + bldMns.BuildMnsCpp() + + +def BuildMnsHeaderF(argv): + bldMns = BuildMns() + bldMns.InitForHeader(argv) + bldMns.BuildMnsHeader() + + +def BuildMnsFilesF(argv): + bldMns = BuildMns() + bldMns.InitForFiles(argv) + bldMns.BuildMnFiles() + + +def BuildMnF(argv): + bldMn = BuildMn() + bldMn.Run(argv) + + +if __name__ == '__main__': + if len(sys.argv) < 2: print >>sys.stderr, "Usage: build_mn.py <funcName> <args...>" - sys.exit(1) - - if (sys.argv[2:]): - globals()[sys.argv[1]](sys.argv[2:]) - else: - globals()[sys.argv[1]]() + sys.exit(1) + + if (sys.argv[2:]): + globals()[sys.argv[1]](sys.argv[2:]) + else: + globals()[sys.argv[1]]() diff --git a/build/scripts/build_pln_header.py b/build/scripts/build_pln_header.py index 413286a11e..c73693f444 100755 --- a/build/scripts/build_pln_header.py +++ b/build/scripts/build_pln_header.py @@ -1,35 +1,35 @@ -#!/usr/bin/env python - -import sys -import os - - -def BuildPlnHeader(): - if len(sys.argv) < 2: +#!/usr/bin/env python + +import sys +import os + + +def BuildPlnHeader(): + if len(sys.argv) < 2: print >>sys.stderr, "Usage: build_pln_header.py <absolute/path/to/OutFile>" - sys.exit(1) - - print >>sys.stdout, "Build Pln Header..." - outPath = sys.argv[1] - tmpPath = outPath + '.tmp' - tmpFile = open(tmpPath, 'w') - + sys.exit(1) + + print >>sys.stdout, "Build Pln Header..." + outPath = sys.argv[1] + tmpPath = outPath + '.tmp' + tmpFile = open(tmpPath, 'w') + tmpFile.write('#include <library/cpp/sse/sse.h>\n') - tmpFile.write('#include <kernel/relevfml/relev_fml.h>\n') - for path in sys.argv[2:]: - name = os.path.basename(path).split(".")[0] # name without extensions - tmpFile.write('\nextern SRelevanceFormula fml{0};\n'.format(name)) - tmpFile.write('float {0}(const float* f);\n'.format(name)) - tmpFile.write('void {0}SSE(const float* const* factors, float* result);\n'.format(name)) - tmpFile.close() - try: + tmpFile.write('#include <kernel/relevfml/relev_fml.h>\n') + for path in sys.argv[2:]: + name = os.path.basename(path).split(".")[0] # name without extensions + tmpFile.write('\nextern SRelevanceFormula fml{0};\n'.format(name)) + tmpFile.write('float {0}(const float* f);\n'.format(name)) + tmpFile.write('void {0}SSE(const float* const* factors, float* result);\n'.format(name)) + tmpFile.close() + try: os.remove(outPath) except: pass try: - os.rename(tmpPath, outPath) - except: - print >>sys.stdout, 'Error: Failed to rename ' + tmpPath + ' to ' + outPath - -if __name__ == '__main__': - BuildPlnHeader() + os.rename(tmpPath, outPath) + except: + print >>sys.stdout, 'Error: Failed to rename ' + tmpPath + ' to ' + outPath + +if __name__ == '__main__': + BuildPlnHeader() diff --git a/build/scripts/cat.py b/build/scripts/cat.py index 7f87ca89be..0c3f73d96f 100755 --- a/build/scripts/cat.py +++ b/build/scripts/cat.py @@ -1,8 +1,8 @@ -#!/usr/bin/env python -import sys -from shutil import copyfileobj as copy +#!/usr/bin/env python +import sys +from shutil import copyfileobj as copy import os.path - + if __name__ == '__main__': for filename in sys.argv[1:] or ["-"]: if filename == "-": diff --git a/build/scripts/configure_file.py b/build/scripts/configure_file.py index 14eec7fa57..1873ed70eb 100755 --- a/build/scripts/configure_file.py +++ b/build/scripts/configure_file.py @@ -1,59 +1,59 @@ -#!/usr/bin/env python2.7 - -import sys -import os.path +#!/usr/bin/env python2.7 + +import sys +import os.path import re - -cmakeDef01 = "#cmakedefine01" -cmakeDef = "#cmakedefine" - - -def replaceLine(l, varDict, define): - words = l.split() - if words: - if words[0] == cmakeDef: - sPos = l.find(cmakeDef) - ePos = sPos + len(cmakeDef) - l = l[:sPos] + define + l[ePos:] + '\n' - if words[0] == cmakeDef01: - var = words[1] - cmakeValue = varDict.get(var) - if cmakeValue == 'yes': - val = '1' - else: - val = '0' - sPos = l.find(cmakeDef01) - ePos = l.find(var) + len(var) - l = l[:sPos] + define + ' ' + var + ' ' + val + l[ePos + 1:] + '\n' - + +cmakeDef01 = "#cmakedefine01" +cmakeDef = "#cmakedefine" + + +def replaceLine(l, varDict, define): + words = l.split() + if words: + if words[0] == cmakeDef: + sPos = l.find(cmakeDef) + ePos = sPos + len(cmakeDef) + l = l[:sPos] + define + l[ePos:] + '\n' + if words[0] == cmakeDef01: + var = words[1] + cmakeValue = varDict.get(var) + if cmakeValue == 'yes': + val = '1' + else: + val = '0' + sPos = l.find(cmakeDef01) + ePos = l.find(var) + len(var) + l = l[:sPos] + define + ' ' + var + ' ' + val + l[ePos + 1:] + '\n' + finder = re.compile(".*?(@[a-zA-Z0-9_]+@).*") - while True: + while True: re_result = finder.match(l) if not re_result: - return l + return l key = re_result.group(1)[1:-1] l = l[:re_result.start(1)] + varDict.get(key, '') + l[re_result.end(1):] - - -def main(inputPath, outputPath, varDict): - define = '#define' if os.path.splitext(outputPath)[1] != '.asm' else '%define' - with open(outputPath, 'w') as output: - with open(inputPath, 'r') as input: - for l in input: - output.write(replaceLine(l, varDict, define)) - - -def usage(): - print "usage: configure_file.py inputPath outputPath key1=value1 ..." - exit(1) - - -if __name__ == "__main__": - if len(sys.argv) < 3: - usage() - varDict = {} - for x in sys.argv[3:]: + + +def main(inputPath, outputPath, varDict): + define = '#define' if os.path.splitext(outputPath)[1] != '.asm' else '%define' + with open(outputPath, 'w') as output: + with open(inputPath, 'r') as input: + for l in input: + output.write(replaceLine(l, varDict, define)) + + +def usage(): + print "usage: configure_file.py inputPath outputPath key1=value1 ..." + exit(1) + + +if __name__ == "__main__": + if len(sys.argv) < 3: + usage() + varDict = {} + for x in sys.argv[3:]: key, value = str(x).split('=', 1) - varDict[key] = value - - main(sys.argv[1], sys.argv[2], varDict) + varDict[key] = value + + main(sys.argv[1], sys.argv[2], varDict) diff --git a/build/scripts/error.py b/build/scripts/error.py index b36d1d9cda..f7d8ecb2cc 100644 --- a/build/scripts/error.py +++ b/build/scripts/error.py @@ -22,7 +22,7 @@ class ExitCodes(object): TEST_FAILED = 10 COMPILATION_FAILED = 11 INFRASTRUCTURE_ERROR = 12 - NOT_RETRIABLE_ERROR = 13 + NOT_RETRIABLE_ERROR = 13 YT_STORE_FETCH_ERROR = 14 diff --git a/build/scripts/fetch_resource.py b/build/scripts/fetch_resource.py index 0808b68ca3..d5af311e5d 100644 --- a/build/scripts/fetch_resource.py +++ b/build/scripts/fetch_resource.py @@ -30,7 +30,7 @@ def fetch_resource(id_): try: return fetch(u) - except Exception: + except Exception: continue raise Exception('Cannot fetch resource {}'.format(id_)) diff --git a/build/scripts/fs_tools.py b/build/scripts/fs_tools.py index 3c286d0a46..dec4c349c8 100644 --- a/build/scripts/fs_tools.py +++ b/build/scripts/fs_tools.py @@ -28,7 +28,7 @@ if __name__ == '__main__': args = pcf.get_args(sys.argv[2:]) if mode == 'copy': - shutil.copy(args[0], args[1]) + shutil.copy(args[0], args[1]) elif mode == 'copy_tree_no_link': dst = args[1] shutil.copytree(args[0], dst, ignore=lambda dirname, names: [n for n in names if os.path.islink(os.path.join(dirname, n))]) @@ -45,7 +45,7 @@ if __name__ == '__main__': os.makedirs(os.path.dirname(d)) except OSError: pass - shutil.copy(s, d) + shutil.copy(s, d) elif mode == 'copy_all_files': src = args[0] dst = args[1] diff --git a/build/scripts/mkdir.py b/build/scripts/mkdir.py index aa26988bed..a326b29300 100755 --- a/build/scripts/mkdir.py +++ b/build/scripts/mkdir.py @@ -1,12 +1,12 @@ -#!/usr/bin/env python -import os -import sys - - +#!/usr/bin/env python +import os +import sys + + def mkdir_p(directory): - if not os.path.exists(directory): - os.makedirs(directory) - -if __name__ == "__main__": - for directory in sys.argv[1:]: - mkdir_p(directory) + if not os.path.exists(directory): + os.makedirs(directory) + +if __name__ == "__main__": + for directory in sys.argv[1:]: + mkdir_p(directory) diff --git a/build/scripts/preprocess.py b/build/scripts/preprocess.py index f720ff13d7..4657bef732 100644 --- a/build/scripts/preprocess.py +++ b/build/scripts/preprocess.py @@ -1,5 +1,5 @@ -import sys -import os +import sys +import os def load_file(p): diff --git a/build/scripts/run_msvc_wine.py b/build/scripts/run_msvc_wine.py index e68a381b01..439d1f8831 100644 --- a/build/scripts/run_msvc_wine.py +++ b/build/scripts/run_msvc_wine.py @@ -53,7 +53,7 @@ def subst_path(l): def call_wine_cmd_once(wine, cmd, env, mode): - p = run_subprocess(wine + cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, env=env, close_fds=True, shell=False) + p = run_subprocess(wine + cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, env=env, close_fds=True, shell=False) output = find_cmd_out(cmd) error = None @@ -71,20 +71,20 @@ def call_wine_cmd_once(wine, cmd, env, mode): # print >>sys.stderr, cmd, env, wine - stdout_and_stderr, _ = p.communicate() + stdout_and_stderr, _ = p.communicate() - return_code = p.returncode - if not stdout_and_stderr: - if return_code != 0: + return_code = p.returncode + if not stdout_and_stderr: + if return_code != 0: raise Exception('wine did something strange') - return return_code - elif ' : fatal error ' in stdout_and_stderr: - return_code = 1 - elif ' : error ' in stdout_and_stderr: - return_code = 2 + return return_code + elif ' : fatal error ' in stdout_and_stderr: + return_code = 1 + elif ' : error ' in stdout_and_stderr: + return_code = 2 - lines = [x.strip() for x in stdout_and_stderr.split('\n')] + lines = [x.strip() for x in stdout_and_stderr.split('\n')] prefixes = [ 'Microsoft (R)', @@ -135,12 +135,12 @@ def call_wine_cmd_once(wine, cmd, env, mode): if good_line(l): yield subst_path(l.strip()) - stdout_and_stderr = '\n'.join(filter_lines()).strip() + stdout_and_stderr = '\n'.join(filter_lines()).strip() - if stdout_and_stderr: - print >>sys.stderr, stdout_and_stderr + if stdout_and_stderr: + print >>sys.stderr, stdout_and_stderr - return return_code + return return_code def prepare_vc(fr, to): @@ -471,7 +471,7 @@ def run_main(): } slave_cmd = [sys.executable, sys.argv[0], wine, 'slave', json.dumps(args)] - p = run_subprocess(slave_cmd, stderr=subprocess.STDOUT, stdout=subprocess.PIPE, shell=False) + p = run_subprocess(slave_cmd, stderr=subprocess.STDOUT, stdout=subprocess.PIPE, shell=False) out, _ = p.communicate() return p.wait(), out diff --git a/build/scripts/symlink.py b/build/scripts/symlink.py index e8f90c366e..17bc8447f1 100755 --- a/build/scripts/symlink.py +++ b/build/scripts/symlink.py @@ -1,29 +1,29 @@ -#!/usr/bin/env python - -import sys -import os -import platform -from subprocess import call - - -def symlink(): - if len(sys.argv) < 3: - print >>sys.stderr, "Usage: symlink.py <source> <target>" - sys.exit(1) - - source = sys.argv[1] - target = sys.argv[2] - - print "Making a symbolic link from {0} to {1}".format(source, target) - - sysName = platform.system() - if sysName == "Windows": # and not os.path.exists(target) - if os.path.isdir(source): - call(["mklink", "/D", target, source], shell=True) - else: - call(["mklink", target, source], shell=True) - else: - call(["ln", "-f", "-s", "-n", source, target]) - -if __name__ == '__main__': - symlink() +#!/usr/bin/env python + +import sys +import os +import platform +from subprocess import call + + +def symlink(): + if len(sys.argv) < 3: + print >>sys.stderr, "Usage: symlink.py <source> <target>" + sys.exit(1) + + source = sys.argv[1] + target = sys.argv[2] + + print "Making a symbolic link from {0} to {1}".format(source, target) + + sysName = platform.system() + if sysName == "Windows": # and not os.path.exists(target) + if os.path.isdir(source): + call(["mklink", "/D", target, source], shell=True) + else: + call(["mklink", target, source], shell=True) + else: + call(["ln", "-f", "-s", "-n", source, target]) + +if __name__ == '__main__': + symlink() diff --git a/build/scripts/touch.py b/build/scripts/touch.py index 240047ae11..e01ba7f86b 100755 --- a/build/scripts/touch.py +++ b/build/scripts/touch.py @@ -5,14 +5,14 @@ import os import sys import time - + def main(argv): - parser = optparse.OptionParser(add_help_option=False) + parser = optparse.OptionParser(add_help_option=False) parser.disable_interspersed_args() - parser.add_option('-?', '--help', dest='help', - action='store_true', default=None, help='print help') - parser.add_option('-t', dest='t', action='store', default=None) + parser.add_option('-?', '--help', dest='help', + action='store_true', default=None, help='print help') + parser.add_option('-t', dest='t', action='store', default=None) opts, argv_rest = parser.parse_args(argv) if getattr(opts, 'help', False): diff --git a/build/scripts/writer.py b/build/scripts/writer.py index 6006e60f62..21bb3006e5 100644 --- a/build/scripts/writer.py +++ b/build/scripts/writer.py @@ -16,7 +16,7 @@ def parse_args(): parser.add_argument('-P', '--path-list', action='store_true', default=False) return parser.parse_args(args) - + def smart_shell_quote(v): if v is None: return None diff --git a/build/ya.conf.json b/build/ya.conf.json index cf80651547..5f7cc875d6 100644 --- a/build/ya.conf.json +++ b/build/ya.conf.json @@ -3442,14 +3442,14 @@ } ] }, - "cling": { - "tools": { + "cling": { + "tools": { "cling": { "bottle": "cling", "executable": "cling" } - }, - "platforms": [ + }, + "platforms": [ { "host": { "os": "LINUX" @@ -3462,8 +3462,8 @@ }, "default": true } - ] - }, + ] + }, "ninja": { "tools": { "ninja": { @@ -3666,14 +3666,14 @@ } ] }, - "vim": { - "tools": { + "vim": { + "tools": { "vim": { "bottle": "vim", "executable": "vim" } - }, - "platforms": [ + }, + "platforms": [ { "host": { "os": "LINUX" @@ -3686,16 +3686,16 @@ }, "default": true } - ] - }, - "nvim": { - "tools": { + ] + }, + "nvim": { + "tools": { "nvim": { "bottle": "nvim", "executable": "nvim" } - }, - "platforms": [ + }, + "platforms": [ { "host": { "os": "LINUX" @@ -3708,16 +3708,16 @@ }, "default": true } - ] - }, - "emacs": { - "tools": { + ] + }, + "emacs": { + "tools": { "emacs": { "bottle": "emacs", "executable": "emacs" } - }, - "platforms": [ + }, + "platforms": [ { "host": { "os": "LINUX" @@ -3730,8 +3730,8 @@ }, "default": true } - ] - }, + ] + }, "tmux": { "tools": { "tmux": { @@ -3739,11 +3739,11 @@ "executable": "tmux" } }, - "env": { - "TERMINFO": [ + "env": { + "TERMINFO": [ "$(ROOT)/share/terminfo" - ] - }, + ] + }, "platforms": [ { "host": { @@ -4306,15 +4306,15 @@ "default": true } ] - }, - "ctags": { - "tools": { + }, + "ctags": { + "tools": { "ctags": { "bottle": "ctags", "executable": "ctags" } - }, - "platforms": [ + }, + "platforms": [ { "host": { "os": "LINUX" @@ -4327,15 +4327,15 @@ }, "default": true } - ] - }, - "you_complete_me": { - "tools": { + ] + }, + "you_complete_me": { + "tools": { "you_complete_me": { "bottle": "you_complete_me" } - }, - "platforms": [ + }, + "platforms": [ { "host": { "os": "LINUX" @@ -4348,15 +4348,15 @@ }, "default": true } - ] + ] }, - "rtags": { - "tools": { + "rtags": { + "tools": { "rtags": { "bottle": "rtags" } - }, - "platforms": [ + }, + "platforms": [ { "host": { "os": "LINUX" @@ -4369,8 +4369,8 @@ }, "default": true } - ] - }, + ] + }, "afl-fuzz": { "tools": { "afl-fuzz": { @@ -6876,39 +6876,39 @@ ] } }, - "vim": { - "formula": { - "sandbox_id": 82345405, - "match": "vim" - }, - "executable": { + "vim": { + "formula": { + "sandbox_id": 82345405, + "match": "vim" + }, + "executable": { "vim": [ "vim" ] - } - }, - "nvim": { - "formula": { - "sandbox_id": 123061100, - "match": "nvim" - }, - "executable": { + } + }, + "nvim": { + "formula": { + "sandbox_id": 123061100, + "match": "nvim" + }, + "executable": { "nvim": [ "nvim" ] - } - }, - "emacs": { - "formula": { - "sandbox_id": 84328012, - "match": "emacs" - }, - "executable": { + } + }, + "emacs": { + "formula": { + "sandbox_id": 84328012, + "match": "emacs" + }, + "executable": { "emacs": [ "emacs" ] - } - }, + } + }, "tmux": { "formula": { "sandbox_id": [ @@ -7006,17 +7006,17 @@ ] } }, - "cling": { - "formula": { - "sandbox_id": 87671454, - "match": "cling" - }, - "executable": { + "cling": { + "formula": { + "sandbox_id": 87671454, + "match": "cling" + }, + "executable": { "cling": [ "cling" ] - } - }, + } + }, "ninja": { "formula": { "sandbox_id": 19094385, @@ -7147,31 +7147,31 @@ "allure" ] } - }, + }, "ctags": { - "formula": { - "sandbox_id": 55229519, - "match": "ctags" - }, - "executable": { + "formula": { + "sandbox_id": 55229519, + "match": "ctags" + }, + "executable": { "ctags": [ "bin", "ctags" ] - } - }, + } + }, "you_complete_me": { - "formula": { + "formula": { "sandbox_id": 121751471, - "match": "YouCompleteMe" - } + "match": "YouCompleteMe" + } }, "rtags": { - "formula": { - "sandbox_id": 84460170, - "match": "rtags" - } - }, + "formula": { + "sandbox_id": 84460170, + "match": "rtags" + } + }, "afl-fuzz": { "formula": { "sandbox_id": 80600007, diff --git a/build/ya.make b/build/ya.make index 9eab313c0b..407b8f13e0 100644 --- a/build/ya.make +++ b/build/ya.make @@ -19,7 +19,7 @@ PEERDIR( END() -RECURSE( +RECURSE( conf_fatal_error config docs/empty @@ -29,10 +29,10 @@ RECURSE( platform/perl platform/python platform/python/ldflags - plugins + plugins prebuilt - scripts + scripts tests tests_slow yandex_specific/config -) +) diff --git a/build/ymake.core.conf b/build/ymake.core.conf index d39f3a3ec2..081833998b 100644 --- a/build/ymake.core.conf +++ b/build/ymake.core.conf @@ -8,7 +8,7 @@ # Use this with extreme care and only change if it is utlimately needed. Consider more specific XXX_FAKEIDs below instead. FAKEID=3141592653 -SANDBOX_FAKEID=${FAKEID}.7600000 +SANDBOX_FAKEID=${FAKEID}.7600000 CPP_FAKEID=9107927 GO_FAKEID=9056219 ANDROID_FAKEID=8821472 @@ -23,13 +23,13 @@ ECHO=echo INCLUDE_EXTS=.h .hh .hpp .rli .cuh .inc .i CPP_EXT=.cpp OBJ_SUF= -CFLAGS= +CFLAGS= EXTRA_C_FLAGS= SFLAGS= -AUTOCHECK_BALANCING_OPTIONS= +AUTOCHECK_BALANCING_OPTIONS= SO_OTPUTS=no - + @import "${CONF_ROOT}/conf/settings.conf" @import "${CONF_ROOT}/conf/opensource.conf" @import "${CONF_ROOT}/conf/rules.conf" @@ -197,9 +197,9 @@ when ($OS_LINUX && $OS_SDK == "ubuntu-14" && $MUSL != "yes") { } USE_ARCADIA_PYTHON=yes -USE_ARCADIA_LIBM=no +USE_ARCADIA_LIBM=no USE_EAT_MY_DATA=no - + HAVE_MKL= when ($HAVE_MKL == "") { when ($OS_LINUX && $ARCH_X86_64 && !$SANITIZER_TYPE) { @@ -313,7 +313,7 @@ ${output_include;hide:"contrib/libs/python/Include/structmember.h"} \ ${output_include;hide:"contrib/libs/python/Include/traceback.h"} \ ${output_include;hide:"contrib/tools/cython/generated_c_headers.h"} \ ${output_include;hide:"omp.h"} - + # tag:cython-specific CYTHON_CPP_OUTPUT_INCLUDES=${output_include;hide:"contrib/tools/cython/generated_cpp_headers.h"} @@ -849,8 +849,8 @@ macro _CPP_PROTO_CMD(File) { .CMD=$CPP_PROTO_CMDLINE $CPP_PROTO_OPTS $CPP_PROTO_OUTS ${kv;hide:"p PB"} ${kv;hide:"pc yellow"} .SEM=target_proto_mesages PRIVATE ${input:File} ${output;hide;suf=.pb.o:File} ${output;main;hide;norel;nopath;noext:File.pb.h} ${hide;tool:"contrib/tools/protoc/bin"} && set_global_flags COMMON_PROTOC_FLAGS -I=$ARCADIA_ROOT -I=$ARCADIA_BUILD_ROOT && modules_required protobuf.cmake .PEERDIR=contrib/libs/protobuf -} - +} + # tag:proto macro _CPP_VANILLA_PROTO_CMD(File) { .CMD=$CPP_PROTO_CMDLINE $CPP_PROTO_OPTS $CPP_PROTO_OUTS ${kv;hide:"p PB"} ${kv;hide:"pc yellow"} @@ -947,8 +947,8 @@ macro XS_PROTO(File, Dir, Outputs...) { .CMD=$PROTOC -I=${ARCADIA_ROOT}/${Dir} ${pre=-I=:_PROTO__INCLUDE} -I=${ARCADIA_ROOT} -I=${PROTOBUF_PATH} --perlxs_out=${BINDIR} ${input:File} ${hide;output:Outputs} ${output_include;hide;nopath;noext;suf=.pb.h:File} PEERDIR(${Dir}) ADDINCL(${ARCADIA_BUILD_ROOT}/${Dir}) -} - +} + # tag:proto tag:fbs ### @usage: PROTO2FBS(InputProto) ### @@ -961,7 +961,7 @@ macro PROTO2FBS(File) { when ($PY_PROTOS_FOR == "yes") { PEERDIR+=contrib/libs/protobuf/python } - + # tag:python-specific macro _PY_EVLOG_CMD_BASE(File, Suf, Args...) { .CMD=$_PY_PROTO_CMD_BASE($File $Suf $Args) @@ -1173,7 +1173,7 @@ module _BASE_UNIT: _BARE_UNIT { } } - SANITIZER_DEFINED=no + SANITIZER_DEFINED=no when ($SANITIZER_TYPE && $SANITIZER_TYPE != "no") { CFLAGS+=-fsanitize=$SANITIZER_TYPE -D${SANITIZER_TYPE}_sanitizer_enabled $SANITIZER_CFLAGS -fno-omit-frame-pointer @@ -1411,14 +1411,14 @@ when ($COMMON_LINK_SETTINGS == "yes") { when (($USE_EAT_MY_DATA == "yes") && ($WIN32 != "yes") && ($DARWIN != "yes") && ($OS_ANDROID != "yes") && ($OS_IOS != "yes")) { PEERDIR+=contrib/libs/libeatmydata/autocheck_wrapper } - + when ($USE_ARCADIA_LIBM == "yes") { PEERDIR+=contrib/libs/libm } when ($USE_ARCADIA_LIBM == "no") { C_SYSTEM_LIBRARIES+=-lm } - + when (($MUSL != "yes" && $WITH_VALGRIND == "yes") || $SANITIZER_DEFINED == "yes") { when ($ALLOCATOR in [ "TCMALLOC", "TCMALLOC_SMALL_BUT_SLOW", "TCMALLOC_NUMA_256K", "TCMALLOC_NUMA_LARGE_PAGES", "TCMALLOC_256K", "GOOGLE", "J", "LF", "LF_YT", "LF_DBG", "B", "BM", "C", "LOCKLESS", "YT", "MIM", "HU" ]) { PEERDIR+=library/cpp/malloc/system @@ -2366,7 +2366,7 @@ module _LIBRARY: _BASE_UNIT { .ALIASES=RES_REQUIREMENTS=PY_REQUIREMENTS GLOBAL_SUFFIX=.global$MODULE_SUFFIX - #TODO: Remove this hack (really we do not need add fake src at all) + #TODO: Remove this hack (really we do not need add fake src at all) ENABLE(NEED_ADD_FAKE_SRC) _REQUIRE_EXPLICIT_LICENSE(contrib/deprecated contrib/libs contrib/restricted contrib/python) CHECK_CONTRIB_CREDITS(contrib/clickhouse contrib/libs contrib/deprecated EXCEPT contrib/deprecated/python) @@ -2403,8 +2403,8 @@ module _LIBRARY: _BASE_UNIT { when ($USE_ARCADIA_LIBM == "yes") { PEERDIR+=contrib/libs/libm } -} - +} + CPP_LIBRARY_SEM=add_library ${MODDIR} $REALPRJNAME ${hide:TARGET} ${hide:AUTO_INPUT} \ && library_fake_marker FAKE_MODULE ${FAKE_MODULE} \ && consumer_link_library PUBLIC $CMAKE_LINK_TARGET \ @@ -2700,7 +2700,7 @@ module PY_ANY_MODULE: DLL_UNIT { } .RESTRICTED=USE_PYTHON2 USE_PYTHON3 PY_SRCS PY_MAIN } - + # tag:python-specific ### @usage: PY2MODULE(name major_ver [minor_ver] [EXPORTS symlist_file] [PREFIX prefix]) ### @@ -2807,8 +2807,8 @@ module DLL: DLL_UNIT { when ($OS_WINDOWS) { MODULE_SUFFIX=.dll } - - # TODO: Make it possible to use this syntax + + # TODO: Make it possible to use this syntax # DEFAULT(DLL_FOR_DIR no) ### FIXME: XXX ###when ($DLL_FOR_DIR != "no") { @@ -2816,7 +2816,7 @@ module DLL: DLL_UNIT { ### ADDINCL($DLL_FOR_DIR) ###} } - + ### DLL_TOOL is a DLL that can be used as a LD_PRELOAD tool. module DLL_TOOL: DLL { # ymake resolves only program nodes as tools. @@ -5014,8 +5014,8 @@ multimodule SANDBOX_TASK { PEERDIR(sandbox/sdk2 sandbox/sandboxsdk) REGISTER_SANDBOX_IMPORT(${MODDIR}) } -} - +} + # tag:sandbox-specific multimodule SANDBOX_PY23_TASK { module SB_TASK_BIN: _PY2_PROGRAM { @@ -5132,7 +5132,7 @@ macro _PYTHON_ADDINCL() { } } } - + # tag:python-specific ### @usage: PYTHON3_ADDINCL() ### @@ -5182,7 +5182,7 @@ macro _PYTHON3_ADDINCL() { } } } - + # tag:python-specific ### @usage: USE_PYTHON2() ### @@ -5286,7 +5286,7 @@ macro ALLOCATOR(Alloc) { PEERDIR+=___configure_error___unknown_allocator_type___$ALLOCATOR } } - + ### @usage: CC_REQUIREMENTS([cpu: <value>] [ram: <value>]) ### ### Override CPU and RAM requirements for all C/C++ compilation commands in the module @@ -5341,7 +5341,7 @@ when ($STRIP == "yes" && $NO_STRIP != "yes") { DWARF_COMMAND= GO_LINK_FLAGS_VALUE+=-s } - + when ($NO_LINKER_DCE != "yes") { DCE_FLAG=$LD_DCE_FLAG } @@ -5404,7 +5404,7 @@ macro ADD_COMPILABLE_TRANSLATE(Dict, Name, MakeTransDictOptions...) { __translate_dict=${BINDIR}/transdict.${__translatename_lower}.cpp RUN_PROGRAM(dict/tools/maketransdict -i ${Dict} ${MakeTransDictOptions} ${Name} STDOUT_NOAUTO ${__translate_dict} IN ${Dict}) } - + ### @usage ADD_COMPILABLE_TRANSLIT(TranslitTable NGrams Name Options...) ### ### Generate transliteration dictionary code @@ -5420,7 +5420,7 @@ macro ADD_COMPILABLE_TRANSLIT(TranslitTable, NGrams, Name, Options...) { RUN_PROGRAM(${__gentrie_dir} -i ${TranslitTable} -n ${Options} ${__translitname_lower} IN ${TranslitTable} STDOUT ${__translit_table}) RUN_PROGRAM(dict/tools/make_ngrams -i ${NGrams} ${Options} ${__translitname_lower} IN ${NGrams} STDOUT ${__ngrams_table}) } - + # tag:python-specific tag:proto tag:deprecated ### @usage GENERATE_PY_PROTOS(ProtoFiles...) # deprecated @@ -5432,7 +5432,7 @@ macro GENERATE_PY_PROTOS(FILES...) { _PY_PROTO_CMD($FILE) } } - + # tag:python-specific tag:proto macro _GENERATE_PY_PROTOS_INTERNAL(FILES...) { foreach (FILE : $FILES) { @@ -6278,7 +6278,7 @@ macro BUILDWITH_CYTHON_CPP(Src, Options...) { .CMD=$RUN_CYTHON_SCRIPT $CYTHON_OPTIONS ${Options} --cplus ${CYTHON_CPP_OUTPUT_INCLUDES} ${pre=-I:_CYTHON__INCLUDE} ${input:Src} -o ${output;tobindir:Src.cpp} $CYTHON_OUTPUT_INCLUDES ${requirements;hide:PY_REQUIREMENTS} ${kv;hide:"p CY"} ${kv;hide:"pc yellow"} ADDINCL(FOR cython contrib/tools/cython/Cython/Includes) } - + # tag:python-processing tag:cython tag:internal ### @usage: _BUILDWITH_CYTHON_CPP_DEP(Src Dep Options...) # internal ### @@ -6408,7 +6408,7 @@ macro ARCHIVE_ASM(NAME="", DONTCOMPRESS?"-p":"", REQUIREMENTS[], Files...) { macro PIRE_INLINE_CMD(SRC) { .CMD=${tool:"library/cpp/regex/pire/inline"} -o ${output:SRC} ${input:SRC} ${output_include;hide:SRC} ${kv;hide:"p PI"} ${kv;hide:"pc yellow"} } - + # tag:yweb-specific macro PIRE_INLINE(FILES...) { foreach (FILE : $FILES) { @@ -6463,7 +6463,7 @@ GENERATE_VCS_JAVA_INFO_NODEP=$YMAKE_PYTHON ${input:"build/scripts/vcs_info.py"} macro UPDATE_VCS_JAVA_INFO_NODEP(Jar) { .CMD=$YMAKE_PYTHON ${input:"build/scripts/vcs_info.py"} output-java $(VCS)/vcs.json $VCS_JAVA $Jar $VCS_INFO_DISABLE_CACHE__NO_UID__ } - + ### @usage: CREATE_BUILDINFO_FOR(GenHdr) ### ### Creates header file to access some information about build specified via configuration variables. @@ -6500,7 +6500,7 @@ macro CONFIGURE_FILE(Src, Dst) { .CMD=$YMAKE_PYTHON ${input:"build/scripts/configure_file.py"} ${input:Src} ${output;addincl:Dst} $CFG_VARS ${kv;hide:"p CF"} ${kv;hide:"pc yellow"} .SEM=set_vasrs ${CFG_VARS} && configure_file $S/${input;rootrel:Src} $B/${output;rootrel:Dst} } - + ### @usage: BASE_CODEGEN(tool_path prefix) ### ### Generator ${prefix}.cpp + ${prefix}.h files based on ${prefix}.in. @@ -6516,7 +6516,7 @@ macro BASE_CODEGEN(Tool, Prefix, Opts...) { macro _SPLIT_CODEGEN_BASE(Tool, Prefix, OUT[], OPTS[], OUTPUT_INCLUDES[]) { .CMD=${tool:Tool} ${input:Prefix.in} ${output;hide:OUT} ${output;nopath;noauto:Prefix.cpp} ${output;nopath:Prefix.h} $OPTS ${output_include;hide:OUTPUT_INCLUDES} ${kv;hide:"p SC"} ${kv;hide:"pc yellow"} } - + STRUCT_CODEGEN_OUTPUT_INCLUDES=${output_include;hide:"util/generic/singleton.h"} \ ${output_include;hide:"util/generic/strbuf.h"} \ ${output_include;hide:"util/generic/vector.h"} \ @@ -6531,7 +6531,7 @@ macro STRUCT_CODEGEN(Prefix) { .CMD=$BASE_CODEGEN(kernel/struct_codegen/codegen_tool, $Prefix, $STRUCT_CODEGEN_OUTPUT_INCLUDES) .PEERDIR=kernel/struct_codegen/metadata kernel/struct_codegen/reflection } - + ### @usage: DUMPERF_CODEGEN(Prefix) ### A special case BASE_CODEGEN, in which the extsearch/images/robot/tools/dumperf/codegen tool is used macro DUMPERF_CODEGEN(Prefix) { @@ -6579,14 +6579,14 @@ macro CONLYFLAGS(Flags...) { macro CXXFLAGS(Flags...) { SET_APPEND_WITH_GLOBAL(USER_CXXFLAGS $Flags) } - + # tag:flags ### @usage: CUDA_NVCC_FLAGS(compiler flags) ### Add the specified flags to the compile line .cu-files. macro CUDA_NVCC_FLAGS(Flags...) { SET_APPEND(CUDA_NVCC_FLAGS $Flags) -} - +} + # tag:flags ### @usage: NVCC_DEVICE_LINK(file.cu...) ### Run nvcc --device-link on objects compiled from srcs with --device-c. @@ -6601,14 +6601,14 @@ macro NVCC_DEVICE_LINK(Srcs...) { ### This macro doesn't work in LIBRARY's, UNION's and PACKAGE's. macro STRIP() { ENABLE(STRIP) -} - +} + ### @usage: NO_OPTIMIZE() ### Build code without any optimizations (-O0 mode). macro NO_OPTIMIZE() { ENABLE(NO_OPTIMIZE) -} - +} + ### @usage: NO_COMPILER_WARNINGS() ### Disable all compiler warnings in the module. ### Priorities: NO_COMPILER_WARNINGS > NO_WERROR > WERROR_MODE > WERROR. @@ -6622,15 +6622,15 @@ macro NO_COMPILER_WARNINGS() { ### Priorities: NO_COMPILER_WARNINGS > NO_WERROR > WERROR_MODE > WERROR. macro WERROR() { ENABLE(WERROR) -} - +} + ### @usage: NO_WERROR() ### Override WERROR() behavior ### Priorities: NO_COMPILER_WARNINGS > NO_WERROR > WERROR_MODE > WERROR. macro NO_WERROR() { DISABLE(WERROR) -} - +} + ### @usage: NO_WSHADOW() ### Disable C++ shadowing warnings. macro NO_WSHADOW() { @@ -6659,8 +6659,8 @@ macro NO_CODENAVIGATION() { ### so using util headers/functions/classes may not be detected at build time and may lead to unpredictable behavors at configure time. macro NO_UTIL() { ENABLE(NOUTIL) -} - +} + ### @usage: NO_RUNTIME() ### ### This macro: @@ -6672,8 +6672,8 @@ macro NO_RUNTIME() { SET(USE_ARCADIA_LIBM no) NO_UTIL() ENABLE(NORUNTIME) -} - +} + ### @usage: NO_LIBC() ### ### Exclude dependencies on C++ and C runtimes (including util, musl and libeatmydata). @@ -6682,8 +6682,8 @@ macro NO_RUNTIME() { macro NO_LIBC() { NO_RUNTIME() DISABLE(MUSL) -} - +} + ### @usage: NO_PLATFORM() ### ### Exclude dependencies on C++ and C runtimes (including util, musl and libeatmydata) and set NO_PLATFORM variable for special processing. @@ -6717,8 +6717,8 @@ macro USE_UTIL() { ### This macro currently does nothing. This is default behavior which cannot be overridden at module level. macro NO_JOIN_SRC() { ENABLE(UNUSED_MACRO) -} - +} + # tag:deprecated ### @usage: JOINSRC() # deprecated, does-nothing ### This macro currently does nothing. Use JOIN_SRCS and similar macros to make one file of set of sources. @@ -6732,8 +6732,8 @@ macro JOINSRC() { ### Disable all sanitizers for the module. macro NO_SANITIZE() { DISABLE(SANITIZER_TYPE) -} - +} + # tag:coverage tag:sanitize ### @usage: NO_SANITIZE_COVERAGE() ### @@ -6833,7 +6833,7 @@ macro GENERATE_ENUM_SERIALIZATION_WITH_HEADER(File) { macro DEB_VERSION(File) { .CMD=$YMAKE_PYTHON ${input:"build/scripts/mkver.py"} ${input:File} ${output;stdout:"DebianVersion.h"} ${kv;hide:"p CL"} ${kv;hide:"pc yellow"} } - + BUILD_MN_SCRIPT=build/scripts/build_mn.py # tag:matrixnet @@ -6853,12 +6853,12 @@ MNS_OUTPUT=mnmodels macro _BUILD_MNS_CPP(NAME="", CHECK?, RANKING_SUFFIX="", Files...) { .CMD=$YMAKE_PYTHON ${input:BUILD_MN_SCRIPT} BuildMnsCppF $NAME ranking_suffix=$RANKING_SUFFIX ${input:MNS_OUTPUT.h} ${output:MNS_OUTPUT.cpp} ${input:Files} ${output_include;hide:MNS_OUTPUT.h} ${output_include;hide:"kernel/matrixnet/mn_sse.h"} ${kv;hide:"p MN"} ${kv;hide:"pc yellow"} -} - +} + macro _BUILD_MNS_HEADER(NAME="", CHECK?, RANKING_SUFFIX="", Files...) { .CMD=$YMAKE_PYTHON ${input:BUILD_MN_SCRIPT} BuildMnsHeaderF $NAME ranking_suffix=$RANKING_SUFFIX ${output:MNS_OUTPUT.h} ${input:Files} ${output_include;hide:"kernel/matrixnet/mn_sse.h"} ${output_include;hide:"kernel/matrixnet/mn_multi_categ.h"} ${kv;hide:"p MN"} ${kv;hide:"pc yellow"} -} - +} + # TODO: support foreach_in and keywords simultaneous usage (look at BUILD_MNS_FILES) # tag:matrixnet @@ -6870,8 +6870,8 @@ macro BUILD_MNS(Files...) { _BUILD_MNS_HEADER($Files) _BUILD_MNS_CPP($Files) _BUILD_MNS_FILES($Files) -} - +} + ### @usage: BUILD_PLNS(Src...) ### ### Generate interface header plnmodels.h for Relev model (PLN). @@ -6915,10 +6915,10 @@ macro NO_NEED_CHECK(Flags...) { ### Reviewers are listed in the macro OWNER. The use of this macro is disabled by default. ### Details can be found here: https://clubs.at.yandex-team.ru/arcadia/6104 macro NEED_REVIEW(Flags...) { - # TODO: FIXME + # TODO: FIXME ENABLE(UNUSED_MACRO) -} - +} + ### @usage: VERSION(Args...) ### ### Specify version of a module. Currently unused by build system, only informative. @@ -6968,7 +6968,7 @@ macro GEN_SCHEEME2(ScheemeName, FromFile) { macro SYMLINK(From, To) { .CMD=$YMAKE_PYTHON ${input:"build/scripts/symlink.py"} ${input;dirallowed:From} ${output;noauto:To} ${kv;hide:"p LN"} ${kv;hide:"pc light-cyan"} } - + ### @usage: RUN_PROGRAM(tool_path args... [CWD dir] [ENV key=value...] [TOOL tools...] [IN inputs...] [OUT[_NOAUTO] outputs...] [STDOUT[_NOAUTO] output] [OUTPUT_INCLUDES output_includes...] [REQUIREMENTS reqs]) ### ### Run a program from arcadia. @@ -6991,7 +6991,7 @@ macro SYMLINK(From, To) { ### Note that Tool is always built for the host platform, so be careful to provide that tool can be built for all Arcadia major host platforms (Linux, MacOS and Windows). macro RUN_PROGRAM(Tool, IN{input}[], OUT{output}[], OUT_NOAUTO{output}[], TOOL{tool}[], OUTPUT_INCLUDES[], IN_DEPS[], STDOUT="", STDOUT_NOAUTO="", CWD="", ENV[], REQUIREMENTS[], Args...) { .CMD=${cwd:CWD} ${env:ENV} ${tool:Tool} $Args ${input;hide:IN} ${input;hide:IN_DEPS} ${output_include;hide:OUTPUT_INCLUDES} ${tool;hide:TOOL} ${output;hide:OUT} ${output;noauto;hide:OUT_NOAUTO} ${output;stdout:STDOUT} ${output;stdout;noauto:STDOUT_NOAUTO} ${requirements;hide:REQUIREMENTS} ${requirements;hide:"network:restricted"} ${kv;hide:"p PR"} ${kv;hide:"pc yellow"} ${kv;hide:"show_out"} -} +} # tag:lua-specific ### @usage: LUA(script_path args... [CWD dir] [ENV key=value...] [TOOL tools...] [IN inputs...] [OUT[_NOAUTO] outputs...] [STDOUT[_NOAUTO] output] [OUTPUT_INCLUDES output_includes...][ REQUIREMENTS reqs]) @@ -7083,7 +7083,7 @@ macro FROM_MDS(Key, OUT{output}[], OUT_NOAUTO{output}[], OUTPUT_INCLUDES[], FILE ###requirements;hide ### Use resource described as .external file as [FROM_SANDBOX()](#macro_FROM_SANDBOX)/[FROM_MDS()](#macro_FROM_MDS). macro _FROM_EXTERNAL(File, OutFile, OUT{output}[], OUT_NOAUTO{output}[], OUTPUT_INCLUDES[], AUTOUPDATED="", PREFIX=".", RENAME[], EXECUTABLE?"--executable":"", EXT="ext:") { - .CMD=${hide:SANDBOX_FAKEID} ${cwd:BINDIR} ${resource;pre=$EXT;suf=.external:OutFile} $YMAKE_PYTHON ${input:"build/scripts/fetch_from_external.py"} --external-file ${input:File} --resource-file $(RESOURCE_ROOT)/ext/$OutFile --copy-to-dir $PREFIX ${pre=--rename :RENAME} $EXECUTABLE -- $OUT $OUT_NOAUTO ${input;hide:"build/scripts/fetch_from.py"} ${input;hide:"build/scripts/fetch_from_sandbox.py"} ${input;hide:"build/scripts/fetch_from_mds.py"} ${output_include;hide:OUTPUT_INCLUDES} ${output;hide:OUT} ${output;noauto;hide:OUT_NOAUTO} ${requirements;hide:"network:full"} ${kv;hide:"p XT"} ${kv;hide:"pc yellow"} ${kv;hide:"show_out"} + .CMD=${hide:SANDBOX_FAKEID} ${cwd:BINDIR} ${resource;pre=$EXT;suf=.external:OutFile} $YMAKE_PYTHON ${input:"build/scripts/fetch_from_external.py"} --external-file ${input:File} --resource-file $(RESOURCE_ROOT)/ext/$OutFile --copy-to-dir $PREFIX ${pre=--rename :RENAME} $EXECUTABLE -- $OUT $OUT_NOAUTO ${input;hide:"build/scripts/fetch_from.py"} ${input;hide:"build/scripts/fetch_from_sandbox.py"} ${input;hide:"build/scripts/fetch_from_mds.py"} ${output_include;hide:OUTPUT_INCLUDES} ${output;hide:OUT} ${output;noauto;hide:OUT_NOAUTO} ${requirements;hide:"network:full"} ${kv;hide:"p XT"} ${kv;hide:"pc yellow"} ${kv;hide:"show_out"} #FIXME: add '${resource;pre=$EXT:OutFile}' when support of the scheme is added to executors #FIXME: add 'ADD_CHECK(check.external $File)' when proper testing is implemented @@ -7409,7 +7409,7 @@ macro TASKLET_REG(Name, Lang, Impl, Includes...) { PEERDIR+=tasklet/runtime/js } - .CMD=$YMAKE_PYTHON ${input:"build/scripts/gen_tasklet_reg.py"} $Name -l $Lang -i $Impl ${output;noauto:Name.task.cpp} $Includes ${output_include;hide:Includes} $TASKLET_REG_INCLUDES ${kv;hide:"p TT"} ${kv;hide:"pc yellow"} + .CMD=$YMAKE_PYTHON ${input:"build/scripts/gen_tasklet_reg.py"} $Name -l $Lang -i $Impl ${output;noauto:Name.task.cpp} $Includes ${output_include;hide:Includes} $TASKLET_REG_INCLUDES ${kv;hide:"p TT"} ${kv;hide:"pc yellow"} SRCS(GLOBAL $Name.task.cpp) } @@ -7418,7 +7418,7 @@ macro TASKLET_REG(Name, Lang, Impl, Includes...) { macro TASKLET_REG_EXT(Name, Lang, Impl, Wrapper, Includes...) { PEERDIR(tasklet/domain sandbox/bin sandbox/taskbox/worker) - .CMD=$YMAKE_PYTHON ${input:"build/scripts/gen_tasklet_reg.py"} $Name -l $Lang -i $Impl -w $Wrapper ${output;noauto:Name.task.cpp} $Includes ${output_include;hide:Includes} $TASKLET_REG_INCLUDES ${kv;hide:"p TT"} ${kv;hide:"pc yellow"} + .CMD=$YMAKE_PYTHON ${input:"build/scripts/gen_tasklet_reg.py"} $Name -l $Lang -i $Impl -w $Wrapper ${output;noauto:Name.task.cpp} $Includes ${output_include;hide:Includes} $TASKLET_REG_INCLUDES ${kv;hide:"p TT"} ${kv;hide:"pc yellow"} SRCS(GLOBAL $Name.task.cpp) } diff --git a/build/ymake_conf.py b/build/ymake_conf.py index cbf37a8e44..30219eb85e 100755 --- a/build/ymake_conf.py +++ b/build/ymake_conf.py @@ -550,11 +550,11 @@ class Build(object): return self.build_type == 'coverage' @property - def is_sanitized(self): + def is_sanitized(self): sanitizer = preset('SANITIZER_TYPE') return bool(sanitizer) and not is_negative_str(sanitizer) - - @property + + @property def with_ndebug(self): return self.build_type in ('release', 'minsizerel', 'valgrind-release', 'profile', 'gprof', 'debugnoasserts') @@ -681,14 +681,14 @@ class Build(object): if isinstance(o, dict): return {un_unicode(k): un_unicode(v) for k, v in six.iteritems(o)} return o - + return un_unicode(json.loads(base64.b64decode(base64str))) - + class YMake(object): def __init__(self, arcadia): self.arcadia = arcadia - + def print_presets(self): presets = opts().presets if presets and 'YMAKE_JAVA_MODULES' not in presets: @@ -945,7 +945,7 @@ class ToolchainOptions(object): self.c_compiler = self.params['c_compiler'] self.cxx_compiler = self.params['cxx_compiler'] - + # TODO(somov): Требовать номер версии всегда. self.compiler_version = self.params.get('gcc_version') or self.params.get('version') or '0' self.compiler_version_list = list(map(int, self.compiler_version.split('.'))) @@ -1928,7 +1928,7 @@ class LD(Linker): self.ld_flags.append('-pg') # TODO(somov): Единое условие на coverage. - if self.build.is_coverage or is_positive('GCOV_COVERAGE') or is_positive('CLANG_COVERAGE') or self.build.is_sanitized: + if self.build.is_coverage or is_positive('GCOV_COVERAGE') or is_positive('CLANG_COVERAGE') or self.build.is_sanitized: self.use_stdlib = None self.ld_sdk = select(default=None, selectors=[ @@ -2834,7 +2834,7 @@ class Ragel(object): if isinstance(compiler, MSVCCompiler): self.set_default_flags(optimized=False) elif isinstance(compiler, GnuCompiler): - self.set_default_flags(optimized=build.is_release and not build.is_sanitized) + self.set_default_flags(optimized=build.is_release and not build.is_sanitized) else: raise ConfigureError('Unexpected compiler {}'.format(compiler)) diff --git a/certs/tests/ya.make b/certs/tests/ya.make index a169bef961..7064b67f51 100644 --- a/certs/tests/ya.make +++ b/certs/tests/ya.make @@ -5,12 +5,12 @@ OWNER( g:juggler ) -TEST_SRCS(test_fetch.py) +TEST_SRCS(test_fetch.py) TAG(ya:external) -REQUIREMENTS(network:full) - +REQUIREMENTS(network:full) + PEERDIR( library/python/resource certs diff --git a/contrib/libs/base64/neon32/ya.make b/contrib/libs/base64/neon32/ya.make index 857c4578c5..435b1127bb 100644 --- a/contrib/libs/base64/neon32/ya.make +++ b/contrib/libs/base64/neon32/ya.make @@ -20,7 +20,7 @@ SRCS( lib.c ) -IF (OS_LINUX OR OS_DARWIN OR OS_ANDROID) +IF (OS_LINUX OR OS_DARWIN OR OS_ANDROID) CONLYFLAGS(-std=c11) ENDIF() diff --git a/contrib/libs/base64/neon64/ya.make b/contrib/libs/base64/neon64/ya.make index 38a8a3b2a9..82d821b4ee 100644 --- a/contrib/libs/base64/neon64/ya.make +++ b/contrib/libs/base64/neon64/ya.make @@ -21,7 +21,7 @@ SRCS( ) IF (ARCH_AARCH64 OR ARCH_ARM64) - IF (OS_LINUX OR OS_DARWIN OR OS_ANDROID) + IF (OS_LINUX OR OS_DARWIN OR OS_ANDROID) CONLYFLAGS( -march=armv8-a -std=c11 diff --git a/contrib/libs/base64/plain32/ya.make b/contrib/libs/base64/plain32/ya.make index 5f0167919c..1f5a9ad204 100644 --- a/contrib/libs/base64/plain32/ya.make +++ b/contrib/libs/base64/plain32/ya.make @@ -20,7 +20,7 @@ SRCS( lib.c ) -IF (OS_LINUX OR OS_DARWIN) +IF (OS_LINUX OR OS_DARWIN) CONLYFLAGS(-std=c11) ENDIF() diff --git a/contrib/libs/base64/plain64/ya.make b/contrib/libs/base64/plain64/ya.make index 5f0167919c..1f5a9ad204 100644 --- a/contrib/libs/base64/plain64/ya.make +++ b/contrib/libs/base64/plain64/ya.make @@ -20,7 +20,7 @@ SRCS( lib.c ) -IF (OS_LINUX OR OS_DARWIN) +IF (OS_LINUX OR OS_DARWIN) CONLYFLAGS(-std=c11) ENDIF() diff --git a/contrib/libs/c-ares/ya.make b/contrib/libs/c-ares/ya.make index 79a528bb80..bd35762e44 100644 --- a/contrib/libs/c-ares/ya.make +++ b/contrib/libs/c-ares/ya.make @@ -36,12 +36,12 @@ CFLAGS( -DHAVE_CONFIG_H ) -IF (NOT DLL_FOR) +IF (NOT DLL_FOR) CFLAGS( -DCARES_STATICLIB ) -ENDIF() - +ENDIF() + IF (ARCH_ARM7) CFLAGS( GLOBAL -D__SIZEOF_LONG__=4 diff --git a/contrib/libs/crcutil/ya.make b/contrib/libs/crcutil/ya.make index 0ef06b2f64..2da8ef940f 100644 --- a/contrib/libs/crcutil/ya.make +++ b/contrib/libs/crcutil/ya.make @@ -11,11 +11,11 @@ OWNER( g:cpp-contrib ) -NO_UTIL() +NO_UTIL() NO_COMPILER_WARNINGS() -NO_JOIN_SRC() +NO_JOIN_SRC() IF (GCC AND USE_LTO) CFLAGS(-DCRCUTIL_FORCE_ASM_CRC32C=1) diff --git a/contrib/libs/cxxsupp/libcxx/ya.make b/contrib/libs/cxxsupp/libcxx/ya.make index 16b96f8aed..15403fe6d5 100644 --- a/contrib/libs/cxxsupp/libcxx/ya.make +++ b/contrib/libs/cxxsupp/libcxx/ya.make @@ -55,7 +55,7 @@ ELSEIF (OS_IOS) PEERDIR( contrib/libs/cxxsupp/builtins ) -ELSEIF (CLANG OR MUSL OR OS_DARWIN OR USE_LTO) +ELSEIF (CLANG OR MUSL OR OS_DARWIN OR USE_LTO) IF (ARCH_ARM7) # XXX: libcxxrt support for ARM is currently broken DEFAULT(CXX_RT "glibcxx_static") @@ -71,7 +71,7 @@ ELSEIF (CLANG OR MUSL OR OS_DARWIN OR USE_LTO) contrib/libs/musl/include ) ENDIF() -ELSEIF (OS_WINDOWS) +ELSEIF (OS_WINDOWS) SRCS( src/support/win32/locale_win32.cpp src/support/win32/support.cpp @@ -96,7 +96,7 @@ ELSE() ) ENDIF() -IF (OS_LINUX) +IF (OS_LINUX) EXTRALIBS(-lpthread) ENDIF() diff --git a/contrib/libs/fastlz/ya.make b/contrib/libs/fastlz/ya.make index c9d58182dd..7f31ac0bec 100644 --- a/contrib/libs/fastlz/ya.make +++ b/contrib/libs/fastlz/ya.make @@ -11,9 +11,9 @@ OWNER( g:cpp-contrib ) -NO_UTIL() +NO_UTIL() -NO_COMPILER_WARNINGS() +NO_COMPILER_WARNINGS() SRCS( fastlz.c diff --git a/contrib/libs/jemalloc/ya.make b/contrib/libs/jemalloc/ya.make index b08e639bfc..586de30ab0 100644 --- a/contrib/libs/jemalloc/ya.make +++ b/contrib/libs/jemalloc/ya.make @@ -23,7 +23,7 @@ ADDINCL( contrib/libs/libunwind/include ) -IF (OS_WINDOWS) +IF (OS_WINDOWS) ADDINCL( contrib/libs/jemalloc/include/msvc_compat ) diff --git a/contrib/libs/linuxvdso/original/ya.make b/contrib/libs/linuxvdso/original/ya.make index 3034d97822..c5b41c3586 100644 --- a/contrib/libs/linuxvdso/original/ya.make +++ b/contrib/libs/linuxvdso/original/ya.make @@ -9,11 +9,11 @@ OWNER( g:cpp-contrib ) -NO_UTIL() +NO_UTIL() -NO_RUNTIME() +NO_RUNTIME() -NO_COMPILER_WARNINGS() +NO_COMPILER_WARNINGS() SRCS( vdso_support.cc diff --git a/contrib/libs/linuxvdso/ya.make b/contrib/libs/linuxvdso/ya.make index e885599b4e..4da8d3d076 100644 --- a/contrib/libs/linuxvdso/ya.make +++ b/contrib/libs/linuxvdso/ya.make @@ -13,11 +13,11 @@ OWNER( g:cpp-contrib ) -NO_UTIL() +NO_UTIL() -NO_RUNTIME() +NO_RUNTIME() -IF (OS_LINUX) +IF (OS_LINUX) PEERDIR( contrib/libs/linuxvdso/original ) diff --git a/contrib/libs/lzmasdk/ya.make b/contrib/libs/lzmasdk/ya.make index 7082976c9a..db0a55788d 100644 --- a/contrib/libs/lzmasdk/ya.make +++ b/contrib/libs/lzmasdk/ya.make @@ -14,7 +14,7 @@ VERSION(19.00) CFLAGS(-D_7ZIP_ST=1) -NO_UTIL() +NO_UTIL() SRCS( 7zStream.c diff --git a/contrib/libs/pcre/ya.make b/contrib/libs/pcre/ya.make index 2c51df055b..85ae150697 100644 --- a/contrib/libs/pcre/ya.make +++ b/contrib/libs/pcre/ya.make @@ -25,7 +25,7 @@ ADDINCL( contrib/libs/pcre ) -NO_COMPILER_WARNINGS() +NO_COMPILER_WARNINGS() NO_RUNTIME() diff --git a/contrib/libs/protobuf/ya.make b/contrib/libs/protobuf/ya.make index 92a836099c..044e24badd 100644 --- a/contrib/libs/protobuf/ya.make +++ b/contrib/libs/protobuf/ya.make @@ -24,12 +24,12 @@ PEERDIR( contrib/libs/zlib ) -ADDINCL( +ADDINCL( GLOBAL contrib/libs/protobuf/src GLOBAL FOR proto contrib/libs/protobuf/src -) +) NO_COMPILER_WARNINGS() diff --git a/contrib/libs/re2/ya.make b/contrib/libs/re2/ya.make index 9b2256836c..8072de2eb2 100644 --- a/contrib/libs/re2/ya.make +++ b/contrib/libs/re2/ya.make @@ -15,10 +15,10 @@ LICENSE( LICENSE_TEXTS(.yandex_meta/licenses.list.txt) -ADDINCL( +ADDINCL( GLOBAL contrib/libs/re2/include contrib/libs/re2 -) +) NO_COMPILER_WARNINGS() diff --git a/contrib/libs/snappy/ya.make b/contrib/libs/snappy/ya.make index db48aff324..472daa0c80 100644 --- a/contrib/libs/snappy/ya.make +++ b/contrib/libs/snappy/ya.make @@ -16,7 +16,7 @@ ADDINCL( GLOBAL contrib/libs/snappy/include ) -NO_COMPILER_WARNINGS() +NO_COMPILER_WARNINGS() CFLAGS( -DHAVE_CONFIG_H diff --git a/contrib/libs/ya.make b/contrib/libs/ya.make index 4263f39684..9c4640fdcf 100644 --- a/contrib/libs/ya.make +++ b/contrib/libs/ya.make @@ -11,7 +11,7 @@ RECURSE( apr-util asio asmlib - authparser + authparser avs-device-sdk aws-sdk-cpp backtrace @@ -159,13 +159,13 @@ RECURSE( libidn2 libjpeg-turbo libjwt - liblinear + liblinear libm libmagic libmemcached libmp3lame libmysql_r - libogg + libogg libopendkim libopendmarc libosmium @@ -179,7 +179,7 @@ RECURSE( librosa-cpp librsvg libsamplerate - libsavi + libsavi libsodium libspf2 libsrtp @@ -231,7 +231,7 @@ RECURSE( mongo-cxx-driver msgpack muparser - muparser/tests + muparser/tests musl nanosvg nanosvg/ut @@ -342,11 +342,11 @@ RECURSE( trace_viewer tralics tree_sitter - uatraits + uatraits usrsctp utf8proc util-linux - valgrind + valgrind vlfeat vmaf wapiti @@ -369,27 +369,27 @@ RECURSE( zstd06 zzip ) - -IF (OS_FREEBSD OR OS_LINUX) - RECURSE( + +IF (OS_FREEBSD OR OS_LINUX) + RECURSE( asmglibc httpd mod_perl2 libeatmydata - ) + ) ENDIF() - -IF (OS_DARWIN) - RECURSE( + +IF (OS_DARWIN) + RECURSE( gperftools osxfuse macfuse-headers uuid - ) -ENDIF() - -IF (OS_LINUX) - RECURSE( + ) +ENDIF() + +IF (OS_LINUX) + RECURSE( ibdrv ibdrv/ut proc @@ -406,23 +406,23 @@ IF (OS_LINUX) systemd uuid virtiofsd - ) + ) ENDIF() - -IF (OS_WINDOWS) - RECURSE( - pthreads_win32 + +IF (OS_WINDOWS) + RECURSE( + pthreads_win32 dokany/dokan dokany/dokan_fuse - ) + ) ELSE() - RECURSE( + RECURSE( lftp unixodbc - ) + ) ENDIF() -IF (OS_LINUX OR OS_WINDOWS) +IF (OS_LINUX OR OS_WINDOWS) RECURSE( lockless ) diff --git a/contrib/libs/zlib/ya.make b/contrib/libs/zlib/ya.make index f1423e70c6..ced6573475 100644 --- a/contrib/libs/zlib/ya.make +++ b/contrib/libs/zlib/ya.make @@ -21,7 +21,7 @@ ADDINCL( GLOBAL contrib/libs/zlib/include ) -NO_COMPILER_WARNINGS() +NO_COMPILER_WARNINGS() NO_RUNTIME() diff --git a/contrib/python/ya.make b/contrib/python/ya.make index 87f3014f7f..d01ced9f3a 100644 --- a/contrib/python/ya.make +++ b/contrib/python/ya.make @@ -1,6 +1,6 @@ OWNER(g:contrib g:python-contrib) - -RECURSE( + +RECURSE( absl-py adblockparser aenum @@ -203,7 +203,7 @@ RECURSE( dbf_light debian-inspector decorator - deepdiff + deepdiff deepmerge defusedxml demjson @@ -333,10 +333,10 @@ RECURSE( editdistance elasticsearch elasticsearch-dsl - email-validator + email-validator emoji entrypoints - enum34 + enum34 environ-config environs envoy @@ -370,7 +370,7 @@ RECURSE( feedparser ffmpeg-python fido2 - filelock + filelock fingerprints fire flake8 @@ -506,7 +506,7 @@ RECURSE( idna idna-ssl ijson - imagesize + imagesize IMAPClient imgkit implicit @@ -592,7 +592,7 @@ RECURSE( lockfile logging-tree loguru - logutils + logutils luigi LunarCalendar lunardate @@ -820,7 +820,7 @@ RECURSE( Pygments pygrib pygtrie - PyHamcrest + PyHamcrest pyjavaproperties PyJWT pykdtree @@ -1005,13 +1005,13 @@ RECURSE( slackclient smart-open smmap - snappy + snappy sniffio snowballstemmer sobol-seq sockjs soft-webauthn - sortedcontainers + sortedcontainers soupsieve spacy spacy-legacy @@ -1050,13 +1050,13 @@ RECURSE( tableauserverclient tablib tabulate - tblib + tblib Telethon tenacity tensorflow-estimator termcolor terminado - terminaltables + terminaltables testpath text-unidecode textdata @@ -1124,7 +1124,7 @@ RECURSE( uwsgi/examples uwsgiconf validators - validr + validr vcrpy viberbot vine @@ -1185,7 +1185,7 @@ RECURSE( zope.interface zope.schema zstandard -) +) IF (OS_WINDOWS) RECURSE( diff --git a/contrib/tools/bison/gnulib/ya.make b/contrib/tools/bison/gnulib/ya.make index 4c27e96aad..b674fd9ada 100644 --- a/contrib/tools/bison/gnulib/ya.make +++ b/contrib/tools/bison/gnulib/ya.make @@ -20,7 +20,7 @@ ADDINCL( GLOBAL contrib/tools/bison/gnulib/src ) -IF (OS_WINDOWS) +IF (OS_WINDOWS) ADDINCL( GLOBAL contrib/tools/bison/gnulib/platform/win64 ) @@ -30,13 +30,13 @@ ELSE() ) ENDIF() -IF (OS_DARWIN) +IF (OS_DARWIN) CFLAGS( -D_XOPEN_SOURCE=600 ) ENDIF() -IF (NOT OS_WINDOWS) +IF (NOT OS_WINDOWS) CFLAGS( GLOBAL -Dregcomp=gnu_regcomp GLOBAL -Dregerror=gnu_regerror @@ -176,20 +176,20 @@ IF (NOT MUSL) ) ENDIF() -IF (NOT OS_LINUX) +IF (NOT OS_LINUX) SRCS( src/pipe2.c src/strverscmp.c ) ENDIF() -IF (NOT OS_WINDOWS) +IF (NOT OS_WINDOWS) SRCS( src/stdio-write.c ) ENDIF() -IF (OS_WINDOWS) +IF (OS_WINDOWS) SRCS( src/frexp.c src/wcrtomb.c @@ -228,14 +228,14 @@ IF (OS_WINDOWS) ) ENDIF() -IF (NOT OS_LINUX OR MUSL) +IF (NOT OS_LINUX OR MUSL) SRCS( src/obstack.c src/obstack_printf.c ) ENDIF() -IF (OS_CYGWIN OR OS_LINUX) +IF (OS_CYGWIN OR OS_LINUX) #not need it ELSE() SRCS( diff --git a/contrib/tools/ya.make b/contrib/tools/ya.make index a4224ac25e..750911c587 100644 --- a/contrib/tools/ya.make +++ b/contrib/tools/ya.make @@ -55,11 +55,11 @@ RECURSE( jdk/test xmllint ) - -IF (NOT OS_WINDOWS) - RECURSE( + +IF (NOT OS_WINDOWS) + RECURSE( ag lftp make - ) -ENDIF () + ) +ENDIF () diff --git a/library/cpp/accurate_accumulate/benchmark/metrics/ya.make b/library/cpp/accurate_accumulate/benchmark/metrics/ya.make index 2caf239ee6..5d532e1479 100644 --- a/library/cpp/accurate_accumulate/benchmark/metrics/ya.make +++ b/library/cpp/accurate_accumulate/benchmark/metrics/ya.make @@ -5,7 +5,7 @@ PY2TEST() SIZE(LARGE) TAG( - ya:force_sandbox + ya:force_sandbox sb:intel_e5_2660v1 ya:fat ) diff --git a/library/cpp/archive/ut/ya.make b/library/cpp/archive/ut/ya.make index ee3b6a3c76..4f324ccfc6 100644 --- a/library/cpp/archive/ut/ya.make +++ b/library/cpp/archive/ut/ya.make @@ -1,4 +1,4 @@ -UNITTEST() +UNITTEST() OWNER(pg) diff --git a/library/cpp/balloc/ya.make b/library/cpp/balloc/ya.make index bd7ed0d895..d4457fbba9 100644 --- a/library/cpp/balloc/ya.make +++ b/library/cpp/balloc/ya.make @@ -5,7 +5,7 @@ OWNER( g:base ) -NO_UTIL() +NO_UTIL() NO_COMPILER_WARNINGS() IF (OS_WINDOWS) diff --git a/library/cpp/build_info/build_info.cpp.in b/library/cpp/build_info/build_info.cpp.in index 2c9d9f99d2..71403af13e 100644 --- a/library/cpp/build_info/build_info.cpp.in +++ b/library/cpp/build_info/build_info.cpp.in @@ -1,5 +1,5 @@ #include <library/cpp/build_info/build_info.h> - -extern "C" const char* GetBuildType() { - return "@BUILD_TYPE@"; -} + +extern "C" const char* GetBuildType() { + return "@BUILD_TYPE@"; +} diff --git a/library/cpp/build_info/build_info.h b/library/cpp/build_info/build_info.h index e13f01f79b..a494870ba3 100644 --- a/library/cpp/build_info/build_info.h +++ b/library/cpp/build_info/build_info.h @@ -2,13 +2,13 @@ #include "sandbox.h" #include "build_info_static.h" - -#if defined(__cplusplus) -extern "C" { -#endif - + +#if defined(__cplusplus) +extern "C" { +#endif + const char* GetBuildType(); - -#if defined(__cplusplus) -} -#endif + +#if defined(__cplusplus) +} +#endif diff --git a/library/cpp/build_info/ya.make b/library/cpp/build_info/ya.make index c779480c30..99886a8893 100644 --- a/library/cpp/build_info/ya.make +++ b/library/cpp/build_info/ya.make @@ -1,10 +1,10 @@ LIBRARY() -OWNER( - mvel - snowball +OWNER( + mvel + snowball heretic -) +) DEFAULT(SANDBOX_TASK_ID 0) DEFAULT(KOSHER_SVN_VERSION "") @@ -17,7 +17,7 @@ PEERDIR( SRCS( sandbox.cpp.in - build_info.cpp.in + build_info.cpp.in build_info_static.cpp ) diff --git a/library/cpp/cache/ut/ya.make b/library/cpp/cache/ut/ya.make index 5ddbac0354..f660872369 100644 --- a/library/cpp/cache/ut/ya.make +++ b/library/cpp/cache/ut/ya.make @@ -1,4 +1,4 @@ -UNITTEST() +UNITTEST() OWNER( g:util diff --git a/library/cpp/codecs/ut/ya.make b/library/cpp/codecs/ut/ya.make index c55e65c9ab..90841b05ef 100644 --- a/library/cpp/codecs/ut/ya.make +++ b/library/cpp/codecs/ut/ya.make @@ -1,4 +1,4 @@ -UNITTEST() +UNITTEST() OWNER( g:base diff --git a/library/cpp/compproto/ut/ya.make b/library/cpp/compproto/ut/ya.make index 51998fbefd..f197a58269 100644 --- a/library/cpp/compproto/ut/ya.make +++ b/library/cpp/compproto/ut/ya.make @@ -1,4 +1,4 @@ -UNITTEST() +UNITTEST() OWNER(ironpeter) diff --git a/library/cpp/dns/ut/ya.make b/library/cpp/dns/ut/ya.make index 26680eee5e..7cfd0c4c32 100644 --- a/library/cpp/dns/ut/ya.make +++ b/library/cpp/dns/ut/ya.make @@ -1,4 +1,4 @@ -UNITTEST() +UNITTEST() OWNER( and42 diff --git a/library/cpp/enumbitset/ya.make b/library/cpp/enumbitset/ya.make index 9a2dd64bbc..86de91c816 100644 --- a/library/cpp/enumbitset/ya.make +++ b/library/cpp/enumbitset/ya.make @@ -1,6 +1,6 @@ LIBRARY() -OWNER(alzobnin) +OWNER(alzobnin) SRCS( enumbitset.cpp diff --git a/library/cpp/getopt/small/ya.make b/library/cpp/getopt/small/ya.make index e090eec08e..96de0f04b1 100644 --- a/library/cpp/getopt/small/ya.make +++ b/library/cpp/getopt/small/ya.make @@ -1,6 +1,6 @@ LIBRARY() -OWNER(pg) +OWNER(pg) PEERDIR( library/cpp/colorizer diff --git a/library/cpp/getopt/ut/ya.make b/library/cpp/getopt/ut/ya.make index 24303eb9ca..8d00669efb 100644 --- a/library/cpp/getopt/ut/ya.make +++ b/library/cpp/getopt/ut/ya.make @@ -1,6 +1,6 @@ UNITTEST_FOR(library/cpp/getopt) -OWNER(pg) +OWNER(pg) SRCS( last_getopt_ut.cpp diff --git a/library/cpp/getopt/ya.make b/library/cpp/getopt/ya.make index c7b195c73b..6df23b22b2 100644 --- a/library/cpp/getopt/ya.make +++ b/library/cpp/getopt/ya.make @@ -1,6 +1,6 @@ LIBRARY() -OWNER(pg) +OWNER(pg) PEERDIR( library/cpp/getopt/small diff --git a/library/cpp/json/writer/ut/ya.make b/library/cpp/json/writer/ut/ya.make index 4a64a4275c..1e39dae6a1 100644 --- a/library/cpp/json/writer/ut/ya.make +++ b/library/cpp/json/writer/ut/ya.make @@ -1,4 +1,4 @@ -UNITTEST() +UNITTEST() OWNER(myltsev) diff --git a/library/cpp/json/yson/json2yson_ut.cpp b/library/cpp/json/yson/json2yson_ut.cpp index eb372a179f..9eb23354cf 100644 --- a/library/cpp/json/yson/json2yson_ut.cpp +++ b/library/cpp/json/yson/json2yson_ut.cpp @@ -24,7 +24,7 @@ static TString GetRequestsWithDecoding(const TString& inputPath, const NBlockCod } Y_UNIT_TEST_SUITE(Json2Yson) { - Y_UNIT_TEST(NOAPACHE_REQUESTS) { + Y_UNIT_TEST(NOAPACHE_REQUESTS) { const ui32 warmUpRetries = 5; const TVector<double> percentiles = {0.25, 0.5, 0.6, 0.7, 0.75, 0.8, 0.85, 0.9, 0.95, 0.97, 0.99, 1.0}; diff --git a/library/cpp/lcs/ut/ya.make b/library/cpp/lcs/ut/ya.make index 63f2700b62..3d12898788 100644 --- a/library/cpp/lcs/ut/ya.make +++ b/library/cpp/lcs/ut/ya.make @@ -1,6 +1,6 @@ OWNER(velavokr) -UNITTEST() +UNITTEST() PEERDIR( ADDINCL library/cpp/lcs diff --git a/library/cpp/lfalloc/ya.make b/library/cpp/lfalloc/ya.make index 000cd1d89a..cace05f9d8 100644 --- a/library/cpp/lfalloc/ya.make +++ b/library/cpp/lfalloc/ya.make @@ -2,9 +2,9 @@ LIBRARY() OWNER(gulin) -NO_UTIL() +NO_UTIL() -NO_COMPILER_WARNINGS() +NO_COMPILER_WARNINGS() IF (ARCH_AARCH64) PEERDIR( diff --git a/library/cpp/lfalloc/yt/ya.make b/library/cpp/lfalloc/yt/ya.make index 58534f661b..8c1a4f8a72 100644 --- a/library/cpp/lfalloc/yt/ya.make +++ b/library/cpp/lfalloc/yt/ya.make @@ -2,9 +2,9 @@ LIBRARY() OWNER(a-romanov) -NO_UTIL() +NO_UTIL() -NO_COMPILER_WARNINGS() +NO_COMPILER_WARNINGS() IF (ARCH_AARCH64) PEERDIR( diff --git a/library/cpp/logger/ut/ya.make b/library/cpp/logger/ut/ya.make index e20b2d8d00..2a461c1353 100644 --- a/library/cpp/logger/ut/ya.make +++ b/library/cpp/logger/ut/ya.make @@ -1,4 +1,4 @@ -UNITTEST() +UNITTEST() OWNER(pg) diff --git a/library/cpp/malloc/api/helpers/ya.make b/library/cpp/malloc/api/helpers/ya.make index 3dda368c82..62875bca0e 100644 --- a/library/cpp/malloc/api/helpers/ya.make +++ b/library/cpp/malloc/api/helpers/ya.make @@ -1,6 +1,6 @@ LIBRARY() -OWNER(pg) +OWNER(pg) PEERDIR( library/cpp/malloc/api diff --git a/library/cpp/malloc/api/ut/ya.make b/library/cpp/malloc/api/ut/ya.make index b6b6620408..e57225b45d 100644 --- a/library/cpp/malloc/api/ut/ya.make +++ b/library/cpp/malloc/api/ut/ya.make @@ -1,4 +1,4 @@ -UNITTEST() +UNITTEST() OWNER(nga) diff --git a/library/cpp/malloc/api/ya.make b/library/cpp/malloc/api/ya.make index 87a8edcd32..0ebaa0c589 100644 --- a/library/cpp/malloc/api/ya.make +++ b/library/cpp/malloc/api/ya.make @@ -1,6 +1,6 @@ LIBRARY() -NO_UTIL() +NO_UTIL() OWNER(nga) diff --git a/library/cpp/malloc/jemalloc/ya.make b/library/cpp/malloc/jemalloc/ya.make index 0e99bf334b..99db474eab 100644 --- a/library/cpp/malloc/jemalloc/ya.make +++ b/library/cpp/malloc/jemalloc/ya.make @@ -1,6 +1,6 @@ LIBRARY() -NO_UTIL() +NO_UTIL() OWNER(nga) diff --git a/library/cpp/messagebus/rain_check/test/ut/ya.make b/library/cpp/messagebus/rain_check/test/ut/ya.make index e5b7aa9fc7..9f7a93417a 100644 --- a/library/cpp/messagebus/rain_check/test/ut/ya.make +++ b/library/cpp/messagebus/rain_check/test/ut/ya.make @@ -1,4 +1,4 @@ -PROGRAM(library-messagebus-rain_check-test-ut) +PROGRAM(library-messagebus-rain_check-test-ut) OWNER(g:messagebus) diff --git a/library/cpp/messagebus/rain_check/test/ya.make b/library/cpp/messagebus/rain_check/test/ya.make index 4e782be5c3..4c1d6f8161 100644 --- a/library/cpp/messagebus/rain_check/test/ya.make +++ b/library/cpp/messagebus/rain_check/test/ya.make @@ -1,5 +1,5 @@ OWNER(g:messagebus) - + RECURSE( perftest ut diff --git a/library/cpp/messagebus/rain_check/ya.make b/library/cpp/messagebus/rain_check/ya.make index f116c45918..966d54c232 100644 --- a/library/cpp/messagebus/rain_check/ya.make +++ b/library/cpp/messagebus/rain_check/ya.make @@ -1,5 +1,5 @@ OWNER(g:messagebus) - + RECURSE( core http diff --git a/library/cpp/messagebus/test/TestMessageBus.py b/library/cpp/messagebus/test/TestMessageBus.py index 863e9f0557..0bbaa0a313 100644 --- a/library/cpp/messagebus/test/TestMessageBus.py +++ b/library/cpp/messagebus/test/TestMessageBus.py @@ -5,4 +5,4 @@ from devtools.fleur.ytest.integration import UnitTestGroup @constraint('library.messagebus') class TestMessageBus(UnitTestGroup): def __init__(self, context): - UnitTestGroup.__init__(self, context, 'MessageBus', 'library-messagebus-test-ut') + UnitTestGroup.__init__(self, context, 'MessageBus', 'library-messagebus-test-ut') diff --git a/library/cpp/messagebus/test/ut/ya.make b/library/cpp/messagebus/test/ut/ya.make index 43e28f51b9..fe1b4961d6 100644 --- a/library/cpp/messagebus/test/ut/ya.make +++ b/library/cpp/messagebus/test/ut/ya.make @@ -5,7 +5,7 @@ UNITTEST_FOR(library/cpp/messagebus) TIMEOUT(1200) SIZE(LARGE) - + TAG( ya:not_autocheck ya:fat diff --git a/library/cpp/packers/ut/ya.make b/library/cpp/packers/ut/ya.make index 719841a77a..1c024ffd94 100644 --- a/library/cpp/packers/ut/ya.make +++ b/library/cpp/packers/ut/ya.make @@ -1,6 +1,6 @@ UNITTEST_FOR(library/cpp/packers) -OWNER(velavokr) +OWNER(velavokr) SRCS( packers_ut.cpp diff --git a/library/cpp/packers/ya.make b/library/cpp/packers/ya.make index d09f8e7b38..e1ec4972ed 100644 --- a/library/cpp/packers/ya.make +++ b/library/cpp/packers/ya.make @@ -1,6 +1,6 @@ LIBRARY() -OWNER(velavokr) +OWNER(velavokr) SRCS( packers.cpp diff --git a/library/cpp/regex/pire/ut/ya.make b/library/cpp/regex/pire/ut/ya.make index 9dafed8eae..8776695f40 100644 --- a/library/cpp/regex/pire/ut/ya.make +++ b/library/cpp/regex/pire/ut/ya.make @@ -1,6 +1,6 @@ # this test in not linked into build tree with ReCURSE and is built by unittest/library -UNITTEST() +UNITTEST() OWNER( g:util @@ -40,5 +40,5 @@ SIZE(MEDIUM) TIMEOUT(600) PIRE_INLINE(inline_ut.cpp) - + END() diff --git a/library/cpp/string_utils/base64/bench/metrics/ya.make b/library/cpp/string_utils/base64/bench/metrics/ya.make index 6ed5a554f3..b0406516c3 100644 --- a/library/cpp/string_utils/base64/bench/metrics/ya.make +++ b/library/cpp/string_utils/base64/bench/metrics/ya.make @@ -8,7 +8,7 @@ PY2TEST() SIZE(LARGE) TAG( - ya:force_sandbox + ya:force_sandbox sb:intel_e5_2660v1 ya:fat ) diff --git a/library/cpp/testing/benchmark/examples/metrics/ya.make b/library/cpp/testing/benchmark/examples/metrics/ya.make index 1456477d69..a9dbdca9fa 100644 --- a/library/cpp/testing/benchmark/examples/metrics/ya.make +++ b/library/cpp/testing/benchmark/examples/metrics/ya.make @@ -8,7 +8,7 @@ PY2TEST() SIZE(LARGE) TAG( - ya:force_sandbox + ya:force_sandbox sb:intel_e5_2660v1 ya:fat ) diff --git a/library/cpp/testing/unittest/ut/ya.make b/library/cpp/testing/unittest/ut/ya.make index c573099d2f..6d4c0959cc 100644 --- a/library/cpp/testing/unittest/ut/ya.make +++ b/library/cpp/testing/unittest/ut/ya.make @@ -1,6 +1,6 @@ UNITTEST_FOR(library/cpp/testing/unittest) -OWNER(snowball) +OWNER(snowball) SRCS( main.cpp diff --git a/library/cpp/unicode/normalization/ya.make b/library/cpp/unicode/normalization/ya.make index 1fcac57833..95bc93f297 100644 --- a/library/cpp/unicode/normalization/ya.make +++ b/library/cpp/unicode/normalization/ya.make @@ -1,6 +1,6 @@ LIBRARY() -NO_UTIL() +NO_UTIL() OWNER(alzobnin) diff --git a/library/cpp/xml/document/xml-document.cpp b/library/cpp/xml/document/xml-document.cpp index 0f2cb8459c..18a554d732 100644 --- a/library/cpp/xml/document/xml-document.cpp +++ b/library/cpp/xml/document/xml-document.cpp @@ -1,7 +1,7 @@ #include "xml-document.h" -#include <libxml/xinclude.h> -#include <libxml/xpathInternals.h> +#include <libxml/xinclude.h> +#include <libxml/xpathInternals.h> #include <library/cpp/xml/init/init.h> diff --git a/library/cpp/xml/init/init.cpp b/library/cpp/xml/init/init.cpp index 186891663e..aa96c2dd31 100644 --- a/library/cpp/xml/init/init.cpp +++ b/library/cpp/xml/init/init.cpp @@ -1,9 +1,9 @@ #include "init.h" -#include <libxml/xmlIO.h> -#include <libxml/parser.h> -#include <libxml/parserInternals.h> -#include <libxml/tree.h> +#include <libxml/xmlIO.h> +#include <libxml/parser.h> +#include <libxml/parserInternals.h> +#include <libxml/tree.h> #include <library/cpp/charset/recyr.hh> #include <util/generic/singleton.h> diff --git a/library/cpp/xml/init/ptr.h b/library/cpp/xml/init/ptr.h index 0103a17bfb..7387c7cc40 100644 --- a/library/cpp/xml/init/ptr.h +++ b/library/cpp/xml/init/ptr.h @@ -1,11 +1,11 @@ #pragma once #include <util/generic/ptr.h> -#include <libxml/tree.h> -#include <libxml/parser.h> -#include <libxml/xpath.h> -#include <libxml/xpathInternals.h> -#include <libxml/xmlsave.h> +#include <libxml/tree.h> +#include <libxml/parser.h> +#include <libxml/xpath.h> +#include <libxml/xpathInternals.h> +#include <libxml/xmlsave.h> #include <libxml/uri.h> #include <libxml/xmlschemas.h> diff --git a/library/python/fs/__init__.py b/library/python/fs/__init__.py index 19c0c7eded..b1b7cde079 100644 --- a/library/python/fs/__init__.py +++ b/library/python/fs/__init__.py @@ -1,5 +1,5 @@ -# coding: utf-8 - +# coding: utf-8 + import codecs import errno import logging @@ -162,10 +162,10 @@ def remove_tree_safe(path): os.remove(path) elif stat.S_ISDIR(st.st_mode): shutil.rmtree(fix_path_encoding(path), ignore_errors=True) - # XXX - except UnicodeDecodeError as e: - logging.exception(u'remove_tree_safe with argument %s raise exception: %s', path, e) - raise + # XXX + except UnicodeDecodeError as e: + logging.exception(u'remove_tree_safe with argument %s raise exception: %s', path, e) + raise except OSError: pass diff --git a/library/python/symbols/python/syms.cpp b/library/python/symbols/python/syms.cpp index b09538c61f..9b52574cb1 100644 --- a/library/python/symbols/python/syms.cpp +++ b/library/python/symbols/python/syms.cpp @@ -11,7 +11,7 @@ SYM(Py_IncRef) BEGIN_SYMS("python") SYM(PyObject_GetBuffer) SYM(PyBuffer_Release) -SYM(PyCell_New) +SYM(PyCell_New) SYM(Py_DecRef) SYM(Py_IncRef) END_SYMS() diff --git a/library/python/testing/yatest_common/yatest/common/canonical.py b/library/python/testing/yatest_common/yatest/common/canonical.py index 023a619fa1..b6a136d3e9 100644 --- a/library/python/testing/yatest_common/yatest/common/canonical.py +++ b/library/python/testing/yatest_common/yatest/common/canonical.py @@ -63,8 +63,8 @@ def canonical_execute( binary, args=None, check_exit_code=True, shell=False, timeout=None, cwd=None, env=None, stdin=None, stderr=None, creationflags=0, - file_name=None, save_locally=False, close_fds=False, - diff_tool=None, diff_file_name=None, diff_tool_timeout=None, + file_name=None, save_locally=False, close_fds=False, + diff_tool=None, diff_file_name=None, diff_tool_timeout=None, ): """ Shortcut to execute a binary and canonize its stdout @@ -81,7 +81,7 @@ def canonical_execute( :param file_name: output file name. if not specified program name will be used :param diff_tool: path to custome diff tool :param diff_file_name: custom diff file name to create when diff is found - :param diff_tool_timeout: timeout for running diff tool + :param diff_tool_timeout: timeout for running diff tool :return: object that can be canonized """ if type(binary) == list: @@ -98,10 +98,10 @@ def canonical_execute( del execute_args["save_locally"] del execute_args["diff_tool"] del execute_args["diff_file_name"] - del execute_args["diff_tool_timeout"] + del execute_args["diff_tool_timeout"] if not file_name and stdin: file_name = os.path.basename(stdin.name) - return _canonical_execute(process.execute, execute_args, file_name, save_locally, diff_tool, diff_file_name, diff_tool_timeout) + return _canonical_execute(process.execute, execute_args, file_name, save_locally, diff_tool, diff_file_name, diff_tool_timeout) def canonical_py_execute( @@ -109,7 +109,7 @@ def canonical_py_execute( shell=False, timeout=None, cwd=None, env=None, stdin=None, stderr=None, creationflags=0, file_name=None, save_locally=False, close_fds=False, - diff_tool=None, diff_file_name=None, diff_tool_timeout=None, + diff_tool=None, diff_file_name=None, diff_tool_timeout=None, ): """ Shortcut to execute a python script and canonize its stdout @@ -126,7 +126,7 @@ def canonical_py_execute( :param file_name: output file name. if not specified program name will be used :param diff_tool: path to custome diff tool :param diff_file_name: custom diff file name to create when diff is found - :param diff_tool_timeout: timeout for running diff tool + :param diff_tool_timeout: timeout for running diff tool :return: object that can be canonized """ command = [runtime.source_path(script_path)] + _prepare_args(args) @@ -139,8 +139,8 @@ def canonical_py_execute( del execute_args["save_locally"] del execute_args["diff_tool"] del execute_args["diff_file_name"] - del execute_args["diff_tool_timeout"] - return _canonical_execute(process.py_execute, execute_args, file_name, save_locally, diff_tool, diff_file_name, diff_tool_timeout) + del execute_args["diff_tool_timeout"] + return _canonical_execute(process.py_execute, execute_args, file_name, save_locally, diff_tool, diff_file_name, diff_tool_timeout) def _prepare_args(args): @@ -151,7 +151,7 @@ def _prepare_args(args): return args -def _canonical_execute(excutor, kwargs, file_name, save_locally, diff_tool, diff_file_name, diff_tool_timeout): +def _canonical_execute(excutor, kwargs, file_name, save_locally, diff_tool, diff_file_name, diff_tool_timeout): res = excutor(**kwargs) command = kwargs["command"] file_name = file_name or process.get_command_name(command) @@ -173,4 +173,4 @@ def _canonical_execute(excutor, kwargs, file_name, save_locally, diff_tool, diff with open(err_file_path, "wb") as err_file: err_file.write(res.std_err) - return canonical_file(out_file_path, local=save_locally, diff_tool=diff_tool, diff_file_name=diff_file_name, diff_tool_timeout=diff_tool_timeout) + return canonical_file(out_file_path, local=save_locally, diff_tool=diff_tool, diff_file_name=diff_file_name, diff_tool_timeout=diff_tool_timeout) diff --git a/library/python/testing/yatest_common/yatest/common/network.py b/library/python/testing/yatest_common/yatest/common/network.py index 67909e3a65..37bcb1b8e0 100644 --- a/library/python/testing/yatest_common/yatest/common/network.py +++ b/library/python/testing/yatest_common/yatest/common/network.py @@ -232,7 +232,7 @@ def get_ephemeral_range(): filename = "/proc/sys/net/ipv4/ip_local_port_range" if os.path.exists(filename): with open(filename) as afile: - data = afile.read(1024) # fix for musl + data = afile.read(1024) # fix for musl port_range = tuple(map(int, data.strip().split())) if len(port_range) == 2: return port_range diff --git a/library/ya.make b/library/ya.make index d311a075a8..86f833bd02 100644 --- a/library/ya.make +++ b/library/ya.make @@ -7,7 +7,7 @@ RECURSE( recipes #lemmer/byk/ut ) - + IF (NOT SANITIZER_TYPE) RECURSE( go diff --git a/tools/ya.make b/tools/ya.make index 4a6250f119..51a6b8b426 100644 --- a/tools/ya.make +++ b/tools/ya.make @@ -1,44 +1,44 @@ RECURSE( acceleo - arcdocidstrip - archiver + arcdocidstrip + archiver archiver/alignment_test archiver/tests base64 bigram_compiler - blender - bmdump + blender + bmdump bstr c++filt calendar_extractor check_formula_md5 check_json check_yaml - checktrigrams + checktrigrams clustermaster - coldiff + coldiff compress convert2html - cproxy + cproxy crc32 crx_creator curl_to_ab - diaprintkeys - directindexer + diaprintkeys + directindexer doc_handle_decode doc_handle_decode/ut doc_url_index_print - dolbilo + dolbilo domschemec domschemec/ut drawrichtree - dsindexer + dsindexer easyparser enforce_fsync enum_parser - event2cpp + event2cpp fast_diff - fastcksum + fastcksum filter_nonucs2 fix_elf fml_sweeper_api @@ -54,7 +54,7 @@ RECURSE( host_canonizer hostdump hostpire - html2cpp + html2cpp html2text idl idx_relemmatizer @@ -62,14 +62,14 @@ RECURSE( is_holiday jsv8 json_to_jsonlines - langdiscr-test + langdiscr-test lemmas_merger_builder - lemmer-test + lemmer-test lemmer-test/tests lenval_debug - lua - memcheck - mirrorsWrapper + lua + memcheck + mirrorsWrapper misc_index_print mkdocs_builder mkdocs_builder/arcadium_helper_plugin @@ -79,84 +79,84 @@ RECURSE( mtime0 mx_bin2info nehc - nlp_test - nodeiter_test + nlp_test + nodeiter_test nodeiter_test/tests - normalize_requests + normalize_requests nots oauth_token pgmigrate pire print_ranking_features printcorpus - printdocstat + printdocstat printdom - printkeys - printlinks + printkeys + printlinks printphones - printreqs + printreqs printreqs/tests - printrichnode + printrichnode printrichnode/tests printtrie - printurls - printwzrd + printurls + printwzrd printwzrd/scripts printwzrd/tests - printxmap - printxref + printxmap + printxref prngrp_index_print prog_rule protobin2mr - prwordsfr - pure_compiler + prwordsfr + pure_compiler pure_fingerprints pycron python-netconfig-static qlz - query_marker_builder + query_marker_builder queryrectest queryrectest/tests queryrectest/tests/data rcgtest - re_check - recode + re_check + recode refaww_index_print refdmap_index_print reflerf_index_print releaser - relev_fml_codegen - relev_fml_unused + relev_fml_codegen + relev_fml_unused remorphc remorphparser - rescompiler + rescompiler rescompressor rorescompiler sandboxctl - sanitizer + sanitizer segutils seinfo sent_index_print - showmime + showmime shutter_jing_plugin snipmake - spamfilt + spamfilt stdin - struct2fieldcalc + struct2fieldcalc syntaxer - tarccreate - tarcview + tarccreate + tarcview templater test_norm - test_relev - testlangmodel - thresher + test_relev + testlangmodel + thresher titleseq_index_print tokenize tokenize/tests tomaparsertest - trans_str - triecompiler + trans_str + triecompiler triecompiler/build_tool triecompiler/lib trie_ops @@ -164,8 +164,8 @@ RECURSE( trie_ops/tests trigram_index_print uc - unpackrichtree - unpackrrr + unpackrichtree + unpackrrr unpack_staff_cert untranslit_test untranslit_test/tests @@ -173,7 +173,7 @@ RECURSE( urlmenuindexer urlseq_print voice - webxmltest + webxmltest wizard_yt ygetparam ylzocat @@ -181,9 +181,9 @@ RECURSE( zk_client idx_print ) - -IF (NOT OS_WINDOWS) - RECURSE( - netgdb - ) + +IF (NOT OS_WINDOWS) + RECURSE( + netgdb + ) ENDIF() diff --git a/util/charset/benchmark/to_lower/metrics/ya.make b/util/charset/benchmark/to_lower/metrics/ya.make index d5ef20a534..5bb3461a8d 100644 --- a/util/charset/benchmark/to_lower/metrics/ya.make +++ b/util/charset/benchmark/to_lower/metrics/ya.make @@ -9,7 +9,7 @@ PY2TEST() SIZE(LARGE) TAG( - ya:force_sandbox + ya:force_sandbox sb:intel_e5_2660v1 ya:fat ) diff --git a/util/charset/benchmark/utf8_to_wide/metrics/ya.make b/util/charset/benchmark/utf8_to_wide/metrics/ya.make index 561a9d7908..c406e25bee 100644 --- a/util/charset/benchmark/utf8_to_wide/metrics/ya.make +++ b/util/charset/benchmark/utf8_to_wide/metrics/ya.make @@ -9,7 +9,7 @@ PY2TEST() SIZE(LARGE) TAG( - ya:force_sandbox + ya:force_sandbox sb:intel_e5_2660v1 ya:fat ) diff --git a/util/charset/ya.make b/util/charset/ya.make index 466c045ce8..26d38cb10b 100644 --- a/util/charset/ya.make +++ b/util/charset/ya.make @@ -3,7 +3,7 @@ LIBRARY() OWNER(g:util) SUBSCRIBER(g:util-subscribers) -NO_UTIL() +NO_UTIL() IF (TSTRING_IS_STD_STRING) CFLAGS(GLOBAL -DTSTRING_IS_STD_STRING) diff --git a/util/draft/ya.make b/util/draft/ya.make index 95054f15c8..e00674b682 100644 --- a/util/draft/ya.make +++ b/util/draft/ya.make @@ -3,7 +3,7 @@ LIBRARY() OWNER(g:util) SUBSCRIBER(g:util-subscribers) -NO_UTIL() +NO_UTIL() IF (TSTRING_IS_STD_STRING) CFLAGS(GLOBAL -DTSTRING_IS_STD_STRING) diff --git a/util/folder/path.h b/util/folder/path.h index 1ddcacd55a..2fb4d6b4ef 100644 --- a/util/folder/path.h +++ b/util/folder/path.h @@ -56,9 +56,9 @@ public: return Path_ == that.Path_; } - inline bool operator!=(const TFsPath& that) const { - return Path_ != that.Path_; - } + inline bool operator!=(const TFsPath& that) const { + return Path_ != that.Path_; + } TFsPath& operator/=(const TFsPath& that); diff --git a/util/folder/path_ut.cpp b/util/folder/path_ut.cpp index f640a92365..e6a3451016 100644 --- a/util/folder/path_ut.cpp +++ b/util/folder/path_ut.cpp @@ -400,14 +400,14 @@ Y_UNIT_TEST_SUITE(TFsPathTests) { UNIT_ASSERT_VALUES_EQUAL(JoinFsPaths("a\\b\\..\\c", "d"), "a\\c\\d"); UNIT_ASSERT_VALUES_EQUAL(JoinFsPaths("a", "b", "c", "d"), "a\\b\\c\\d"); UNIT_ASSERT_VALUES_EQUAL(JoinFsPaths("a\\b\\..\\c"), "a\\b\\..\\c"); - UNIT_ASSERT_VALUES_EQUAL(JoinFsPaths("a\\b", ""), "a\\b"); + UNIT_ASSERT_VALUES_EQUAL(JoinFsPaths("a\\b", ""), "a\\b"); #else UNIT_ASSERT_VALUES_EQUAL(JoinFsPaths("a/b", "c/d"), "a/b/c/d"); UNIT_ASSERT_VALUES_EQUAL(JoinFsPaths("a/b", "../c"), "a/b/../c"); UNIT_ASSERT_VALUES_EQUAL(JoinFsPaths("a/b/../c", "d"), "a/c/d"); UNIT_ASSERT_VALUES_EQUAL(JoinFsPaths("a", "b", "c", "d"), "a/b/c/d"); UNIT_ASSERT_VALUES_EQUAL(JoinFsPaths("a/b/../c"), "a/b/../c"); - UNIT_ASSERT_VALUES_EQUAL(JoinFsPaths("a/b", ""), "a/b"); + UNIT_ASSERT_VALUES_EQUAL(JoinFsPaths("a/b", ""), "a/b"); #endif } diff --git a/util/generic/benchmark/fastclp2/metrics/ya.make b/util/generic/benchmark/fastclp2/metrics/ya.make index 63805b3322..b2d17ebad3 100644 --- a/util/generic/benchmark/fastclp2/metrics/ya.make +++ b/util/generic/benchmark/fastclp2/metrics/ya.make @@ -9,7 +9,7 @@ PY2TEST() SIZE(LARGE) TAG( - ya:force_sandbox + ya:force_sandbox sb:intel_e5_2660v1 ya:fat ) diff --git a/util/generic/benchmark/log2/metrics/ya.make b/util/generic/benchmark/log2/metrics/ya.make index 8882caa144..eb987e38d2 100644 --- a/util/generic/benchmark/log2/metrics/ya.make +++ b/util/generic/benchmark/log2/metrics/ya.make @@ -9,7 +9,7 @@ PY2TEST() SIZE(LARGE) TAG( - ya:force_sandbox + ya:force_sandbox sb:intel_e5_2660v1 ya:fat ) diff --git a/util/generic/benchmark/rotate_bits/metrics/ya.make b/util/generic/benchmark/rotate_bits/metrics/ya.make index 91155cca68..ac27d2f845 100644 --- a/util/generic/benchmark/rotate_bits/metrics/ya.make +++ b/util/generic/benchmark/rotate_bits/metrics/ya.make @@ -9,7 +9,7 @@ PY2TEST() SIZE(LARGE) TAG( - ya:force_sandbox + ya:force_sandbox sb:intel_e5_2660v1 ya:fat ) diff --git a/util/generic/benchmark/vector_count_ctor/metrics/ya.make b/util/generic/benchmark/vector_count_ctor/metrics/ya.make index f9e9ed60a0..c48f89b564 100644 --- a/util/generic/benchmark/vector_count_ctor/metrics/ya.make +++ b/util/generic/benchmark/vector_count_ctor/metrics/ya.make @@ -9,7 +9,7 @@ PY2TEST() SIZE(LARGE) TAG( - ya:force_sandbox + ya:force_sandbox sb:intel_e5_2660v1 ya:fat ) diff --git a/util/generic/hash.h b/util/generic/hash.h index 47bbf11544..e46db21fa9 100644 --- a/util/generic/hash.h +++ b/util/generic/hash.h @@ -48,10 +48,10 @@ template <class Value, class Key, class HashFcn, class ExtractKey, class EqualKey, class Alloc> class THashTable; -template <class Key, class T, class HashFcn, - class EqualKey, typename size_type_f> -class sthash; - +template <class Key, class T, class HashFcn, + class EqualKey, typename size_type_f> +class sthash; + template <class Value> struct __yhashtable_iterator; diff --git a/util/memory/benchmark/pool/metrics/ya.make b/util/memory/benchmark/pool/metrics/ya.make index dbc6f1cae3..c671bc5c1c 100644 --- a/util/memory/benchmark/pool/metrics/ya.make +++ b/util/memory/benchmark/pool/metrics/ya.make @@ -6,7 +6,7 @@ PY2TEST() SIZE(LARGE) TAG( - ya:force_sandbox + ya:force_sandbox sb:intel_e5_2660v1 ya:fat ) diff --git a/util/network/ut/ya.make b/util/network/ut/ya.make index 0814bc2b4f..1ba03e167c 100644 --- a/util/network/ut/ya.make +++ b/util/network/ut/ya.make @@ -1,7 +1,7 @@ UNITTEST_FOR(util) -REQUIREMENTS(network:full) - +REQUIREMENTS(network:full) + OWNER(g:util) SUBSCRIBER(g:util-subscribers) diff --git a/util/random/benchmark/prng/metrics/ya.make b/util/random/benchmark/prng/metrics/ya.make index 8ff7a53419..1f56aac0bd 100644 --- a/util/random/benchmark/prng/metrics/ya.make +++ b/util/random/benchmark/prng/metrics/ya.make @@ -9,7 +9,7 @@ PY2TEST() SIZE(LARGE) TAG( - ya:force_sandbox + ya:force_sandbox sb:intel_e5_2660v1 ya:fat ) diff --git a/util/string/benchmark/float_to_string/metrics/ya.make b/util/string/benchmark/float_to_string/metrics/ya.make index 46791a6b93..4b8c4cc07d 100644 --- a/util/string/benchmark/float_to_string/metrics/ya.make +++ b/util/string/benchmark/float_to_string/metrics/ya.make @@ -9,7 +9,7 @@ PY2TEST() SIZE(LARGE) TAG( - ya:force_sandbox + ya:force_sandbox sb:intel_e5_2660v1 ya:fat ) diff --git a/util/string/benchmark/join/metrics/ya.make b/util/string/benchmark/join/metrics/ya.make index c30e133e18..08ff3a149f 100644 --- a/util/string/benchmark/join/metrics/ya.make +++ b/util/string/benchmark/join/metrics/ya.make @@ -9,7 +9,7 @@ PY2TEST() SIZE(LARGE) TAG( - ya:force_sandbox + ya:force_sandbox sb:intel_e5_2660v1 ya:fat ) diff --git a/util/string/benchmark/subst_global/metrics/ya.make b/util/string/benchmark/subst_global/metrics/ya.make index 15e1edb7b8..d8c30ad460 100644 --- a/util/string/benchmark/subst_global/metrics/ya.make +++ b/util/string/benchmark/subst_global/metrics/ya.make @@ -9,7 +9,7 @@ PY2TEST() SIZE(LARGE) TAG( - ya:force_sandbox + ya:force_sandbox sb:intel_e5_2660v1 ya:fat ) diff --git a/util/system/benchmark/cpu_id/metrics/ya.make b/util/system/benchmark/cpu_id/metrics/ya.make index b15a3230a0..8c55def99b 100644 --- a/util/system/benchmark/cpu_id/metrics/ya.make +++ b/util/system/benchmark/cpu_id/metrics/ya.make @@ -9,7 +9,7 @@ PY2TEST() SIZE(LARGE) TAG( - ya:force_sandbox + ya:force_sandbox sb:intel_e5_2660v1 ya:fat ) diff --git a/util/system/benchmark/create_destroy_thread/metrics/ya.make b/util/system/benchmark/create_destroy_thread/metrics/ya.make index 92a8b5752f..d526487e1a 100644 --- a/util/system/benchmark/create_destroy_thread/metrics/ya.make +++ b/util/system/benchmark/create_destroy_thread/metrics/ya.make @@ -9,7 +9,7 @@ PY2TEST() SIZE(LARGE) TAG( - ya:force_sandbox + ya:force_sandbox sb:intel_e5_2660v1 ya:fat ) diff --git a/util/system/fstat.cpp b/util/system/fstat.cpp index ea87835fc7..81e98cbc6b 100644 --- a/util/system/fstat.cpp +++ b/util/system/fstat.cpp @@ -15,7 +15,7 @@ #endif #define _S_IFLNK 0x80000000 -ui32 GetFileMode(DWORD fileAttributes) { +ui32 GetFileMode(DWORD fileAttributes) { ui32 mode = 0; if (fileAttributes == 0xFFFFFFFF) return mode; @@ -23,14 +23,14 @@ ui32 GetFileMode(DWORD fileAttributes) { mode |= _S_IFCHR; if (fileAttributes & FILE_ATTRIBUTE_REPARSE_POINT) mode |= _S_IFLNK; // todo: was undefined by the moment of writing this code - if (fileAttributes & FILE_ATTRIBUTE_DIRECTORY) + if (fileAttributes & FILE_ATTRIBUTE_DIRECTORY) mode |= _S_IFDIR; if (fileAttributes & (FILE_ATTRIBUTE_NORMAL | FILE_ATTRIBUTE_ARCHIVE)) mode |= _S_IFREG; if ((fileAttributes & FILE_ATTRIBUTE_READONLY) == 0) mode |= _S_IWRITE; return mode; -} +} #define S_ISDIR(st_mode) (st_mode & _S_IFDIR) #define S_ISREG(st_mode) (st_mode & _S_IFREG) @@ -42,8 +42,8 @@ using TSystemFStat = BY_HANDLE_FILE_INFORMATION; using TSystemFStat = struct stat; -#endif - +#endif + static void MakeStat(TFileStat& st, const TSystemFStat& fs) { #ifdef _unix_ st.Mode = fs.st_mode; diff --git a/util/system/shellcommand.cpp b/util/system/shellcommand.cpp index d071d8a4b3..b1989b5c8c 100644 --- a/util/system/shellcommand.cpp +++ b/util/system/shellcommand.cpp @@ -28,11 +28,11 @@ using TPid = pid_t; using TWaitResult = pid_t; using TExitStatus = int; #define WAIT_PROCEED 0 - + #if defined(_darwin_) -using TGetGroupListGid = int; +using TGetGroupListGid = int; #else -using TGetGroupListGid = gid_t; +using TGetGroupListGid = gid_t; #endif #elif defined(_win_) #include <string> @@ -57,31 +57,31 @@ namespace { constexpr static size_t DATA_BUFFER_SIZE = 128 * 1024; #if defined(_unix_) - void SetUserGroups(const passwd* pw) { - int ngroups = 1; + void SetUserGroups(const passwd* pw) { + int ngroups = 1; THolder<gid_t, TFree> groups = THolder<gid_t, TFree>(static_cast<gid_t*>(malloc(ngroups * sizeof(gid_t)))); - if (getgrouplist(pw->pw_name, pw->pw_gid, reinterpret_cast<TGetGroupListGid*>(groups.Get()), &ngroups) == -1) { - groups.Reset(static_cast<gid_t*>(malloc(ngroups * sizeof(gid_t)))); - if (getgrouplist(pw->pw_name, pw->pw_gid, reinterpret_cast<TGetGroupListGid*>(groups.Get()), &ngroups) == -1) { - ythrow TSystemError() << "getgrouplist failed: user " << pw->pw_name << " (" << pw->pw_uid << ")"; - } - } - if (setgroups(ngroups, groups.Get()) == -1) { - ythrow TSystemError(errno) << "Unable to set groups for user " << pw->pw_name << Endl; - } - } - - void ImpersonateUser(const TShellCommandOptions::TUserOptions& userOpts) { - if (GetUsername() == userOpts.Name) { + if (getgrouplist(pw->pw_name, pw->pw_gid, reinterpret_cast<TGetGroupListGid*>(groups.Get()), &ngroups) == -1) { + groups.Reset(static_cast<gid_t*>(malloc(ngroups * sizeof(gid_t)))); + if (getgrouplist(pw->pw_name, pw->pw_gid, reinterpret_cast<TGetGroupListGid*>(groups.Get()), &ngroups) == -1) { + ythrow TSystemError() << "getgrouplist failed: user " << pw->pw_name << " (" << pw->pw_uid << ")"; + } + } + if (setgroups(ngroups, groups.Get()) == -1) { + ythrow TSystemError(errno) << "Unable to set groups for user " << pw->pw_name << Endl; + } + } + + void ImpersonateUser(const TShellCommandOptions::TUserOptions& userOpts) { + if (GetUsername() == userOpts.Name) { return; } - const passwd* newUser = getpwnam(userOpts.Name.c_str()); + const passwd* newUser = getpwnam(userOpts.Name.c_str()); if (!newUser) { ythrow TSystemError(errno) << "getpwnam failed"; } - if (userOpts.UseUserGroups) { - SetUserGroups(newUser); - } + if (userOpts.UseUserGroups) { + SetUserGroups(newUser); + } if (setuid(newUser->pw_uid)) { ythrow TSystemError(errno) << "setuid failed"; } @@ -727,7 +727,7 @@ void TShellCommand::TImpl::OnFork(TPipes& pipes, sigset_t oldmask, char* const* } if (!User.Name.empty()) { - ImpersonateUser(User); + ImpersonateUser(User); } if (Nice) { diff --git a/util/system/shellcommand.h b/util/system/shellcommand.h index 977fa538cb..8730627fe5 100644 --- a/util/system/shellcommand.h +++ b/util/system/shellcommand.h @@ -21,14 +21,14 @@ public: #if defined(_win_) TString Password; #endif -#if defined(_unix_) - /** - * Run child process with the user supplementary groups. - * If true, the user supplementary groups will be set in the child process upon exec(). - * If false, the supplementary groups of the parent process will be used. - */ - bool UseUserGroups = false; -#endif +#if defined(_unix_) + /** + * Run child process with the user supplementary groups. + * If true, the user supplementary groups will be set in the child process upon exec(). + * If false, the supplementary groups of the parent process will be used. + */ + bool UseUserGroups = false; +#endif }; enum EHandleMode { @@ -66,7 +66,7 @@ public: } /** - * @brief clear signal mask from parent process. If true, child process + * @brief clear signal mask from parent process. If true, child process * clears the signal mask inherited from the parent process; otherwise * child process retains the signal mask of the parent process. * @@ -80,7 +80,7 @@ public: } /** - * @brief set close-on-exec mode. If true, all file descriptors + * @brief set close-on-exec mode. If true, all file descriptors * from the parent process, except stdin, stdout, stderr, will be closed * in the child process upon exec(). * @@ -415,22 +415,22 @@ public: TProcessId GetPid() const; /** - * @brief return the file handle that provides input to the child process - * + * @brief return the file handle that provides input to the child process + * * @return input file handle */ TFileHandle& GetInputHandle(); /** - * @brief return the file handle that provides output from the child process - * + * @brief return the file handle that provides output from the child process + * * @return output file handle */ TFileHandle& GetOutputHandle(); /** - * @brief return the file handle that provides error output from the child process - * + * @brief return the file handle that provides error output from the child process + * * @return error file handle */ TFileHandle& GetErrorHandle(); diff --git a/util/ya.make b/util/ya.make index 058e1f772d..6ebe7e40cf 100644 --- a/util/ya.make +++ b/util/ya.make @@ -5,7 +5,7 @@ SUBSCRIBER(g:util-subscribers) NEED_CHECK() -NO_UTIL() +NO_UTIL() # stream # string @@ -36,7 +36,7 @@ SRCS( string/cast.cpp ) -IF (OS_WINDOWS) +IF (OS_WINDOWS) SRCS( datetime/strptime.cpp ) @@ -72,7 +72,7 @@ JOIN_SRCS( folder/tempdir.cpp ) -IF (OS_WINDOWS) +IF (OS_WINDOWS) SRCS( folder/lstat_win.c folder/dirent_win.c @@ -327,7 +327,7 @@ JOIN_SRCS( SRC(system/compiler.cpp -fno-lto) -IF (OS_WINDOWS) +IF (OS_WINDOWS) SRCS( system/fs_win.cpp system/winint.cpp @@ -347,7 +347,7 @@ ELSE() ENDIF() ENDIF() -IF (OS_LINUX) +IF (OS_LINUX) SRCS( system/valgrind.cpp ) @@ -362,7 +362,7 @@ IF (MUSL) contrib/libs/linuxvdso ) ELSE() - IF (OS_LINUX OR SUN OR CYGWIN OR OS_WINDOWS) + IF (OS_LINUX OR SUN OR CYGWIN OR OS_WINDOWS) SRCS( system/mktemp_system.cpp ) diff --git a/ydb/core/blobstorage/crypto/ut/ya.make b/ydb/core/blobstorage/crypto/ut/ya.make index f16551644d..30ec24f750 100644 --- a/ydb/core/blobstorage/crypto/ut/ya.make +++ b/ydb/core/blobstorage/crypto/ut/ya.make @@ -2,7 +2,7 @@ UNITTEST_FOR(ydb/core/blobstorage/crypto) OWNER(g:kikimr) -IF (NOT OS_WINDOWS) +IF (NOT OS_WINDOWS) SRCS( chacha_ut.cpp chacha_vec_ut.cpp diff --git a/ydb/core/blobstorage/ut_blobstorage/ya.make b/ydb/core/blobstorage/ut_blobstorage/ya.make index 2fbfb778c9..efe91d91cd 100644 --- a/ydb/core/blobstorage/ut_blobstorage/ya.make +++ b/ydb/core/blobstorage/ut_blobstorage/ya.make @@ -22,7 +22,7 @@ SRCS( sync.cpp replication.cpp ) - + IF (BUILD_TYPE == "RELEASE") SRCS( big_cluster.cpp diff --git a/ydb/core/client/minikql_result_lib/ut/ya.make b/ydb/core/client/minikql_result_lib/ut/ya.make index 7a20dee74a..977bac4c9a 100644 --- a/ydb/core/client/minikql_result_lib/ut/ya.make +++ b/ydb/core/client/minikql_result_lib/ut/ya.make @@ -21,5 +21,5 @@ PEERDIR( YQL_LAST_ABI_VERSION() REQUIREMENTS(network:full ram:13) - + END() diff --git a/ydb/core/mind/bscontroller/ut_bscontroller/ya.make b/ydb/core/mind/bscontroller/ut_bscontroller/ya.make index 845dc82c9f..afe250e60f 100644 --- a/ydb/core/mind/bscontroller/ut_bscontroller/ya.make +++ b/ydb/core/mind/bscontroller/ut_bscontroller/ya.make @@ -2,10 +2,10 @@ UNITTEST() FORK_SUBTESTS() -OWNER( - alexvru - g:kikimr -) +OWNER( + alexvru + g:kikimr +) REQUIREMENTS( cpu:4 @@ -21,11 +21,11 @@ ELSE() TIMEOUT(600) ENDIF() -SRCS( - main.cpp -) +SRCS( + main.cpp +) -PEERDIR( +PEERDIR( ydb/core/base ydb/core/blobstorage ydb/core/blobstorage/base @@ -34,10 +34,10 @@ PEERDIR( ydb/core/protos ydb/core/testlib ydb/core/testlib/basics -) +) YQL_LAST_ABI_VERSION() -REQUIREMENTS(network:full) - +REQUIREMENTS(network:full) + END() diff --git a/ydb/core/tx/tx_proxy/ut_storage_tenant/ya.make b/ydb/core/tx/tx_proxy/ut_storage_tenant/ya.make index d03dc120af..3192b7f7d2 100644 --- a/ydb/core/tx/tx_proxy/ut_storage_tenant/ya.make +++ b/ydb/core/tx/tx_proxy/ut_storage_tenant/ya.make @@ -35,5 +35,5 @@ SRCS( ) REQUIREMENTS(ram:32) - + END() diff --git a/ydb/library/yql/minikql/benchmark/pack_num/metrics/ya.make b/ydb/library/yql/minikql/benchmark/pack_num/metrics/ya.make index 6213fd5102..203af2de49 100644 --- a/ydb/library/yql/minikql/benchmark/pack_num/metrics/ya.make +++ b/ydb/library/yql/minikql/benchmark/pack_num/metrics/ya.make @@ -9,7 +9,7 @@ PY2TEST() SIZE(LARGE) TAG( - ya:force_sandbox + ya:force_sandbox sb:intel_e5_2660v1 ya:fat ) |