X-Git-Url: https://git.ozlabs.org/?p=petitboot;a=blobdiff_plain;f=test%2Fparser%2FMakefile.am;h=af4fbd673221f4524e494b23e1ea592d996a2a76;hp=aa4591f9f2d707305e4b4f9e7e2e03c980d4de19;hb=e1a6f62162716511956417e6c103de37ce9c71d2;hpb=5d16719922866622fc0f42c570b9934f595e3c33 diff --git a/test/parser/Makefile.am b/test/parser/Makefile.am index aa4591f..af4fbd6 100644 --- a/test/parser/Makefile.am +++ b/test/parser/Makefile.am @@ -24,11 +24,21 @@ AM_CPPFLAGS = \ AM_CFLAGS = -O0 -ggdb -Wall -Wextra -Werror -TESTS = test-null +TESTS = test-null \ + test-grub2-single \ + test-grub2-multiple-resolve \ + test-grub2-f18-ppc64 \ + test-grub2-ubuntu-13_04-x86 \ + test-kboot-single \ + test-yaboot-single \ + test-yaboot-external \ + test-yaboot-rh8-ppc64 check_PROGRAMS = $(TESTS) check_LIBRARIES = $(test_libs) -check_DATA = +check_DATA = data/grub2-f18-ppc64.conf \ + data/grub2-ubuntu-13_04-x86.conf \ + data/yaboot-rh8-ppc64.conf common_libs = $(top_builddir)/lib/libpbcore.la test_libs = libtest.o @@ -37,7 +47,10 @@ libtest.o: $(libtest_o_OBJECTS) $(LD) -o $@ -r $^ # objects under test -parser_test_objs = $(top_srcdir)/discover/resource.c \ +parser_test_objs = $(top_srcdir)/discover/yaboot-parser.c \ + $(top_srcdir)/discover/kboot-parser.c \ + $(top_srcdir)/discover/grub2-parser.c \ + $(top_srcdir)/discover/resource.c \ $(top_srcdir)/discover/paths.c \ $(top_srcdir)/discover/device-handler.c \ $(top_srcdir)/discover/parser-conf.c @@ -47,5 +60,15 @@ LDADD = $(common_libs) $(test_libs) libtest_o_SOURCES = utils.c parser-test.h handler.c main.c $(parser_test_objs) +$(check_PROGRAMS): %: %.embedded-config.o +$(check_PROGRAMS): LDADD += $@.embedded-config.o -EXTRA_DIST = $(check_DATA) +extract_config = $(srcdir)/extract-config.awk + +%.embedded-config.c: %.c $(extract_config) + gawk --file=$(extract_config) $^ > $@ + +EXTRA_DIST = $(check_DATA) $(extract_config) + +CLEANFILES = $(foreach f, $(check_PROGRAMS), \ + $(f).embedded-config.c $(f).embedded-config.o)