Bug 1588283 - Incorrect build failure reported by coverity when using inline definitions. r=bastien

Differential Revision: https://phabricator.services.mozilla.com/D50961

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Andi-Bogdan Postelnicu 2019-10-29 18:15:28 +00:00
Родитель 6728c0b9a9
Коммит 6cddfab802
1 изменённых файлов: 7 добавлений и 1 удалений

Просмотреть файл

@ -450,8 +450,14 @@ class StaticAnalysis(MachCommandBase):
# For each element in commands_list run `cov-translate`
for element in commands_list:
def transform_cmd(cmd):
# Coverity Analysis has a problem translating definitions passed as:
# '-DSOME_DEF="ValueOfAString"', please see Bug 1588283.
return [re.sub(r'\'-D(.*)="(.*)"\'', r'-D\1="\2"', arg) for arg in cmd]
cmd = [self.cov_translate, '--dir', self.cov_idir_path] + \
element['command'].split(' ')
transform_cmd(element['command'].split(' '))
if self.run_cov_command(cmd, element['directory']):
return 1