diff options
author | Micael Karlberg <[email protected]> | 2010-01-13 16:18:24 +0000 |
---|---|---|
committer | Erlang/OTP <[email protected]> | 2010-01-13 16:18:24 +0000 |
commit | 6153ba7599f2ce1ab22959a40b6ca33b4238f0d0 (patch) | |
tree | a81d50b08c7828d3662dd50e48bcf55b72f507b2 /lib/inets/test/Makefile | |
parent | 68c2f188c3446f53fad03d0f652207a9a8bb1946 (diff) | |
download | otp-6153ba7599f2ce1ab22959a40b6ca33b4238f0d0.tar.gz otp-6153ba7599f2ce1ab22959a40b6ca33b4238f0d0.tar.bz2 otp-6153ba7599f2ce1ab22959a40b6ca33b4238f0d0.zip |
OTP-8016, OTP-8056, OTP-8103, OTP-8106, OTP-8312, OTP-8315, OTP-8327, OTP-8349,
OTP-8351, OTP-8359 & OTP-8371.
Diffstat (limited to 'lib/inets/test/Makefile')
-rw-r--r-- | lib/inets/test/Makefile | 317 |
1 files changed, 317 insertions, 0 deletions
diff --git a/lib/inets/test/Makefile b/lib/inets/test/Makefile new file mode 100644 index 0000000000..d13ffea544 --- /dev/null +++ b/lib/inets/test/Makefile @@ -0,0 +1,317 @@ +# +# %CopyrightBegin% +# +# Copyright Ericsson AB 1997-2009. 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% +# +# +# For an outline of how this all_SUITE_data stuff works, see the +# make file ../../ssl/test/Makefile. +# +include $(ERL_TOP)/make/target.mk + +include $(ERL_TOP)/make/$(TARGET)/otp.mk + +# ---------------------------------------------------- +# Application version +# ---------------------------------------------------- +include ../vsn.mk +VSN = $(INETS_VSN) + + +# ---------------------------------------------------- +# Target Specs +# ---------------------------------------------------- +INCLUDES = -I. \ + -I$(ERL_TOP)/lib/test_server/include/ \ + -I$(ERL_TOP)/lib/inets/src/inets_app \ + -I$(ERL_TOP)/lib/inets/src/http_lib \ + -I$(ERL_TOP)/lib/inets/src/http_client \ + -I$(ERL_TOP)/lib/inets/src/ftp + +CP = cp + +ifeq ($(TESTROOT_DIR),) +TESTROOT_DIR = /ldisk/tests/$(USER)/inets +endif + +ifeq ($(INETS_DATA_DIR),) +INETS_DATA_DIR = $(TESTROOT_DIR)/data_dir +endif + +ifeq ($(INETS_PRIV_DIR),) +INETS_PRIV_DIR = $(TESTROOT_DIR)/priv_dir +endif + +INETS_FLAGS = -Dinets_data_dir='"$(INETS_DATA_DIR)"' \ + -Dinets_priv_dir='"$(INETS_PRIV_DIR)"' + + +### +### test suite debug flags +### +ifeq ($(FTP_DEBUG_CLIENT),) + FTP_DEBUG_CLIENT = y +endif + +ifeq ($(FTP_DEBUG_CLIENT),) + FTP_FLAGS += -Dftp_debug_client +endif + +ifeq ($(FTP_TRACE_CLIENT),) + FTP_DEBUG_CLIENT = y +endif + +ifeq ($(FTP_TRACE_CLIENT),y) + FTP_FLAGS += -Dftp_trace_client +endif + +ifneq ($(FTP_DEBUG),) + FTP_DEBUG = s +endif + +ifeq ($(FTP_DEBUG),l) + FTP_FLAGS += -Dftp_log +endif + +ifeq ($(FTP_DEBUG),d) + FTP_FLAGS += -Dftp_debug -Dftp_log +endif + +ifeq ($(INETS_DEBUG),) + INETS_DEBUG = d +endif + +ifeq ($(INETS_DEBUG),l) + INETS_FLAGS += -Dinets_log +endif + +ifeq ($(INETS_DEBUG),d) + INETS_FLAGS += -Dinets_debug -Dinets_log +endif + + +### +### HTTPD verbosity flags +### + +ifneq ($(MANV),) + INETS_FLAGS += -Dhttpd_manager_verbosity=$(MANV) +else + INETS_FLAGS += -Dhttpd_manager_verbosity=trace +endif + +ifneq ($(REQV),) + INETS_FLAGS += -Dhttpd_request_handler_verbosity=$(REQV) +else + INETS_FLAGS += -Dhttpd_request_handler_verbosity=trace +endif + +ifneq ($(ACCV),) + INETS_FLAGS += -Dhttpd_acceptor_verbosity=$(ACCV) +else + INETS_FLAGS += -Dhttpd_acceptor_verbosity=trace +endif + +ifneq ($(AUTHV),) + INETS_FLAGS += -Dhttpd_auth_verbosity=$(AUTHV) +else + INETS_FLAGS += -Dhttpd_auth_verbosity=log +endif + +ifneq ($(SECV),) + INETS_FLAGS += -Dhttpd_security_verbosity=$(SECV) +else + INETS_FLAGS += -Dhttpd_security_verbosity=log +endif + +INETS_ROOT = ../../inets + +MODULES = \ + inets_test_lib \ + ftp_SUITE \ + ftp_format_SUITE \ + ftp_solaris8_sparc_test \ + ftp_solaris9_sparc_test \ + ftp_solaris10_sparc_test \ + ftp_solaris10_x86_test \ + ftp_linux_x86_test \ + ftp_linux_ppc_test \ + ftp_macosx_x86_test \ + ftp_macosx_ppc_test \ + ftp_openbsd_x86_test \ + ftp_freebsd_x86_test \ + ftp_netbsd_x86_test \ + ftp_windows_xp_test \ + ftp_windows_2003_server_test \ + ftp_suite_lib \ + ftp_ticket_test \ + http_format_SUITE \ + httpc_SUITE \ + httpc_cookie_SUITE \ + httpd_SUITE \ + httpd_basic_SUITE \ + httpd_mod \ + httpd_block \ + httpd_load \ + httpd_time_test \ + httpd_1_1 \ + httpd_test_lib \ + inets_sup_SUITE \ + inets_SUITE \ + inets_app_test \ + inets_appup_test \ + tftp_test_lib \ + tftp_SUITE + + +EBIN = . + +HRL_FILES = inets_test_lib.hrl \ + inets_internal.hrl \ + ftp_internal.hrl \ + httpc_internal.hrl \ + http_internal.hrl \ + tftp_test_lib.hrl + +ERL_FILES = $(MODULES:%=%.erl) + +TARGET_FILES = $(MODULES:%=$(EBIN)/%.$(EMULATOR)) + +INETS_FILES = Makefile.inets rules.mk suite_targets.mk \ + inets.config inets.spec inets.spec.vxworks + + +SOURCE = $(ERL_FILES) $(HRL_FILES) + +INETS_SPECS = inets.spec inets.spec.vxworks + +INETS_DATADIR = inets_SUITE_data inets_sup_SUITE_data +HTTPD_DATADIR = httpd_test_data httpd_SUITE_data +HTTPC_DATADIR = httpc_SUITE_data +FTP_DATADIR = ftp_SUITE_data + +DATADIRS = $(INETS_DATADIR) $(HTTPD_DATADIR) $(HTTPC_DATADIR) $(FTP_DATADIR) + +EMAKEFILE = Emakefile +MAKE_EMAKE = $(wildcard $(ERL_TOP)/make/make_emakefile) + +ifeq ($(MAKE_EMAKE),) +BUILDTARGET = $(TARGET_FILES) +RELTEST_FILES = $(INETS_SPECS) $(SOURCE) +else +BUILDTARGET = emakebuild +RELTEST_FILES = $(EMAKEFILE) $(INETS_SPECS) $(SOURCE) +endif + +# ---------------------------------------------------- +# Release directory specification +# ---------------------------------------------------- +RELSYSDIR = $(RELEASE_PATH)/lib/inets-$(VSN) + +RELTESTSYSDIR = $(RELEASE_PATH)/inets_test +RELTESTSYSALLDATADIR = $(RELTESTSYSDIR)/all_SUITE_data +RELTESTSYSBINDIR = $(RELTESTSYSALLDATADIR)/bin + +MAKEFILE_SRC = Makefile.src +INETS_SSL_LIB_DIR = ../../ssl/usr/ssleay/ + + +# ---------------------------------------------------- +# FLAGS +# The path to the test_server ebin dir is needed when +# running the target "targets". +# ---------------------------------------------------- +ERL_COMPILE_FLAGS += -pa ../../../internal_tools/test_server/ebin \ + $(INCLUDES) $(FTP_FLAGS) $(INETS_FLAGS) + +# ---------------------------------------------------- +# Targets +# erl -sname kalle -pa ../ebin +# If you intend to run the test suite locally (private), then +# there is some requirements: +# 1) INETS_PRIV_DIR must be created +# 2) INETS_SSL_LIB_DIR must be created with the same content as +# content comparable to all_SUITE_data/bin (see test-server). +# ---------------------------------------------------- + +tests debug opt: $(BUILDTARGET) + +targets: $(TARGET_FILES) + +.PHONY: emakebuild + +emakebuild: $(EMAKEFILE) + +$(EMAKEFILE): + $(MAKE_EMAKE) $(ERL_COMPILE_FLAGS) -o$(EBIN) '*_SUITE_make' | grep -v Warning > $(EMAKEFILE) + $(MAKE_EMAKE) $(ERL_COMPILE_FLAGS) -o$(EBIN) $(MODULES) | grep -v Warning >> $(EMAKEFILE) + +clean: + rm -f $(EMAKEFILE) + rm -f $(TARGET_FILES) + rm -f core *~ + +docs: + + +# ---------------------------------------------------- +# Release Target +# ---------------------------------------------------- +include $(ERL_TOP)/make/otp_release_targets.mk + +release_spec: opt + $(INSTALL_DIR) $(RELSYSDIR)/test + $(INSTALL_DATA) $(HRL_FILES) $(ERL_FILES) $(RELSYSDIR)/test + $(INSTALL_DATA) $(INETS_FILES) $(RELSYSDIR)/test + $(INSTALL_DIR) $(RELSYSDIR)/test/$(HTTPD_DATADIR) + tar chf - -C $(HTTPD_DATADIR) . | (cd $(RELSYSDIR)/test/$(HTTPD_DATADIR); tar xf -) + (cd $(RELSYSDIR)/test; mv Makefile.inets Makefile) + +release_tests_spec: opt + $(INSTALL_DIR) $(RELTESTSYSDIR) + $(INSTALL_DATA) $(RELTEST_FILES) $(RELTESTSYSDIR) + chmod -f -R u+w $(RELTESTSYSDIR) + tar chf - $(DATADIRS) | (cd $(RELTESTSYSDIR); tar xf -) + $(INSTALL_DIR) $(RELTESTSYSALLDATADIR) + $(INSTALL_DATA) $(MAKEFILE_SRC) $(RELTESTSYSALLDATADIR)/Makefile.src + $(INSTALL_DATA) copy_files.erl $(RELTESTSYSALLDATADIR)/copy_files.erl + $(INSTALL_DIR) $(RELTESTSYSBINDIR) + chmod -f -R +x $(RELTESTSYSBINDIR) + tar cf - -C $(INETS_SSL_LIB_DIR) . | (cd $(RELTESTSYSALLDATADIR); tar xf -) + $(INSTALL_DIR) $(RELTESTSYSALLDATADIR)/win32/lib + tar cf - -C $(INETS_SSL_LIB_DIR)/win32/out32dll . | \ + (cd $(RELTESTSYSALLDATADIR)/win32/lib; tar xf -) + +release_docs_spec: + +info: + @echo "MAKE_EMAKE = $(MAKE_EMAKE)" + @echo "EMAKEFILE = $(EMAKEFILE)" + @echo "BUILDTARGET = $(BUILDTARGET)" + @echo "TARGET_FILES = $(TARGET_FILES)" + @echo "INETS_DATA_DIR = $(INETS_DATA_DIR)" + @echo "INETS_PRIV_DIR = $(INETS_PRIV_DIR)" + @echo "INETS_SSL_LIB_DIR = $(INETS_SSL_LIB_DIR)" + @echo "INETS_ROOT = $(INETS_ROOT)" + @echo "INETS_FLAGS = $(INETS_FLAGS)" + @echo "FTP_FLAGS = $(FTP_FLAGS)" + +tftp: + erlc $(ERL_COMPILE_FLAGS) tftp_test_lib.erl tftp_SUITE.erl && erl -pa ../../inets/ebin -s tftp_SUITE t -s erlang halt + +tftp_work: + echo "tftp_test_lib:t([{tftp_SUITE, all}])." + erlc $(ERL_COMPILE_FLAGS) tftp_test_lib.erl tftp_SUITE.erl && erl -pa ../../inets/ebin |