diff options
author | Siri Hansen <[email protected]> | 2014-02-24 11:03:40 +0100 |
---|---|---|
committer | Siri Hansen <[email protected]> | 2014-02-24 11:08:57 +0100 |
commit | cd03c9678083fd348c7778f53f3357f623ad65d5 (patch) | |
tree | 15d8ba0ff98109f7be250ce5283a6e440a46b264 /lib/webtool | |
parent | 7211dab352a2b5141c260680f2077ca792768b37 (diff) | |
parent | beae7ae0dab99a34ac6a6471feb8a7b9b2a3ed32 (diff) | |
download | otp-cd03c9678083fd348c7778f53f3357f623ad65d5.tar.gz otp-cd03c9678083fd348c7778f53f3357f623ad65d5.tar.bz2 otp-cd03c9678083fd348c7778f53f3357f623ad65d5.zip |
Merge branch 'schlagert/fix_basic_appups'
* schlagert/fix_basic_appups:
Dynamically configure typer_SUITE according to environment
Disable hipe_SUITE when environment doesn't support it
Make hipe non-upgradable by setting appup file empty
Fix missing module on hipe app file template
Add test suites performing app and appup file checks
Introduce appup test utility
Fix library application appup files
Fix non-library appup files according to issue #240
OTP-11744
Diffstat (limited to 'lib/webtool')
-rw-r--r-- | lib/webtool/src/Makefile | 2 | ||||
-rw-r--r-- | lib/webtool/src/webtool.appup.src | 10 | ||||
-rw-r--r-- | lib/webtool/test/Makefile | 65 | ||||
-rw-r--r-- | lib/webtool/test/webtool.spec | 1 | ||||
-rw-r--r-- | lib/webtool/test/webtool_SUITE.erl | 50 |
5 files changed, 123 insertions, 5 deletions
diff --git a/lib/webtool/src/Makefile b/lib/webtool/src/Makefile index f28c777240..af565c8895 100644 --- a/lib/webtool/src/Makefile +++ b/lib/webtool/src/Makefile @@ -66,7 +66,7 @@ ERL_COMPILE_FLAGS += +warn_obsolete_guard debug opt: $(TARGET_FILES) $(APP_TARGET) $(APPUP_TARGET) clean: - rm -f $(TARGET_FILES) $(APP_TARGET) $(APP_TARGET) + rm -f $(TARGET_FILES) $(APP_TARGET) $(APPUP_TARGET) rm -f core docs: diff --git a/lib/webtool/src/webtool.appup.src b/lib/webtool/src/webtool.appup.src index 7a435e9b22..9e6f4b9b5b 100644 --- a/lib/webtool/src/webtool.appup.src +++ b/lib/webtool/src/webtool.appup.src @@ -1,7 +1,7 @@ -%% +%% -*- erlang -*- %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2001-2009. All Rights Reserved. +%% Copyright Ericsson AB 2001-2014. 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 @@ -15,5 +15,7 @@ %% under the License. %% %% %CopyrightEnd% -%% -{"%VSN%",[],[]}. +{"%VSN%", + [{<<".*">>,[{restart_application, webtool}]}], + [{<<".*">>,[{restart_application, webtool}]}] +}. diff --git a/lib/webtool/test/Makefile b/lib/webtool/test/Makefile new file mode 100644 index 0000000000..93aa1c09eb --- /dev/null +++ b/lib/webtool/test/Makefile @@ -0,0 +1,65 @@ +include $(ERL_TOP)/make/target.mk +include $(ERL_TOP)/make/$(TARGET)/otp.mk + +# ---------------------------------------------------- +# Target Specs +# ---------------------------------------------------- + +MODULES= \ + webtool_SUITE + +ERL_FILES= $(MODULES:%=%.erl) + +TARGET_FILES= $(MODULES:%=$(EBIN)/%.$(EMULATOR)) +INSTALL_PROGS= $(TARGET_FILES) + +EMAKEFILE=Emakefile + +# ---------------------------------------------------- +# Release directory specification +# ---------------------------------------------------- +RELSYSDIR = $(RELEASE_PATH)/webtool_test + +# ---------------------------------------------------- +# FLAGS +# ---------------------------------------------------- + +ERL_MAKE_FLAGS += +ERL_COMPILE_FLAGS += -I$(ERL_TOP)/lib/test_server/include + +EBIN = . + +# ---------------------------------------------------- +# Targets +# ---------------------------------------------------- + +make_emakefile: + $(ERL_TOP)/make/make_emakefile $(ERL_COMPILE_FLAGS) -o$(EBIN) $(MODULES) \ + > $(EMAKEFILE) + $(ERL_TOP)/make/make_emakefile $(ERL_COMPILE_FLAGS) -o$(EBIN) '*_SUITE_make' \ + >> $(EMAKEFILE) + +tests debug opt: make_emakefile + erl $(ERL_MAKE_FLAGS) -make + +clean: + rm -f $(EMAKEFILE) + rm -f $(TARGET_FILES) $(GEN_FILES) + rm -f core + +docs: + +# ---------------------------------------------------- +# Release Target +# ---------------------------------------------------- +include $(ERL_TOP)/make/otp_release_targets.mk + +release_spec: opt + +release_tests_spec: make_emakefile + $(INSTALL_DIR) "$(RELSYSDIR)" + $(INSTALL_DATA) $(EMAKEFILE) $(ERL_FILES) "$(RELSYSDIR)" + $(INSTALL_DATA) webtool.spec "$(RELSYSDIR)" + chmod -R u+w "$(RELSYSDIR)" + +release_docs_spec: diff --git a/lib/webtool/test/webtool.spec b/lib/webtool/test/webtool.spec new file mode 100644 index 0000000000..134e6ed40c --- /dev/null +++ b/lib/webtool/test/webtool.spec @@ -0,0 +1 @@ +{suites,"../webtool_test",all}. diff --git a/lib/webtool/test/webtool_SUITE.erl b/lib/webtool/test/webtool_SUITE.erl new file mode 100644 index 0000000000..64ff221a1b --- /dev/null +++ b/lib/webtool/test/webtool_SUITE.erl @@ -0,0 +1,50 @@ +%% ``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 via the world wide web 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. +%% +%% The Initial Developer of the Original Code is Ericsson Utvecklings AB. +%% Portions created by Ericsson are Copyright 1999, Ericsson Utvecklings +%% AB. All Rights Reserved.'' +%% +-module(webtool_SUITE). + +-compile([export_all]). +-include_lib("common_test/include/ct.hrl"). + +suite() -> + [{ct_hooks, [ts_install_cth]}]. + +all() -> + [app, appup]. + +groups() -> + []. + +init_per_suite(Config) -> + Config. + +end_per_suite(_Config) -> + ok. + +init_per_group(_GroupName, Config) -> + Config. + +end_per_group(_GroupName, Config) -> + Config. + +app() -> + [{doc, "Test that the webtool app file is ok"}]. +app(Config) when is_list(Config) -> + ok = ?t:app_test(webtool). + +appup() -> + [{doc, "Test that the webtool appup file is ok"}]. +appup(Config) when is_list(Config) -> + ok = ?t:appup_test(webtool). |