From 824a6db3ff111f8d2427ac5adad0362bf078630a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Gustavsson?= Date: Thu, 2 Sep 2010 15:44:33 +0200 Subject: Add test suite for xmerl --- lib/xmerl/test/Makefile | 129 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 129 insertions(+) create mode 100644 lib/xmerl/test/Makefile (limited to 'lib/xmerl/test/Makefile') diff --git a/lib/xmerl/test/Makefile b/lib/xmerl/test/Makefile new file mode 100644 index 0000000000..775e323dd4 --- /dev/null +++ b/lib/xmerl/test/Makefile @@ -0,0 +1,129 @@ +# +# %CopyrightBegin% +# +# Copyright Ericsson AB 2004-2010. All Rights Reserved. +# +# The contents of this file are subject to the Erlang Public License, +# Version 1.1, (the "License"); you may not use this file except in +# compliance with the License. You should have received a copy of the +# Erlang Public License along with this software. If not, it can be +# retrieved online at http://www.erlang.org/. +# +# Software distributed under the License is distributed on an "AS IS" +# basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See +# the License for the specific language governing rights and limitations +# under the License. +# +# %CopyrightEnd% +# +include $(ERL_TOP)/make/target.mk +include $(ERL_TOP)/make/$(TARGET)/otp.mk + +# ---------------------------------------------------- +# Common Macros +# ---------------------------------------------------- + +include ../vsn.mk +VSN = $(XMERL_VSN) + +RM = rm -f + +# ---------------------------------------------------- +# Target Specs +# ---------------------------------------------------- + +HRL_DIR= $(ERL_TOP)/lib/xmerl/include/ +HRL_MODULES= $(HRL_DIR)xmerl $(HRL_DIR)xmerl_xsd +HRL_FILES= $(HRL_MODULES:%=%.hrl) + + +MODULES= \ + xmerl_test \ + xmerl_app_test \ + xmerl_appup_test \ + xmerl_test_lib \ + xmerl_xsd_lib + +ERL_FILES= $(MODULES:%=%.erl) + +SUITE_FILES= \ + xmerl_SUITE.erl \ + xmerl_std_SUITE.erl \ + xmerl_sax_SUITE.erl \ + xmerl_sax_std_SUITE.erl \ + xmerl_xsd_SUITE.erl \ + xmerl_xsd_MS2002-01-16_SUITE.erl \ + xmerl_xsd_NIST2002-01-16_SUITE.erl \ + xmerl_xsd_Sun2002-01-16_SUITE.erl + +XML_FILES= \ + testcases.dtd \ + xmlconformance.msxsl \ + xmlconformance.xsl + + +TARGET_FILES= $(MODULES:%=%.$(EMULATOR)) + + +INSTALL_PROGS= $(TARGET_FILES) + +ifndef XMERL_PRESERV +XMERL_PRESERV_TEST_DIRS= +else +XMERL_PRESERV_TEST_DIRS= -Ddont_rm_test_dirs +endif + +# ---------------------------------------------------- +# Release directory specification +# ---------------------------------------------------- + +RELSYSDIR = $(RELEASE_PATH)/xmerl_test + +# ---------------------------------------------------- +# FLAGS +# ---------------------------------------------------- + +#ERL_COMPILE_FLAGS += -I$(ERL_TOP)/lib/test_server/include -I$(ERL_TOP)/lib/xmerl/include/ $(XMERL_PRESERV_TEST_DIRS) + + +# ---------------------------------------------------- +# Targets +# ---------------------------------------------------- + +tests debug opt: xmerl_test.erl + +info: + @echo "HRL_FILES: $(HRL_FILES)" + +clean: + $(RM) *.beam + $(RM) xmerl_test.erl + $(RM) core *~ + +xmerl_test.erl: ../doc/examples/xmerl_test.erl + cp $< $@ + chmod u+w $@ + + +# ---------------------------------------------------- +# Release Target +# ---------------------------------------------------- +include $(ERL_TOP)/make/otp_release_targets.mk + +release_spec: opt + +release_tests_spec: opt + $(INSTALL_DIR) $(RELSYSDIR) + $(INSTALL_DATA) $(ERL_FILES) $(HRL_FILES) $(RELSYSDIR) + $(INSTALL_DATA) $(SUITE_FILES) $(RELSYSDIR) + $(INSTALL_DATA) xmerl.spec xmerl.cover $(RELSYSDIR) + cp $(XML_FILES) $(RELSYSDIR) + @tar cfh - xmerl_SUITE_data | (cd $(RELSYSDIR); tar xf -) + @tar cfh - xmerl_std_SUITE_data | (cd $(RELSYSDIR); tar xf -) + @tar cfh - xmerl_sax_std_SUITE_data | (cd $(RELSYSDIR); tar xf -) + @tar cfh - xmerl_xsd_SUITE_data | (cd $(RELSYSDIR); tar xf -) + @tar cfh - xmerl_xsd_MS2002-01-16_SUITE_data | (cd $(RELSYSDIR); tar xf -) + @tar cfh - xmerl_xsd_NIST2002-01-16_SUITE_data | (cd $(RELSYSDIR); tar xf -) + @tar cfh - xmerl_xsd_Sun2002-01-16_SUITE_data | (cd $(RELSYSDIR); tar xf -) + @tar cfh - proprietary | (cd $(RELSYSDIR); tar xf -) + chmod -f -R u+w $(RELSYSDIR) -- cgit v1.2.3