GRUB-1.98 changes
[grub2/jjazz.git] / conf / tests.mk
blobafad6cfa30012883100c349b947c5c8ea38d3f47
1 # -*- makefile -*-
2 # Generated by genmk.rb, please don't edit!
4 # For grub-shell
5 grub-shell: tests/util/grub-shell.in config.status
6 ./config.status --file=$@:$<
7 chmod +x $@
8 check_SCRIPTS += grub-shell
9 CLEANFILES += grub-shell
11 # For grub-shell-tester
12 grub-shell-tester: tests/util/grub-shell-tester.in config.status
13 ./config.status --file=$@:$<
14 chmod +x $@
15 check_SCRIPTS += grub-shell-tester
16 CLEANFILES += grub-shell-tester
18 pkglib_MODULES += functional_test.mod
19 functional_test_mod_SOURCES = tests/lib/functional_test.c tests/lib/test.c
21 clean-module-functional_test.mod.1:
22 rm -f functional_test.mod mod-functional_test.o mod-functional_test.c pre-functional_test.o functional_test_mod-tests_lib_functional_test.o functional_test_mod-tests_lib_test.o und-functional_test.lst
24 CLEAN_MODULE_TARGETS += clean-module-functional_test.mod.1
26 clean-module-functional_test.mod-symbol.1:
27 rm -f def-functional_test.lst
29 CLEAN_MODULE_TARGETS += clean-module-functional_test.mod-symbol.1
30 DEFSYMFILES += def-functional_test.lst
31 mostlyclean-module-functional_test.mod.1:
32 rm -f functional_test_mod-tests_lib_functional_test.d functional_test_mod-tests_lib_test.d
34 MOSTLYCLEAN_MODULE_TARGETS += mostlyclean-module-functional_test.mod.1
35 UNDSYMFILES += und-functional_test.lst
37 ifneq ($(TARGET_APPLE_CC),1)
38 functional_test.mod: pre-functional_test.o mod-functional_test.o $(TARGET_OBJ2ELF)
39 -rm -f $@
40 $(TARGET_CC) $(functional_test_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ pre-functional_test.o mod-functional_test.o
41 if test ! -z "$(TARGET_OBJ2ELF)"; then ./$(TARGET_OBJ2ELF) $@ || (rm -f $@; exit 1); fi
42 $(STRIP) --strip-unneeded -K grub_mod_init -K grub_mod_fini -K _grub_mod_init -K _grub_mod_fini -R .note -R .comment $@
43 else
44 functional_test.mod: pre-functional_test.o mod-functional_test.o $(TARGET_OBJ2ELF)
45 -rm -f $@
46 -rm -f $@.bin
47 $(TARGET_CC) $(functional_test_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@.bin pre-functional_test.o mod-functional_test.o
48 $(OBJCONV) -f$(TARGET_MODULE_FORMAT) -nr:_grub_mod_init:grub_mod_init -nr:_grub_mod_fini:grub_mod_fini -wd1106 -nu -nd $@.bin $@
49 -rm -f $@.bin
50 endif
52 pre-functional_test.o: $(functional_test_mod_DEPENDENCIES) functional_test_mod-tests_lib_functional_test.o functional_test_mod-tests_lib_test.o
53 -rm -f $@
54 $(TARGET_CC) $(functional_test_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ functional_test_mod-tests_lib_functional_test.o functional_test_mod-tests_lib_test.o
56 mod-functional_test.o: mod-functional_test.c
57 $(TARGET_CC) $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(functional_test_mod_CFLAGS) -c -o $@ $<
59 mod-functional_test.c: $(builddir)/moddep.lst $(srcdir)/genmodsrc.sh
60 sh $(srcdir)/genmodsrc.sh 'functional_test' $< > $@ || (rm -f $@; exit 1)
62 ifneq ($(TARGET_APPLE_CC),1)
63 def-functional_test.lst: pre-functional_test.o
64 $(NM) -g --defined-only -P -p $< | sed 's/^\([^ ]*\).*/\1 functional_test/' > $@
65 else
66 def-functional_test.lst: pre-functional_test.o
67 $(NM) -g -P -p $< | grep -E '^[a-zA-Z0-9_]* [TDS]' | sed 's/^\([^ ]*\).*/\1 functional_test/' > $@
68 endif
70 und-functional_test.lst: pre-functional_test.o
71 echo 'functional_test' > $@
72 $(NM) -u -P -p $< | cut -f1 -d' ' >> $@
74 functional_test_mod-tests_lib_functional_test.o: tests/lib/functional_test.c $(tests/lib/functional_test.c_DEPENDENCIES)
75 $(TARGET_CC) -Itests/lib -I$(srcdir)/tests/lib $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(functional_test_mod_CFLAGS) -MD -c -o $@ $<
76 -include functional_test_mod-tests_lib_functional_test.d
78 clean-module-functional_test_mod-tests_lib_functional_test-extra.1:
79 rm -f cmd-functional_test_mod-tests_lib_functional_test.lst fs-functional_test_mod-tests_lib_functional_test.lst partmap-functional_test_mod-tests_lib_functional_test.lst handler-functional_test_mod-tests_lib_functional_test.lst parttool-functional_test_mod-tests_lib_functional_test.lst video-functional_test_mod-tests_lib_functional_test.lst terminal-functional_test_mod-tests_lib_functional_test.lst
81 CLEAN_MODULE_TARGETS += clean-module-functional_test_mod-tests_lib_functional_test-extra.1
83 COMMANDFILES += cmd-functional_test_mod-tests_lib_functional_test.lst
84 FSFILES += fs-functional_test_mod-tests_lib_functional_test.lst
85 PARTTOOLFILES += parttool-functional_test_mod-tests_lib_functional_test.lst
86 PARTMAPFILES += partmap-functional_test_mod-tests_lib_functional_test.lst
87 HANDLERFILES += handler-functional_test_mod-tests_lib_functional_test.lst
88 TERMINALFILES += terminal-functional_test_mod-tests_lib_functional_test.lst
89 VIDEOFILES += video-functional_test_mod-tests_lib_functional_test.lst
91 cmd-functional_test_mod-tests_lib_functional_test.lst: tests/lib/functional_test.c $(tests/lib/functional_test.c_DEPENDENCIES) gencmdlist.sh
92 set -e; $(TARGET_CC) -Itests/lib -I$(srcdir)/tests/lib $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(functional_test_mod_CFLAGS) -E $< | sh $(srcdir)/gencmdlist.sh functional_test > $@ || (rm -f $@; exit 1)
94 fs-functional_test_mod-tests_lib_functional_test.lst: tests/lib/functional_test.c $(tests/lib/functional_test.c_DEPENDENCIES) genfslist.sh
95 set -e; $(TARGET_CC) -Itests/lib -I$(srcdir)/tests/lib $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(functional_test_mod_CFLAGS) -E $< | sh $(srcdir)/genfslist.sh functional_test > $@ || (rm -f $@; exit 1)
97 parttool-functional_test_mod-tests_lib_functional_test.lst: tests/lib/functional_test.c $(tests/lib/functional_test.c_DEPENDENCIES) genparttoollist.sh
98 set -e; $(TARGET_CC) -Itests/lib -I$(srcdir)/tests/lib $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(functional_test_mod_CFLAGS) -E $< | sh $(srcdir)/genparttoollist.sh functional_test > $@ || (rm -f $@; exit 1)
100 partmap-functional_test_mod-tests_lib_functional_test.lst: tests/lib/functional_test.c $(tests/lib/functional_test.c_DEPENDENCIES) genpartmaplist.sh
101 set -e; $(TARGET_CC) -Itests/lib -I$(srcdir)/tests/lib $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(functional_test_mod_CFLAGS) -E $< | sh $(srcdir)/genpartmaplist.sh functional_test > $@ || (rm -f $@; exit 1)
103 handler-functional_test_mod-tests_lib_functional_test.lst: tests/lib/functional_test.c $(tests/lib/functional_test.c_DEPENDENCIES) genhandlerlist.sh
104 set -e; $(TARGET_CC) -Itests/lib -I$(srcdir)/tests/lib $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(functional_test_mod_CFLAGS) -E $< | sh $(srcdir)/genhandlerlist.sh functional_test > $@ || (rm -f $@; exit 1)
106 terminal-functional_test_mod-tests_lib_functional_test.lst: tests/lib/functional_test.c $(tests/lib/functional_test.c_DEPENDENCIES) genterminallist.sh
107 set -e; $(TARGET_CC) -Itests/lib -I$(srcdir)/tests/lib $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(functional_test_mod_CFLAGS) -E $< | sh $(srcdir)/genterminallist.sh functional_test > $@ || (rm -f $@; exit 1)
109 video-functional_test_mod-tests_lib_functional_test.lst: tests/lib/functional_test.c $(tests/lib/functional_test.c_DEPENDENCIES) genvideolist.sh
110 set -e; $(TARGET_CC) -Itests/lib -I$(srcdir)/tests/lib $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(functional_test_mod_CFLAGS) -E $< | sh $(srcdir)/genvideolist.sh functional_test > $@ || (rm -f $@; exit 1)
112 functional_test_mod-tests_lib_test.o: tests/lib/test.c $(tests/lib/test.c_DEPENDENCIES)
113 $(TARGET_CC) -Itests/lib -I$(srcdir)/tests/lib $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(functional_test_mod_CFLAGS) -MD -c -o $@ $<
114 -include functional_test_mod-tests_lib_test.d
116 clean-module-functional_test_mod-tests_lib_test-extra.1:
117 rm -f cmd-functional_test_mod-tests_lib_test.lst fs-functional_test_mod-tests_lib_test.lst partmap-functional_test_mod-tests_lib_test.lst handler-functional_test_mod-tests_lib_test.lst parttool-functional_test_mod-tests_lib_test.lst video-functional_test_mod-tests_lib_test.lst terminal-functional_test_mod-tests_lib_test.lst
119 CLEAN_MODULE_TARGETS += clean-module-functional_test_mod-tests_lib_test-extra.1
121 COMMANDFILES += cmd-functional_test_mod-tests_lib_test.lst
122 FSFILES += fs-functional_test_mod-tests_lib_test.lst
123 PARTTOOLFILES += parttool-functional_test_mod-tests_lib_test.lst
124 PARTMAPFILES += partmap-functional_test_mod-tests_lib_test.lst
125 HANDLERFILES += handler-functional_test_mod-tests_lib_test.lst
126 TERMINALFILES += terminal-functional_test_mod-tests_lib_test.lst
127 VIDEOFILES += video-functional_test_mod-tests_lib_test.lst
129 cmd-functional_test_mod-tests_lib_test.lst: tests/lib/test.c $(tests/lib/test.c_DEPENDENCIES) gencmdlist.sh
130 set -e; $(TARGET_CC) -Itests/lib -I$(srcdir)/tests/lib $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(functional_test_mod_CFLAGS) -E $< | sh $(srcdir)/gencmdlist.sh functional_test > $@ || (rm -f $@; exit 1)
132 fs-functional_test_mod-tests_lib_test.lst: tests/lib/test.c $(tests/lib/test.c_DEPENDENCIES) genfslist.sh
133 set -e; $(TARGET_CC) -Itests/lib -I$(srcdir)/tests/lib $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(functional_test_mod_CFLAGS) -E $< | sh $(srcdir)/genfslist.sh functional_test > $@ || (rm -f $@; exit 1)
135 parttool-functional_test_mod-tests_lib_test.lst: tests/lib/test.c $(tests/lib/test.c_DEPENDENCIES) genparttoollist.sh
136 set -e; $(TARGET_CC) -Itests/lib -I$(srcdir)/tests/lib $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(functional_test_mod_CFLAGS) -E $< | sh $(srcdir)/genparttoollist.sh functional_test > $@ || (rm -f $@; exit 1)
138 partmap-functional_test_mod-tests_lib_test.lst: tests/lib/test.c $(tests/lib/test.c_DEPENDENCIES) genpartmaplist.sh
139 set -e; $(TARGET_CC) -Itests/lib -I$(srcdir)/tests/lib $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(functional_test_mod_CFLAGS) -E $< | sh $(srcdir)/genpartmaplist.sh functional_test > $@ || (rm -f $@; exit 1)
141 handler-functional_test_mod-tests_lib_test.lst: tests/lib/test.c $(tests/lib/test.c_DEPENDENCIES) genhandlerlist.sh
142 set -e; $(TARGET_CC) -Itests/lib -I$(srcdir)/tests/lib $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(functional_test_mod_CFLAGS) -E $< | sh $(srcdir)/genhandlerlist.sh functional_test > $@ || (rm -f $@; exit 1)
144 terminal-functional_test_mod-tests_lib_test.lst: tests/lib/test.c $(tests/lib/test.c_DEPENDENCIES) genterminallist.sh
145 set -e; $(TARGET_CC) -Itests/lib -I$(srcdir)/tests/lib $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(functional_test_mod_CFLAGS) -E $< | sh $(srcdir)/genterminallist.sh functional_test > $@ || (rm -f $@; exit 1)
147 video-functional_test_mod-tests_lib_test.lst: tests/lib/test.c $(tests/lib/test.c_DEPENDENCIES) genvideolist.sh
148 set -e; $(TARGET_CC) -Itests/lib -I$(srcdir)/tests/lib $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(functional_test_mod_CFLAGS) -E $< | sh $(srcdir)/genvideolist.sh functional_test > $@ || (rm -f $@; exit 1)
150 functional_test_mod_CFLAGS = $(COMMON_CFLAGS)
151 functional_test_mod_LDFLAGS = $(COMMON_LDFLAGS)
153 # Rules for unit tests
154 check_UTILITIES += example_unit_test
155 example_unit_test_SOURCES = tests/example_unit_test.c kern/list.c kern/misc.c tests/lib/test.c tests/lib/unit_test.c
157 clean-utility-example_unit_test.1:
158 rm -f example_unit_test$(EXEEXT) example_unit_test-tests_example_unit_test.o example_unit_test-kern_list.o example_unit_test-kern_misc.o example_unit_test-tests_lib_test.o example_unit_test-tests_lib_unit_test.o
160 CLEAN_UTILITY_TARGETS += clean-utility-example_unit_test.1
162 mostlyclean-utility-example_unit_test.1:
163 rm -f example_unit_test-tests_example_unit_test.d example_unit_test-kern_list.d example_unit_test-kern_misc.d example_unit_test-tests_lib_test.d example_unit_test-tests_lib_unit_test.d
165 MOSTLYCLEAN_UTILITY_TARGETS += mostlyclean-utility-example_unit_test.1
167 example_unit_test_OBJECTS += example_unit_test-tests_example_unit_test.o example_unit_test-kern_list.o example_unit_test-kern_misc.o example_unit_test-tests_lib_test.o example_unit_test-tests_lib_unit_test.o
169 example_unit_test-tests_example_unit_test.o: tests/example_unit_test.c $(tests/example_unit_test.c_DEPENDENCIES)
170 $(CC) -Itests -I$(srcdir)/tests $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(example_unit_test_CFLAGS) -MD -c -o $@ $<
171 -include example_unit_test-tests_example_unit_test.d
173 example_unit_test-kern_list.o: kern/list.c $(kern/list.c_DEPENDENCIES)
174 $(CC) -Ikern -I$(srcdir)/kern $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(example_unit_test_CFLAGS) -MD -c -o $@ $<
175 -include example_unit_test-kern_list.d
177 example_unit_test-kern_misc.o: kern/misc.c $(kern/misc.c_DEPENDENCIES)
178 $(CC) -Ikern -I$(srcdir)/kern $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(example_unit_test_CFLAGS) -MD -c -o $@ $<
179 -include example_unit_test-kern_misc.d
181 example_unit_test-tests_lib_test.o: tests/lib/test.c $(tests/lib/test.c_DEPENDENCIES)
182 $(CC) -Itests/lib -I$(srcdir)/tests/lib $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(example_unit_test_CFLAGS) -MD -c -o $@ $<
183 -include example_unit_test-tests_lib_test.d
185 example_unit_test-tests_lib_unit_test.o: tests/lib/unit_test.c $(tests/lib/unit_test.c_DEPENDENCIES)
186 $(CC) -Itests/lib -I$(srcdir)/tests/lib $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(example_unit_test_CFLAGS) -MD -c -o $@ $<
187 -include example_unit_test-tests_lib_unit_test.d
189 example_unit_test_CFLAGS = -Wno-format
191 # Rules for functional tests
192 pkglib_MODULES += example_functional_test.mod
193 example_functional_test_mod_SOURCES = tests/example_functional_test.c
195 clean-module-example_functional_test.mod.1:
196 rm -f example_functional_test.mod mod-example_functional_test.o mod-example_functional_test.c pre-example_functional_test.o example_functional_test_mod-tests_example_functional_test.o und-example_functional_test.lst
198 CLEAN_MODULE_TARGETS += clean-module-example_functional_test.mod.1
200 clean-module-example_functional_test.mod-symbol.1:
201 rm -f def-example_functional_test.lst
203 CLEAN_MODULE_TARGETS += clean-module-example_functional_test.mod-symbol.1
204 DEFSYMFILES += def-example_functional_test.lst
205 mostlyclean-module-example_functional_test.mod.1:
206 rm -f example_functional_test_mod-tests_example_functional_test.d
208 MOSTLYCLEAN_MODULE_TARGETS += mostlyclean-module-example_functional_test.mod.1
209 UNDSYMFILES += und-example_functional_test.lst
211 ifneq ($(TARGET_APPLE_CC),1)
212 example_functional_test.mod: pre-example_functional_test.o mod-example_functional_test.o $(TARGET_OBJ2ELF)
213 -rm -f $@
214 $(TARGET_CC) $(example_functional_test_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ pre-example_functional_test.o mod-example_functional_test.o
215 if test ! -z "$(TARGET_OBJ2ELF)"; then ./$(TARGET_OBJ2ELF) $@ || (rm -f $@; exit 1); fi
216 $(STRIP) --strip-unneeded -K grub_mod_init -K grub_mod_fini -K _grub_mod_init -K _grub_mod_fini -R .note -R .comment $@
217 else
218 example_functional_test.mod: pre-example_functional_test.o mod-example_functional_test.o $(TARGET_OBJ2ELF)
219 -rm -f $@
220 -rm -f $@.bin
221 $(TARGET_CC) $(example_functional_test_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@.bin pre-example_functional_test.o mod-example_functional_test.o
222 $(OBJCONV) -f$(TARGET_MODULE_FORMAT) -nr:_grub_mod_init:grub_mod_init -nr:_grub_mod_fini:grub_mod_fini -wd1106 -nu -nd $@.bin $@
223 -rm -f $@.bin
224 endif
226 pre-example_functional_test.o: $(example_functional_test_mod_DEPENDENCIES) example_functional_test_mod-tests_example_functional_test.o
227 -rm -f $@
228 $(TARGET_CC) $(example_functional_test_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ example_functional_test_mod-tests_example_functional_test.o
230 mod-example_functional_test.o: mod-example_functional_test.c
231 $(TARGET_CC) $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(example_functional_test_mod_CFLAGS) -c -o $@ $<
233 mod-example_functional_test.c: $(builddir)/moddep.lst $(srcdir)/genmodsrc.sh
234 sh $(srcdir)/genmodsrc.sh 'example_functional_test' $< > $@ || (rm -f $@; exit 1)
236 ifneq ($(TARGET_APPLE_CC),1)
237 def-example_functional_test.lst: pre-example_functional_test.o
238 $(NM) -g --defined-only -P -p $< | sed 's/^\([^ ]*\).*/\1 example_functional_test/' > $@
239 else
240 def-example_functional_test.lst: pre-example_functional_test.o
241 $(NM) -g -P -p $< | grep -E '^[a-zA-Z0-9_]* [TDS]' | sed 's/^\([^ ]*\).*/\1 example_functional_test/' > $@
242 endif
244 und-example_functional_test.lst: pre-example_functional_test.o
245 echo 'example_functional_test' > $@
246 $(NM) -u -P -p $< | cut -f1 -d' ' >> $@
248 example_functional_test_mod-tests_example_functional_test.o: tests/example_functional_test.c $(tests/example_functional_test.c_DEPENDENCIES)
249 $(TARGET_CC) -Itests -I$(srcdir)/tests $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(example_functional_test_mod_CFLAGS) -MD -c -o $@ $<
250 -include example_functional_test_mod-tests_example_functional_test.d
252 clean-module-example_functional_test_mod-tests_example_functional_test-extra.1:
253 rm -f cmd-example_functional_test_mod-tests_example_functional_test.lst fs-example_functional_test_mod-tests_example_functional_test.lst partmap-example_functional_test_mod-tests_example_functional_test.lst handler-example_functional_test_mod-tests_example_functional_test.lst parttool-example_functional_test_mod-tests_example_functional_test.lst video-example_functional_test_mod-tests_example_functional_test.lst terminal-example_functional_test_mod-tests_example_functional_test.lst
255 CLEAN_MODULE_TARGETS += clean-module-example_functional_test_mod-tests_example_functional_test-extra.1
257 COMMANDFILES += cmd-example_functional_test_mod-tests_example_functional_test.lst
258 FSFILES += fs-example_functional_test_mod-tests_example_functional_test.lst
259 PARTTOOLFILES += parttool-example_functional_test_mod-tests_example_functional_test.lst
260 PARTMAPFILES += partmap-example_functional_test_mod-tests_example_functional_test.lst
261 HANDLERFILES += handler-example_functional_test_mod-tests_example_functional_test.lst
262 TERMINALFILES += terminal-example_functional_test_mod-tests_example_functional_test.lst
263 VIDEOFILES += video-example_functional_test_mod-tests_example_functional_test.lst
265 cmd-example_functional_test_mod-tests_example_functional_test.lst: tests/example_functional_test.c $(tests/example_functional_test.c_DEPENDENCIES) gencmdlist.sh
266 set -e; $(TARGET_CC) -Itests -I$(srcdir)/tests $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(example_functional_test_mod_CFLAGS) -E $< | sh $(srcdir)/gencmdlist.sh example_functional_test > $@ || (rm -f $@; exit 1)
268 fs-example_functional_test_mod-tests_example_functional_test.lst: tests/example_functional_test.c $(tests/example_functional_test.c_DEPENDENCIES) genfslist.sh
269 set -e; $(TARGET_CC) -Itests -I$(srcdir)/tests $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(example_functional_test_mod_CFLAGS) -E $< | sh $(srcdir)/genfslist.sh example_functional_test > $@ || (rm -f $@; exit 1)
271 parttool-example_functional_test_mod-tests_example_functional_test.lst: tests/example_functional_test.c $(tests/example_functional_test.c_DEPENDENCIES) genparttoollist.sh
272 set -e; $(TARGET_CC) -Itests -I$(srcdir)/tests $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(example_functional_test_mod_CFLAGS) -E $< | sh $(srcdir)/genparttoollist.sh example_functional_test > $@ || (rm -f $@; exit 1)
274 partmap-example_functional_test_mod-tests_example_functional_test.lst: tests/example_functional_test.c $(tests/example_functional_test.c_DEPENDENCIES) genpartmaplist.sh
275 set -e; $(TARGET_CC) -Itests -I$(srcdir)/tests $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(example_functional_test_mod_CFLAGS) -E $< | sh $(srcdir)/genpartmaplist.sh example_functional_test > $@ || (rm -f $@; exit 1)
277 handler-example_functional_test_mod-tests_example_functional_test.lst: tests/example_functional_test.c $(tests/example_functional_test.c_DEPENDENCIES) genhandlerlist.sh
278 set -e; $(TARGET_CC) -Itests -I$(srcdir)/tests $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(example_functional_test_mod_CFLAGS) -E $< | sh $(srcdir)/genhandlerlist.sh example_functional_test > $@ || (rm -f $@; exit 1)
280 terminal-example_functional_test_mod-tests_example_functional_test.lst: tests/example_functional_test.c $(tests/example_functional_test.c_DEPENDENCIES) genterminallist.sh
281 set -e; $(TARGET_CC) -Itests -I$(srcdir)/tests $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(example_functional_test_mod_CFLAGS) -E $< | sh $(srcdir)/genterminallist.sh example_functional_test > $@ || (rm -f $@; exit 1)
283 video-example_functional_test_mod-tests_example_functional_test.lst: tests/example_functional_test.c $(tests/example_functional_test.c_DEPENDENCIES) genvideolist.sh
284 set -e; $(TARGET_CC) -Itests -I$(srcdir)/tests $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(example_functional_test_mod_CFLAGS) -E $< | sh $(srcdir)/genvideolist.sh example_functional_test > $@ || (rm -f $@; exit 1)
286 example_functional_test_mod_CFLAGS = -Wno-format $(COMMON_CFLAGS)
287 example_functional_test_mod_LDFLAGS = $(COMMON_LDFLAGS)
289 # Rules for scripted tests
290 check_SCRIPTS += example_scripted_test
291 example_scripted_test_SOURCES = tests/example_scripted_test.in
292 CLEANFILES += example_scripted_test
294 example_scripted_test: tests/example_scripted_test.in $(tests/example_scripted_test.in_DEPENDENCIES) config.status
295 ./config.status --file=-:tests/example_scripted_test.in | sed -e 's,@pkglib_DATA@,$(pkglib_DATA),g' > $@
296 chmod +x $@
299 check_SCRIPTS += example_grub_script_test
300 example_grub_script_test_SOURCES = tests/example_grub_script_test.in
301 CLEANFILES += example_grub_script_test
303 example_grub_script_test: tests/example_grub_script_test.in $(tests/example_grub_script_test.in_DEPENDENCIES) config.status
304 ./config.status --file=-:tests/example_grub_script_test.in | sed -e 's,@pkglib_DATA@,$(pkglib_DATA),g' > $@
305 chmod +x $@
309 # List of tests to execute on "make check"
310 SCRIPTED_TESTS = example_scripted_test
311 SCRIPTED_TESTS += example_grub_script_test
312 UNIT_TESTS = example_unit_test
313 FUNCTIONAL_TESTS = example_functional_test.mod
315 # dependencies between tests and testing-tools
316 $(SCRIPTED_TESTS): grub-shell grub-shell-tester
317 $(FUNCTIONAL_TESTS): functional_test.mod
319 example_unit_test: $(example_unit_test_DEPENDENCIES) $(example_unit_test_OBJECTS)
320 $(CC) -o $@ $(example_unit_test_OBJECTS) $(LDFLAGS) $(example_unit_test_LDFLAGS)