]> git.ozlabs.org Git - petitboot/blob - test/parser/Makefile.am
discover/grub2: Allow to separate the --id argument using a space char
[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 parser_TESTS = \
15         test/parser/test-null \
16         test/parser/test-grub2-single \
17         test/parser/test-grub2-default \
18         test/parser/test-grub2-empty \
19         test/parser/test-grub2-noeol \
20         test/parser/test-grub2-menuentry-formats \
21         test/parser/test-grub2-if-formats \
22         test/parser/test-grub2-default-id \
23         test/parser/test-grub2-default-id-space \
24         test/parser/test-grub2-default-index \
25         test/parser/test-grub2-default-multiword \
26         test/parser/test-grub2-implicit-default-unset \
27         test/parser/test-grub2-implicit-default-invalid \
28         test/parser/test-grub2-multiple-resolve \
29         test/parser/test-grub2-multiple-id \
30         test/parser/test-grub2-single-line-if \
31         test/parser/test-grub2-pos-param \
32         test/parser/test-grub2-load-env \
33         test/parser/test-grub2-save-env \
34         test/parser/test-grub2-save-env-dash-f \
35         test/parser/test-grub2-saved-default \
36         test/parser/test-grub2-nondefault-prefix \
37         test/parser/test-grub2-f18-ppc64 \
38         test/parser/test-grub2-f20-ppc64 \
39         test/parser/test-grub2-ubuntu-13_04-x86 \
40         test/parser/test-grub2-sles-btrfs-snapshot \
41         test/parser/test-grub2-lexer-error \
42         test/parser/test-grub2-parser-error \
43         test/parser/test-grub2-test-file-ops \
44         test/parser/test-grub2-single-yocto \
45         test/parser/test-grub2-blscfg-default-filename \
46         test/parser/test-grub2-blscfg-default-index \
47         test/parser/test-grub2-blscfg-default-title \
48         test/parser/test-grub2-blscfg-multiple-bls \
49         test/parser/test-grub2-blscfg-opts-config \
50         test/parser/test-grub2-blscfg-opts-grubenv \
51         test/parser/test-kboot-single \
52         test/parser/test-kboot-default \
53         test/parser/test-yaboot-empty \
54         test/parser/test-yaboot-single \
55         test/parser/test-yaboot-partition \
56         test/parser/test-yaboot-partition-override \
57         test/parser/test-yaboot-external \
58         test/parser/test-yaboot-root-global \
59         test/parser/test-yaboot-root-override \
60         test/parser/test-yaboot-device-override \
61         test/parser/test-yaboot-global-state \
62         test/parser/test-yaboot-leftovers \
63         test/parser/test-yaboot-default \
64         test/parser/test-yaboot-rh8-ppc64 \
65         test/parser/test-pxe-empty \
66         test/parser/test-pxe-single \
67         test/parser/test-pxe-initrd-in-append \
68         test/parser/test-pxe-mac-without-conf \
69         test/parser/test-pxe-ip-without-conf \
70         test/parser/test-pxe-ipxe \
71         test/parser/test-pxe-ipxe-named \
72         test/parser/test-pxe-ipxe-default \
73         test/parser/test-pxe-non-url-conf \
74         test/parser/test-pxe-local \
75         test/parser/test-pxe-ipappend \
76         test/parser/test-pxe-pathprefix-with-conf \
77         test/parser/test-pxe-non-url-pathprefix-with-conf \
78         test/parser/test-pxe-pathprefix-discover \
79         test/parser/test-pxe-pathprefix-discover-mac \
80         test/parser/test-pxe-pathprefix-port \
81         test/parser/test-pxe-path-resolve-relative \
82         test/parser/test-pxe-path-resolve-absolute \
83         test/parser/test-pxe-discover-bootfile-root \
84         test/parser/test-pxe-discover-bootfile-subdir \
85         test/parser/test-pxe-discover-bootfile-pathprefix \
86         test/parser/test-pxe-discover-bootfile-relative-conffile \
87         test/parser/test-pxe-discover-bootfile-absolute-conffile \
88         test/parser/test-pxe-discover-bootfile-async-file \
89         test/parser/test-unresolved-remove \
90         test/parser/test-syslinux-single-yocto \
91         test/parser/test-syslinux-global-append \
92         test/parser/test-syslinux-explicit \
93         test/parser/test-syslinux-nested-config \
94         test/parser/test-native-globals \
95         test/parser/test-native-short \
96         test/parser/test-native-simple \
97         test/parser/test-native-strings
98
99
100 TESTS += $(parser_TESTS)
101 check_PROGRAMS += $(parser_TESTS) test/parser/libtest.ro
102
103 check_DATA += \
104         test/parser/data/grub2-f18-ppc64.conf \
105         test/parser/data/grub2-f20-ppc.conf \
106         test/parser/data/grub2-ubuntu-13_04-x86.conf \
107         test/parser/data/yaboot-rh8-ppc64.conf \
108         test/parser/data/syslinux-include-root.cfg \
109         test/parser/data/syslinux-include-nest-1.cfg \
110         test/parser/data/syslinux-include-nest-2.cfg \
111         test/parser/data/native-short.conf
112
113 $(parser_TESTS): AM_CPPFLAGS += \
114                 -I$(top_srcdir)/discover \
115                 -DLOCAL_STATE_DIR='"$(localstatedir)"'
116 $(parser_TESTS): LDADD += $@.embedded-config.o test/parser/libtest.ro $(core_lib)
117 $(parser_TESTS): %: %.embedded-config.o test/parser/libtest.ro $(core_lib)
118
119 extract_config = $(srcdir)/test/parser/extract-config.awk
120
121 %.embedded-config.c: %.c $(extract_config)
122         $(AM_V_GEN)$(AWK) -f $(extract_config) $< > $@
123
124 # objects under test
125
126 test_parser_libtest_ro_SOURCES = \
127         test/parser/main.c \
128         test/parser/utils.c \
129         test/parser/handler.c \
130         test/parser/network.c \
131         test/parser/user-event.c \
132         test/parser/parser-test.h \
133         discover/yaboot-parser.c \
134         discover/kboot-parser.c \
135         discover/pxe-parser.c \
136         discover/syslinux-parser.c \
137         discover/platform.c \
138         discover/resource.c \
139         discover/paths.c \
140         discover/device-handler.c \
141         discover/parser-conf.c \
142         discover/user-event.c \
143         discover/event.c \
144         $(discover_grub2_grub2_parser_ro_SOURCES) \
145         $(discover_native_native_parser_ro_SOURCES)
146
147 test_parser_libtest_ro_CPPFLAGS = \
148         $(AM_CPPFLAGS) \
149         -I$(top_srcdir)/discover \
150         -I$(top_srcdir)/discover/grub2 \
151         -I$(top_builddir)/discover/grub2 \
152         -I$(top_srcdir)/discover/native \
153         -I$(top_builddir)/discover/native \
154         -DPETITBOOT_TEST \
155         -DLOCAL_STATE_DIR='"$(localstatedir)"' \
156         -DTEST_CONF_BASE='"$(top_srcdir)/test/parser/data"'
157
158 test/parser/libtest.ro$(EXEEXT): $(test_parser_libtest_ro_OBJECTS) \
159                                            $(test_parser_libtest_ro_LDADD)
160         $(AM_V_GEN)$(LD) -o $@ -r $^
161
162 EXTRA_DIST += $(check_DATA) $(extract_config)
163
164 CLEANFILES += \
165         $(foreach f, $(TESTS), $(f).embedded-config.c $(f).embedded-config.o)
166