Skip to content

Commit ddb7cc9

Browse files
committed
testsuite: add mini-DejaGnu support
The existing testsuite over-specifies the results, making the tests rather "brittle". This patch attempts to provide a better way, by adding a mini reimplemenation of DejaGnu, used by test cases that have a "dg-do" within them.
1 parent b4668ed commit ddb7cc9

File tree

3 files changed

+446
-5
lines changed

3 files changed

+446
-5
lines changed

Makefile

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
# Copyright 2011, 2012, 2013 David Malcolm <dmalcolm@redhat.com>
2-
# Copyright 2011, 2012, 2013 Red Hat, Inc.
1+
# Copyright 2011-2013, 2017 David Malcolm <dmalcolm@redhat.com>
2+
# Copyright 2011-2013, 2017 Red Hat, Inc.
33
#
44
# This is free software: you can redistribute it and/or modify it
55
# under the terms of the GNU General Public License as published by
@@ -16,7 +16,7 @@
1616
# <http://www.gnu.org/licenses/>.
1717

1818
.PHONY: all clean debug dump_gimple plugin show-ssa tarball \
19-
test-suite testcpychecker testcpybuilder \
19+
test-suite testcpychecker testcpybuilder testdejagnu \
2020
man
2121

2222
PLUGIN_SOURCE_FILES= \
@@ -121,7 +121,7 @@ ifneq "$(PLUGIN_PYTHONPATH)" ""
121121
CPPFLAGS+= -DPLUGIN_PYTHONPATH='"$(PLUGIN_PYTHONPATH)"'
122122
endif
123123

124-
all: autogenerated-config.h testcpybuilder test-suite testcpychecker
124+
all: autogenerated-config.h testcpybuilder testdejagnu test-suite testcpychecker
125125

126126
# What still needs to be wrapped?
127127
api-report:
@@ -276,6 +276,10 @@ testcpychecker: plugin
276276
testcpybuilder:
277277
$(PYTHON) testcpybuilder.py -v
278278

279+
# Selftest for the dejagnu.py code:
280+
testdejagnu:
281+
$(PYTHON) dejagnu.py -v
282+
279283
dump_gimple:
280284
$(CC) -fdump-tree-gimple $(CURDIR)/test.c
281285

@@ -289,7 +293,7 @@ demo: plugin
289293
json-examples: plugin
290294
$(INVOCATION_ENV_VARS) $(srcdir)./gcc-with-cpychecker -I/usr/include/python2.7 -c libcpychecker_html/test/example1/bug.c
291295

292-
test-suite: plugin print-gcc-version
296+
test-suite: plugin print-gcc-version testdejagnu
293297
$(INVOCATION_ENV_VARS) $(PYTHON) run-test-suite.py
294298

295299
show-ssa: plugin

0 commit comments

Comments
 (0)