diff options
author | spreis <spreis@yandex-team.com> | 2024-10-02 08:14:10 +0300 |
---|---|---|
committer | spreis <spreis@yandex-team.com> | 2024-10-02 08:26:24 +0300 |
commit | 11097c25778aa8dbd4cdec5d0b6eb02b6e44efbc (patch) | |
tree | cfd41005a4e01e52d9a2d78e8bc37d7aca7bdf34 /build | |
parent | f16f882b5f629a7b2be69e4209dd9913076c7168 (diff) | |
download | ydb-11097c25778aa8dbd4cdec5d0b6eb02b6e44efbc.tar.gz |
Fix source file path emission in RESOURCE_FILES
commit_hash:9115d73d37586182bb7fc9ba45235d78af8c3316
Diffstat (limited to 'build')
-rw-r--r-- | build/plugins/_common.py | 21 | ||||
-rw-r--r-- | build/plugins/res.py | 7 |
2 files changed, 26 insertions, 2 deletions
diff --git a/build/plugins/_common.py b/build/plugins/_common.py index e40798aaf8..7925543cd2 100644 --- a/build/plugins/_common.py +++ b/build/plugins/_common.py @@ -208,3 +208,24 @@ def get_no_lint_value(unit): if no_lint_value and no_lint_value not in supported_no_lint_values: ymake.report_configure_error('Unsupported value for NO_LINT macro: {}'.format(no_lint_value)) return no_lint_value + + +def ugly_conftest_exception(path): + """ + FIXME: + TAXICOMMON-9288: Taxi abused bug with absolute paths and built conftest descovery upon it + until the issue is filed let's limit impact only to existing files. + Never let this list grow!!! Fix issue before adding any new violating conftests + """ + exceptions = [ + 'taxi/uservices/userver-arc-utils/functional_tests/basic/conftest.py', + 'taxi/uservices/userver-arc-utils/functional_tests/basic_chaos/conftest.py', + 'taxi/uservices/userver-arc-utils/functional_tests/json2yaml/conftest.py', + ] + + if not path.endswith('conftest.py'): + return False + for e in exceptions: + if path.endswith(e): + return True + return False diff --git a/build/plugins/res.py b/build/plugins/res.py index 8dcea72d48..db931b4a49 100644 --- a/build/plugins/res.py +++ b/build/plugins/res.py @@ -1,7 +1,7 @@ import json import os import six -from _common import rootrel_arc_src +from _common import rootrel_arc_src, ugly_conftest_exception import ymake @@ -65,7 +65,10 @@ def onresource_files(unit, *args): ['warn', "Duplicated resource file {} in RESOURCE_FILES() macro. Skipped it.".format(path)] ) continue - src = 'resfs/src/{}={}'.format(key, rootrel_arc_src(path, unit)) + if not ugly_conftest_exception(path): + src = 'resfs/src/{}=${{rootrel;input;context=TEXT:"{}"}}'.format(key, path) + else: + src = 'resfs/src/{}={}'.format(key, rootrel_arc_src(path, unit)) res += ['-', src, path, key] if unit.enabled('_GO_MODULE'): |