From fe281c98b1047832a3f59579f2c197f956224386 Mon Sep 17 00:00:00 2001 From: John Mark Bell Date: Thu, 26 Mar 2009 00:14:06 +0000 Subject: Attempt to integrate DOMTS stuff. This currently fails for two reasons: 1) XSLTProc doesn't like the input. 2) The build process bails before building any DOMTS tests. svn path=/trunk/dom/; revision=6890 --- test/Makefile | 42 ++++++++++++++++++------------------------ 1 file changed, 18 insertions(+), 24 deletions(-) (limited to 'test') diff --git a/test/Makefile b/test/Makefile index d9ca503..e4e42d5 100644 --- a/test/Makefile +++ b/test/Makefile @@ -1,4 +1,4 @@ -testlib_files := lib/comparators.c;lib/list.c;lib/testassert.c; +testlib_files := lib/comparators.c;lib/list.c;lib/testassert.c testlib_files := $(testlib_files);lib/testobject.c;lib/utils.c TESTCFLAGS := $(TESTCFLAGS) -I$(CURDIR) @@ -6,28 +6,22 @@ TESTCFLAGS := $(TESTCFLAGS) -I$(CURDIR) DIR_TEST_ITEMS := binding:binding.c;$(testlib_files) \ test-list:test-list.c;$(testlib_files) -include build/makefiles/Makefile.subdir +define add_xml_test + ifeq ($$(WANT_TEST),yes) + $(DIR)xml/c/$1.c: $(DIR)xml/tests/$1.xml + $$(Q)$$(XSLTPROC) $$(XSLTPROCFLAGS) -o $$@ \ + $(DIR)transform/test-to-c.xsl $$< + + DIR_TEST_ITEMS := $$(DIR_TEST_ITEMS) $1:xml/c/$1.c;$$(testlib_files) + endif + + DISTCLEAN_ITEMS := $$(DISTCLEAN_ITEMS) $(DIR)xml/c/$1.c -# TODO: XML suite -# -# Transformer input -#XMLFILES = $(wildcard xml/tests/*.xml) -# -# Transformer output -#CFILES = $(addprefix xml/c/, $(notdir $(XMLFILES:.xml=.c))) -# -# Objects -#XMLOBJS = $(addprefix xml/bin/, $(notdir $(XMLFILES:.xml=))) -# -#transform: $(CFILES) -# -# Pattern rules -#xml/bin/%: xml/c/%.c -# @${ECHO} ${ECHOFLAGS} "==> $<" -# @${CC} -c -g ${CFLAGS} -o $@.o $< -# @${LD} -g -o $@ $@.o ${LDFLAGS} $(LIBS) -# @${RM} ${RMFLAGS} $@.o -# -#xml/c/%.c: xml/tests/%.xml -# @${XSLT} ${XSLTFLAGS} -o $@ transform/test-to-c.xsl $< +endef + +# Add DOMTS tests to the list of items to build +$(eval $(foreach XML,$(wildcard $(DIR)xml/tests/*.xml), \ + $(call add_xml_test,$(basename $(notdir $(XML)))))) + +include build/makefiles/Makefile.subdir -- cgit v1.2.3