File tree Expand file tree Collapse file tree 3 files changed +44
-1
lines changed
Expand file tree Collapse file tree 3 files changed +44
-1
lines changed Original file line number Diff line number Diff line change @@ -290,10 +290,26 @@ debug: plugin
290290demo : plugin
291291 $(INVOCATION_ENV_VARS ) $(srcdir ) ./gcc-with-cpychecker -c $(PYTHON_INCLUDES ) demo.c
292292
293+ # Run 'demo', and verify the output.
294+ testdemo : DEMO_REF=$(shell \
295+ if [ $$(./print-gcc-version ) -ge 7000 ]; then \
296+ echo demo.expected.no-refcounts; \
297+ else \
298+ echo demo.expected; \
299+ fi)
300+ testdemo : plugin print-gcc-version
301+ $(MAKE ) demo > demo.out 2> demo.err
302+ egrep ' ^demo.c:( In function |[0-9][0-9]*:[0-9][0-9]*: warning:)' \
303+ demo.err \
304+ | sed ' s/:[0-9][0-9]*: warning:/:: warning:/;s/ \[enabled by default\]//' \
305+ > demo.filtered
306+ diff $(DEMO_REF ) demo.filtered
307+ rm demo.out demo.err demo.filtered
308+
293309json-examples : plugin
294310 $(INVOCATION_ENV_VARS ) $(srcdir ) ./gcc-with-cpychecker -I/usr/include/python2.7 -c libcpychecker_html/test/example1/bug.c
295311
296- test-suite : plugin print-gcc-version testdejagnu
312+ test-suite : plugin print-gcc-version testdejagnu testdemo
297313 $(INVOCATION_ENV_VARS ) $(PYTHON ) run-test-suite.py
298314
299315show-ssa : plugin
Original file line number Diff line number Diff line change 1+ demo.c: In function ‘socket_htons’:
2+ demo.c:36:: warning: Mismatching type in call to PyArg_ParseTuple with format code "i:htons"
3+ demo.c: In function ‘not_enough_varargs’:
4+ demo.c:46:: warning: Not enough arguments in call to PyArg_ParseTuple with format string "i"
5+ demo.c: In function ‘too_many_varargs’:
6+ demo.c:56:: warning: Too many arguments in call to PyArg_ParseTuple with format string "i"
7+ demo.c: In function ‘kwargs_example’:
8+ demo.c:68:: warning: Mismatching type in call to PyArg_ParseTupleAndKeywords with format code "(ff):kwargs_example"
9+ demo.c:68:: warning: Mismatching type in call to PyArg_ParseTupleAndKeywords with format code "(ff):kwargs_example"
10+ demo.c: In function ‘buggy_converter’:
11+ demo.c:82:: warning: Mismatching type in call to PyArg_ParseTuple with format code "O&"
12+ demo.c: In function ‘make_a_list_of_random_ints_badly’:
13+ demo.c:96:: warning: Mismatching type in call to PyArg_ParseTuple with format code "i"
14+ demo.c:104:: warning: calling PyList_Append with NULL as argument 1 (list) at demo.c:104
Original file line number Diff line number Diff line change 1+ demo.c: In function ‘socket_htons’:
2+ demo.c:36:: warning: Mismatching type in call to PyArg_ParseTuple with format code "i:htons"
3+ demo.c: In function ‘not_enough_varargs’:
4+ demo.c:46:: warning: Not enough arguments in call to PyArg_ParseTuple with format string "i"
5+ demo.c: In function ‘too_many_varargs’:
6+ demo.c:56:: warning: Too many arguments in call to PyArg_ParseTuple with format string "i"
7+ demo.c: In function ‘kwargs_example’:
8+ demo.c:68:: warning: Mismatching type in call to PyArg_ParseTupleAndKeywords with format code "(ff):kwargs_example"
9+ demo.c:68:: warning: Mismatching type in call to PyArg_ParseTupleAndKeywords with format code "(ff):kwargs_example"
10+ demo.c: In function ‘buggy_converter’:
11+ demo.c:82:: warning: Mismatching type in call to PyArg_ParseTuple with format code "O&"
12+ demo.c: In function ‘make_a_list_of_random_ints_badly’:
13+ demo.c:96:: warning: Mismatching type in call to PyArg_ParseTuple with format code "i"
You can’t perform that action at this time.
0 commit comments