argh icon indicating copy to clipboard operation
argh copied to clipboard

Fix building tests on PPC

Open barracuda156 opened this issue 2 years ago • 3 comments

Without this the build fails badly with multiple assembler errors:

{standard input}:66102:Invalid mnemonic 'brk'

With the patch, all tests pass:

--->  Testing arghandler
Executing:  cd "/opt/local/var/macports/build/_opt_PPCRosettaPorts_devel_arghandler/arghandler/work/build" && ./argh_tests 
[doctest] doctest version is "2.4.6"
[doctest] run with "--help" for options
===============================================================================
[doctest] test cases:  29 |  29 passed | 0 failed | 0 skipped
[doctest] assertions: 367 | 367 passed | 0 failed |
[doctest] Status: SUCCESS!

P. S. I had to rename the port, since we already have argh in Macports.

barracuda156 avatar Jan 15 '23 18:01 barracuda156

Thanks for you PR!
doctest is a drop-in, header only, unit-testing framework.

I prefer not make changes (nor maintain) to its drop-in header file.

Maybe @onqtam or @Saalvage can comment on the change?

adishavit avatar Jan 16 '23 04:01 adishavit

@adishavit Well, it has a clearly wrong fallback code which breaks tests. But of course it is up to you :)

P. S. I will make a PR to upstream today, let it be fixed in general.

barracuda156 avatar Jan 16 '23 06:01 barracuda156

@adishavit Turned out it is there in doctest upstream: https://github.com/doctest/doctest/blob/86892fc480f80fb57d9a3926cb506c0e974489d8/doctest/doctest.h#L448

barracuda156 avatar Jan 16 '23 09:01 barracuda156