<div dir="ltr"><div><div><div>Source: diffoscope</div><div>Version: 90</div><div>Severity: normal</div></div><div><br></div><div>Test suite is failing on FreeBSD during the collecting phase:</div><div><br></div><div>______________________________<wbr>_________ ERROR collecting tests/comparators/test_elf.py ______________________________<wbr>_________<br>tests/comparators/test_elf.py:<wbr>64: in <module><br> @skip_if_tool_version_is('<wbr>readelf', readelf_version, '2.29')<br>tests/utils/tools.py:46: in skip_if_tool_version_is<br> vcls(str(actual_ver)) == vcls(str(target_ver)),<br>/usr/local/lib/python3.6/<wbr>distutils/version.py:46: in __eq__<br> c = self._cmp(other)<br>/usr/local/lib/python3.6/<wbr>distutils/version.py:337: in _cmp<br> if self.version < other.version:<br>E TypeError: '<' not supported between instances of 'str' and 'int'<br>!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!<wbr>!!!!!!!!!!!! Interrupted: 1 errors during collection !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!<wbr>!!!!!!!!!!!!!<br></div><div><br></div><div>The reason being the unexpected output format of `readelf --version` on FreeBSD:</div><div><br></div><div>readelf --version<br>
<br>readelf (elftoolchain r3561M)</div><div><br></div><div>On Ubuntu for example, the result is:</div><div><br></div><div>readelf --version<br>
<br>GNU readelf (GNU Binutils for Ubuntu) 2.29.1<br>Copyright (C) 2017 Free Software Foundation, Inc.<br>This program is free software; you may redistribute it under the terms of<br>the GNU General Public License version 3 or (at your option) any later version.<br>This program has absolutely no warranty.<br>
<br>Since the implementation of `skip_if_tool_version_is` is:</div><div><br></div><div>return out.decode('UTF-8').<wbr>splitlines()[0].split()[-1].<wbr>strip()</div><div><br></div><div>it will output the version as:<br><br>test_elf.py(46)readelf_<wbr>version()->'r3561M)'<br>
<br>which causes problems in this case.<br>
<br><br>
</div></div></div>