davidmalcolm / gcc-python-plugin

GCC plugin that embeds CPython inside the compiler

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Failed tests: compound-locations, rich-location

dgiampouris opened this issue · comments

Hello David, I'm using the fixing-before-gcc-7 branch ( https://github.com/davidmalcolm/gcc-python-plugin/commit/10f197fe550e9d455e15dc88e896b55c6c3c7186 ).

System Details: Ubuntu 16.04 LTS, gcc 5.4, python 2.7.12

Make output:

300 successes; 2 failures; 0 skipped
Failed tests:
tests/plugin/compound-locations
tests/plugin/rich-location
Makefile:297: recipe for target 'test-suite' failed
make: *** [test-suite] Error 1

In detail:

tests/plugin/compound-locations: FAIL: tests/plugin/compound-locations/input.c:24: diagnostic not found
FAIL: tests/plugin/compound-locations/input.c:26: multiline range not found
FAIL: unexpected output on stderr: 'cc1: note: compound location\ntests/plugin/compound-locations/input.c:24:1: error: Unhandled Python exception raised within callback\n { return foo + bar; }\n ^\nTraceback (most recent call last):\n  File "tests/plugin/compound-locations/script.py", line 31, in on_pass_execution\n    assert compound.caret == caret\nAttributeError: \'gcc.Location\' object has no attribute \'caret\'\n'
FAIL: nonzero exit code
FAIL
tests/plugin/macros/correct: OK
tests/plugin/macros/too-early: OK
tests/cpychecker/refcounts/macros/Py_XDECREF/crash: OK
tests/plugin/namespace: OK
tests/plugin/rich-location: FAIL: tests/plugin/rich-location/input.c:23: diagnostic not found
FAIL: tests/plugin/rich-location/input.c:24: diagnostic not found
FAIL: unexpected output on stderr: 'tests/plugin/rich-location/input.c:23:1: error: Unhandled Python exception raised within callback\nTraceback (most recent call last):\n  File "tests/plugin/rich-location/script.py", line 27, in on_pass_execution\n    gcc.inform(gcc.RichLocation(fn.start),\nAttributeError: \'module\' object has no attribute \'RichLocation\'\n'
FAIL: nonzero exit code
FAIL

Seems to be related to #112

Yeah, sorry about that. I just read the code of the commit, it's obvious why rich-location fails as class rich_location was added to libcpp in gcc 6. .

Should be fixed by 606f4a6 (which simply excludes that test).