]> git.ozlabs.org Git - petitboot/blob - test/parser/Makefile.am
discover: Fix uninitialised var warnings
[petitboot] / test / parser / Makefile.am
1 #  This program is free software; you can redistribute it and/or modify
2 #  it under the terms of the GNU General Public License as published by
3 #  the Free Software Foundation; version 2 of the License.
4 #
5 #  This program is distributed in the hope that it will be useful,
6 #  but WITHOUT ANY WARRANTY; without even the implied warranty of
7 #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
8 #  GNU General Public License for more details.
9 #
10 #  You should have received a copy of the GNU General Public License
11 #  along with this program; if not, write to the Free Software
12 #  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
13
14 AUTOMAKE_OPTIONS = parallel-tests
15
16 AM_CPPFLAGS = \
17         -I$(top_srcdir) \
18         -I$(top_srcdir)/lib \
19         -I$(top_srcdir)/discover \
20         -DLOCAL_STATE_DIR='"$(localstatedir)"' \
21         -DTEST_CONF_BASE='"$(srcdir)/data"' \
22         -DDEBUG -DPETITBOOT_TEST
23
24 AM_CFLAGS = -O0 -ggdb -Wall -Wextra -Werror
25
26 LDADD = $(top_builddir)/lib/libpbcore.la libtest.ro
27
28 TESTS = \
29         test-null \
30         test-grub2-single \
31         test-grub2-default \
32         test-grub2-default-index \
33         test-grub2-default-multiword \
34         test-grub2-multiple-resolve \
35         test-grub2-multiple-id \
36         test-grub2-single-line-if \
37         test-grub2-load-env \
38         test-grub2-save-env \
39         test-grub2-saved-default \
40         test-grub2-nondefault-prefix \
41         test-grub2-f18-ppc64 \
42         test-grub2-f20-ppc64 \
43         test-grub2-ubuntu-13_04-x86 \
44         test-grub2-lexer-error \
45         test-grub2-parser-error \
46         test-kboot-single \
47         test-yaboot-empty \
48         test-yaboot-single \
49         test-yaboot-partition \
50         test-yaboot-partition-override \
51         test-yaboot-external \
52         test-yaboot-root-global \
53         test-yaboot-root-override \
54         test-yaboot-device-override \
55         test-yaboot-global-state \
56         test-yaboot-leftovers \
57         test-yaboot-default \
58         test-yaboot-rh8-ppc64 \
59         test-pxe-empty \
60         test-pxe-single \
61         test-pxe-initrd-in-append \
62         test-pxe-mac-without-conf \
63         test-pxe-ip-without-conf \
64         test-pxe-non-url-conf \
65         test-pxe-local \
66         test-pxe-pathprefix-with-conf \
67         test-pxe-non-url-pathprefix-with-conf \
68         test-pxe-pathprefix-discover \
69         test-pxe-pathprefix-discover-mac \
70         test-pxe-path-resolve-relative \
71         test-pxe-path-resolve-absolute \
72         test-pxe-discover-bootfile-root \
73         test-pxe-discover-bootfile-subdir \
74         test-pxe-discover-bootfile-pathprefix \
75         test-pxe-discover-bootfile-relative-conffile \
76         test-pxe-discover-bootfile-absolute-conffile \
77         test-unresolved-remove
78
79 $(TESTS): %: %.embedded-config.o
80 $(TESTS): LDADD += $@.embedded-config.o
81
82 extract_config = $(srcdir)/extract-config.awk
83
84 %.embedded-config.c: %.c $(extract_config)
85         $(AWK) -f $(extract_config) $< > $@
86
87 # objects under test
88 parser_objs = \
89         $(top_srcdir)/discover/yaboot-parser.c \
90         $(top_srcdir)/discover/kboot-parser.c \
91         $(top_srcdir)/discover/pxe-parser.c \
92         $(top_srcdir)/discover/platform.c \
93         $(top_srcdir)/discover/resource.c \
94         $(top_srcdir)/discover/paths.c \
95         $(top_srcdir)/discover/device-handler.c \
96         $(top_srcdir)/discover/parser-conf.c \
97         $(top_srcdir)/discover/user-event.c \
98         $(top_srcdir)/discover/event.c
99
100 libtest_ro_SOURCES = \
101         main.c \
102         utils.c \
103         handler.c \
104         parser-test.h \
105         $(parser_objs)
106
107 libtest_ro_LDADD = \
108         ../../discover/grub2/grub2-parser.ro
109
110 libtest.ro$(EXEEXT): $(libtest_ro_OBJECTS) $(libtest_ro_LDADD)
111         $(LD) -o $@ -r $^
112
113 check_PROGRAMS = $(TESTS) libtest.ro
114
115 check_DATA = \
116         data/grub2-f18-ppc64.conf \
117         data/grub2-f20-ppc.conf \
118         data/grub2-ubuntu-13_04-x86.conf \
119         data/yaboot-rh8-ppc64.conf
120
121 EXTRA_DIST = $(check_DATA) $(extract_config)
122
123 CLEANFILES = \
124         $(foreach f, $(TESTS), $(f).embedded-config.c $(f).embedded-config.o)
125
126 MAINTAINERCLEANFILES = Makefile.in