Skip to content

Commit 11097c2

Browse files
committed
Fix source file path emission in RESOURCE_FILES
commit_hash:9115d73d37586182bb7fc9ba45235d78af8c3316
1 parent f16f882 commit 11097c2

File tree

2 files changed

+26
-2
lines changed

2 files changed

+26
-2
lines changed

build/plugins/_common.py

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,3 +208,24 @@ def get_no_lint_value(unit):
208208
if no_lint_value and no_lint_value not in supported_no_lint_values:
209209
ymake.report_configure_error('Unsupported value for NO_LINT macro: {}'.format(no_lint_value))
210210
return no_lint_value
211+
212+
213+
def ugly_conftest_exception(path):
214+
"""
215+
FIXME:
216+
TAXICOMMON-9288: Taxi abused bug with absolute paths and built conftest descovery upon it
217+
until the issue is filed let's limit impact only to existing files.
218+
Never let this list grow!!! Fix issue before adding any new violating conftests
219+
"""
220+
exceptions = [
221+
'taxi/uservices/userver-arc-utils/functional_tests/basic/conftest.py',
222+
'taxi/uservices/userver-arc-utils/functional_tests/basic_chaos/conftest.py',
223+
'taxi/uservices/userver-arc-utils/functional_tests/json2yaml/conftest.py',
224+
]
225+
226+
if not path.endswith('conftest.py'):
227+
return False
228+
for e in exceptions:
229+
if path.endswith(e):
230+
return True
231+
return False

build/plugins/res.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import json
22
import os
33
import six
4-
from _common import rootrel_arc_src
4+
from _common import rootrel_arc_src, ugly_conftest_exception
55
import ymake
66

77

@@ -65,7 +65,10 @@ def onresource_files(unit, *args):
6565
['warn', "Duplicated resource file {} in RESOURCE_FILES() macro. Skipped it.".format(path)]
6666
)
6767
continue
68-
src = 'resfs/src/{}={}'.format(key, rootrel_arc_src(path, unit))
68+
if not ugly_conftest_exception(path):
69+
src = 'resfs/src/{}=${{rootrel;input;context=TEXT:"{}"}}'.format(key, path)
70+
else:
71+
src = 'resfs/src/{}={}'.format(key, rootrel_arc_src(path, unit))
6972
res += ['-', src, path, key]
7073

7174
if unit.enabled('_GO_MODULE'):

0 commit comments

Comments
 (0)