X-Git-Url: http://git.ozlabs.org/?p=petitboot;a=blobdiff_plain;f=test%2Fparser%2FMakefile.am;h=e221bf2080c1918084ad92e59ec77badc980be5f;hp=2e97fbe208e81ba5fa107ced54b1c1f2698a31bb;hb=15c8cadd1173f681142a3f48319a203d7b917850;hpb=e0a7cb18a4237aa826e5e121ff17373814a1872d diff --git a/test/parser/Makefile.am b/test/parser/Makefile.am index 2e97fbe..e221bf2 100644 --- a/test/parser/Makefile.am +++ b/test/parser/Makefile.am @@ -21,41 +21,69 @@ AM_CPPFLAGS = \ -DTEST_CONF_BASE='"$(srcdir)/data"' \ -DDEBUG -DPETITBOOT_TEST - AM_CFLAGS = -O0 -ggdb -Wall -Wextra -Werror -TESTS = test-null - -check_PROGRAMS = $(TESTS) -check_LIBRARIES = $(test_libs) -check_DATA = +LDADD = $(top_builddir)/lib/libpbcore.la libtest.ro + +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-partition \ + test-yaboot-partition-override \ + test-yaboot-external \ + test-yaboot-root-global \ + test-yaboot-root-override \ + test-yaboot-device-override \ + test-yaboot-default \ + test-yaboot-rh8-ppc64 \ + test-pxe-empty \ + test-pxe-single \ + test-pxe-initrd-in-append + +$(TESTS): %: %.embedded-config.o +$(TESTS): LDADD += $@.embedded-config.o -common_libs = $(top_builddir)/lib/libpbcore.la -test_libs = libtest.o +extract_config = $(srcdir)/extract-config.awk -libtest.o: $(libtest_o_OBJECTS) - $(LD) -o $@ -r $^ +%.embedded-config.c: %.c $(extract_config) + $(AWK) -f $(extract_config) $< > $@ # objects under test -parser_test_objs = $(top_srcdir)/discover/resource.c \ - $(top_srcdir)/discover/paths.c \ - $(top_srcdir)/discover/device-handler.c \ - $(top_srcdir)/discover/parser-conf.c - - -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 +parser_objs = \ + $(top_srcdir)/discover/yaboot-parser.c \ + $(top_srcdir)/discover/kboot-parser.c \ + $(top_srcdir)/discover/grub2-parser.c \ + $(top_srcdir)/discover/pxe-parser.c \ + $(top_srcdir)/discover/resource.c \ + $(top_srcdir)/discover/paths.c \ + $(top_srcdir)/discover/device-handler.c \ + $(top_srcdir)/discover/parser-conf.c + +libtest_ro_SOURCES = \ + main.c \ + utils.c \ + handler.c \ + parser-test.h \ + $(parser_objs) + +libtest.ro$(EXEEXT): $(libtest_ro_OBJECTS) + $(LD) -o $@ -r $^ -extract_config = $(srcdir)/extract-config.awk +check_PROGRAMS = $(TESTS) libtest.ro -%.embedded-config.c: %.c $(extract_config) - gawk --file=$(extract_config) $^ > $@ +check_DATA = \ + data/grub2-f18-ppc64.conf \ + data/grub2-ubuntu-13_04-x86.conf \ + data/yaboot-rh8-ppc64.conf EXTRA_DIST = $(check_DATA) $(extract_config) -CLEANFILES = $(foreach f, $(check_PROGRAMS), \ - $(f).embedded-config.c $(f).embedded-config.o) +CLEANFILES = \ + $(foreach f, $(TESTS), $(f).embedded-config.c $(f).embedded-config.o) + +MAINTAINERCLEANFILES = Makefile.in