diff options
author | alevitskii <alevitskii@yandex-team.com> | 2024-07-23 10:45:19 +0300 |
---|---|---|
committer | alevitskii <alevitskii@yandex-team.com> | 2024-07-23 11:02:04 +0300 |
commit | e368fb4c997be1bf6af58fe8f82d572e19e20007 (patch) | |
tree | 512547240fd24ffa7bae0c4b3ee6a050702e6e88 /build/plugins/_dart_fields.py | |
parent | 3768e8faf508c366fe31d91e34f1c94ccbf1151b (diff) | |
download | ydb-e368fb4c997be1bf6af58fe8f82d572e19e20007.tar.gz |
Fix nots test plugins
Fix nots test plugins
Фикс после отката в https://a.yandex-team.ru/review/6265741/details
1. В `_setup_tsc_typecheck` теперь `df.TestFiles.value7` вместо `df.TestFiles.value6`
2. В `_setup_eslint` теперь `df.TestFiles.value8` вместо `df.TestFiles.value6` и `flat_args = (test_type, "MODDIR")` вместо `flat_args = (test_type, "TS_TEST_FOR_PATH")`
4b229b102cfd73a6bbc7100b30e26c6ad0bb210a
Diffstat (limited to 'build/plugins/_dart_fields.py')
-rw-r--r-- | build/plugins/_dart_fields.py | 39 |
1 files changed, 8 insertions, 31 deletions
diff --git a/build/plugins/_dart_fields.py b/build/plugins/_dart_fields.py index 54f2427384..e25e20d148 100644 --- a/build/plugins/_dart_fields.py +++ b/build/plugins/_dart_fields.py @@ -219,15 +219,6 @@ def extract_java_system_properties(unit, args): return props, None -def _create_erm_json(unit): - from lib.nots.erm_json_lite import ErmJsonLite - - erm_packages_path = unit.get("ERM_PACKAGES_PATH") - path = unit.resolve(unit.resolve_arc_path(erm_packages_path)) - - return ErmJsonLite.load(path) - - def _resolve_module_files(unit, mod_dir, file_paths): mod_dir_with_sep_len = len(mod_dir) + 1 resolved_files = [] @@ -241,26 +232,6 @@ def _resolve_module_files(unit, mod_dir, file_paths): return resolved_files -def _create_pm(unit): - from lib.nots.package_manager import manager - - sources_path = unit.path() - module_path = unit.get("MODDIR") - if unit.get("TS_TEST_FOR"): - sources_path = unit.get("TS_TEST_FOR_DIR") - module_path = unit.get("TS_TEST_FOR_PATH") - - return manager( - sources_path=unit.resolve(sources_path), - build_root="$B", - build_path=unit.path().replace("$S", "$B", 1), - contribs_path=unit.get("NPM_CONTRIBS_PATH"), - nodejs_bin_path=None, - script_path=None, - module_path=module_path, - ) - - def _resolve_config_path(unit, test_runner, rel_to): config_path = unit.get("ESLINT_CONFIG_PATH") if test_runner == "eslint" else unit.get("TS_TEST_CONFIG_PATH") arc_config_path = unit.resolve_arc_path(config_path) @@ -402,7 +373,7 @@ class CustomDependencies: @classmethod def value5(cls, unit, flat_args, spec_args): - deps = _create_pm(unit).get_peers_from_package_json() + deps = flat_args[0] recipes_lines = format_recipes(unit.get("TEST_RECIPES_VALUE")).strip().splitlines() if recipes_lines: deps = deps or [] @@ -1014,6 +985,12 @@ class TestFiles: test_files = [_common.resolve_common_const(f) for f in typecheck_files] return {cls.KEY: serialize_list(test_files)} + @classmethod + def value8(cls, unit, flat_args, spec_args): + test_files = get_values_list(unit, "_TS_LINT_SRCS_VALUE") + test_files = _resolve_module_files(unit, unit.get("MODDIR"), test_files) + return {cls.KEY: serialize_list(test_files)} + class TestEnv: KEY = 'TEST-ENV' @@ -1147,7 +1124,7 @@ class TsResources: @classmethod def value(cls, unit, flat_args, spec_args): - erm_json = _create_erm_json(unit) + erm_json = spec_args['erm_json'] ret = {} for tool in erm_json.list_npm_packages(): tool_resource_label = cls.KEY.format(tool.upper()) |