]> git.ozlabs.org Git - petitboot/blob - test/parser/Makefile.am
discover/grub2: Add support for -s and -f commands
[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-single-line-if \
36         test-grub2-load-env \
37         test-grub2-save-env \
38         test-grub2-saved-default \
39         test-grub2-f18-ppc64 \
40         test-grub2-ubuntu-13_04-x86 \
41         test-grub2-lexer-error \
42         test-grub2-parser-error \
43         test-kboot-single \
44         test-yaboot-single \
45         test-yaboot-partition \
46         test-yaboot-partition-override \
47         test-yaboot-external \
48         test-yaboot-root-global \
49         test-yaboot-root-override \
50         test-yaboot-device-override \
51         test-yaboot-default \
52         test-yaboot-rh8-ppc64 \
53         test-pxe-empty \
54         test-pxe-single \
55         test-pxe-initrd-in-append \
56         test-pxe-mac-without-conf \
57         test-pxe-ip-without-conf \
58         test-pxe-non-url-conf \
59         test-pxe-local
60
61 $(TESTS): %: %.embedded-config.o
62 $(TESTS): LDADD += $@.embedded-config.o
63
64 extract_config = $(srcdir)/extract-config.awk
65
66 %.embedded-config.c: %.c $(extract_config)
67         $(AWK) -f $(extract_config) $< > $@
68
69 # objects under test
70 parser_objs = \
71         $(top_srcdir)/discover/yaboot-parser.c \
72         $(top_srcdir)/discover/kboot-parser.c \
73         $(top_srcdir)/discover/pxe-parser.c \
74         $(top_srcdir)/discover/resource.c \
75         $(top_srcdir)/discover/paths.c \
76         $(top_srcdir)/discover/device-handler.c \
77         $(top_srcdir)/discover/parser-conf.c \
78         $(top_srcdir)/discover/user-event.c \
79         $(top_srcdir)/discover/event.c
80
81 libtest_ro_SOURCES = \
82         main.c \
83         utils.c \
84         handler.c \
85         parser-test.h \
86         $(parser_objs)
87
88 libtest_ro_LDADD = \
89         ../../discover/grub2/grub2-parser.ro
90
91 libtest.ro$(EXEEXT): $(libtest_ro_OBJECTS) $(libtest_ro_LDADD)
92         $(LD) -o $@ -r $^
93
94 check_PROGRAMS = $(TESTS) libtest.ro
95
96 check_DATA = \
97         data/grub2-f18-ppc64.conf \
98         data/grub2-ubuntu-13_04-x86.conf \
99         data/yaboot-rh8-ppc64.conf
100
101 EXTRA_DIST = $(check_DATA) $(extract_config)
102
103 CLEANFILES = \
104         $(foreach f, $(TESTS), $(f).embedded-config.c $(f).embedded-config.o)
105
106 MAINTAINERCLEANFILES = Makefile.in