From a3cd50792d0ed1c5dfee66ff79ee7117057e9970 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Hoguin?= Date: Fri, 7 Dec 2018 19:40:02 +0100 Subject: Autopatch: allow configuring REBAR_GIT and REBAR_COMMIT And use this in the tests to fetch Rebar only once and then clone from the local repository. This should speed up tests a little. --- core/deps.mk | 7 ++-- test/Makefile | 14 ++++++-- test/core_app.mk | 86 +++++++++++++++++++++++------------------------ test/core_apps.mk | 26 +++++++------- test/core_autopatch.mk | 16 ++++----- test/core_compat.mk | 14 ++++---- test/core_deps.mk | 70 +++++++++++++++++++------------------- test/core_makedep.mk | 4 +-- test/core_misc.mk | 6 ++-- test/core_plugins.mk | 20 +++++------ test/core_upgrade.mk | 16 ++++----- test/plugin_asciidoc.mk | 10 +++--- test/plugin_bootstrap.mk | 32 +++++++++--------- test/plugin_c_src.mk | 6 ++-- test/plugin_cover.mk | 26 +++++++------- test/plugin_ct.mk | 22 ++++++------ test/plugin_dialyzer.mk | 28 +++++++-------- test/plugin_edoc.mk | 10 +++--- test/plugin_erlydtl.mk | 16 ++++----- test/plugin_escript.mk | 12 +++---- test/plugin_eunit.mk | 24 ++++++------- test/plugin_proper.mk | 2 +- test/plugin_protobuffs.mk | 6 ++-- test/plugin_relx.mk | 16 ++++----- test/plugin_shell.mk | 8 ++--- test/plugin_sphinx.mk | 8 ++--- test/plugin_triq.mk | 2 +- 27 files changed, 259 insertions(+), 248 deletions(-) diff --git a/core/deps.mk b/core/deps.mk index 8e18531..ed92daf 100644 --- a/core/deps.mk +++ b/core/deps.mk @@ -21,6 +21,9 @@ export DEPS_DIR REBAR_DEPS_DIR = $(DEPS_DIR) export REBAR_DEPS_DIR +REBAR_GIT ?= https://github.com/rebar/rebar +REBAR_COMMIT ?= 576e12171ab8d69b048b827b92aa65d067deea01 + # External "early" plugins (see core/plugins.mk for regular plugins). # They both use the core_dep_plugin macro. @@ -221,9 +224,9 @@ endef define dep_autopatch_fetch_rebar2 if [ ! -d $(ERLANG_MK_TMP)/rebar ]; then \ - git clone -q -n -- https://github.com/rebar/rebar $(ERLANG_MK_TMP)/rebar; \ + git clone -q -n -- $(REBAR_GIT) $(ERLANG_MK_TMP)/rebar; \ cd $(ERLANG_MK_TMP)/rebar; \ - git checkout -q 576e12171ab8d69b048b827b92aa65d067deea01; \ + git checkout -q $(REBAR_COMMIT); \ ./bootstrap; \ cd -; \ fi diff --git a/test/Makefile b/test/Makefile index a66e9db..39973ce 100644 --- a/test/Makefile +++ b/test/Makefile @@ -94,17 +94,25 @@ endef # Main targets. -.PHONY: all clean build +.PHONY: all clean init all:: core clean:: $t rm -rf erl_crash.dump packages/ test_*/ -build: +init: clean + $i "Prefetch Rebar if necessary" + $t if [ ! -d test_rebar_git ]; then \ + git clone -q -n -- https://github.com/rebar/rebar test_rebar_git; \ + fi + $i "Generate a bleeding edge Erlang.mk" $t cd .. && $(MAKE) $v +REBAR_GIT = file://$(CURDIR)/test_rebar_git +export REBAR_GIT + # Core. .PHONY: core @@ -139,7 +147,7 @@ packages: $(addprefix pkg-,$(PACKAGES)) define pkg_target .PHONY: pkg-$1 -pkg-$1: build clean +pkg-$1: init # Make sure $@ is defined inside the define. $(eval @ = pkg-$1) diff --git a/test/core_app.mk b/test/core_app.mk index eaa059d..77df7ea 100644 --- a/test/core_app.mk +++ b/test/core_app.mk @@ -7,7 +7,7 @@ CORE_APP_TARGETS = $(call list_targets,core-app) core-app: $(CORE_APP_TARGETS) ifdef LEGACY -core-app-appsrc-change: build clean +core-app-appsrc-change: init $i "Bootstrap a new OTP application named $(APP)" $t mkdir $(APP)/ @@ -27,7 +27,7 @@ core-app-appsrc-change: build clean $t rm $(APP)/EXPECT endif -core-app-asn1: build clean +core-app-asn1: init $i "Bootstrap a new OTP library named $(APP)" $t mkdir $(APP)/ @@ -163,7 +163,7 @@ endif true = lists:member({record_name_prefix, \"FOO-\"}, Opts), \ halt()" -core-app-asn1-maps: build clean +core-app-asn1-maps: init $i "Bootstrap a new OTP library named $(APP)" $t mkdir $(APP)/ @@ -201,7 +201,7 @@ core-app-asn1-maps: build clean [{module, M} = code:load_file(M) || M <- Mods], \ halt()" -core-app-auto-git-id: build clean +core-app-auto-git-id: init $i "Bootstrap a new OTP library named $(APP)" $t mkdir $(APP)/ @@ -250,7 +250,7 @@ endif halt()" ifndef LEGACY -core-app-env: build clean +core-app-env: init $i "Bootstrap a new OTP library named $(APP)" $t mkdir $(APP)/ @@ -282,7 +282,7 @@ core-app-env: build clean {ok, '\\\$$test'} = application:get_env($(APP), test_atom), \ halt()" -core-app-env-invalid: build clean +core-app-env-invalid: init $i "Bootstrap a new OTP library named $(APP)" $t mkdir $(APP)/ @@ -296,7 +296,7 @@ core-app-env-invalid: build clean $t ! $(MAKE) -C $(APP) $v endif -core-app-erlc-exclude: build clean +core-app-erlc-exclude: init $i "Bootstrap a new OTP library named $(APP)" $t mkdir $(APP)/ @@ -324,7 +324,7 @@ core-app-erlc-exclude: build clean [{module, M} = code:load_file(M) || M <- Mods], \ halt()" -core-app-erlc-opts: build clean +core-app-erlc-opts: init $i "Bootstrap a new OTP library named $(APP)" $t mkdir $(APP)/ @@ -351,7 +351,7 @@ core-app-erlc-opts: build clean false = proplists:is_defined(debug_info, proplists:get_value(options, girl:module_info(compile))), \ halt()" -core-app-erlc-opts-filter: build clean +core-app-erlc-opts-filter: init $i "Bootstrap a new OTP library named $(APP)" $t mkdir $(APP)/ @@ -378,7 +378,7 @@ core-app-erlc-opts-filter: build clean false = proplists:is_defined(debug_info, proplists:get_value(options, girl:module_info(compile))), \ halt()" -core-app-error: build clean +core-app-error: init $i "Bootstrap a new OTP library named $(APP)" $t mkdir $(APP)/ @@ -396,7 +396,7 @@ core-app-error: build clean $t ! $(MAKE) -C $(APP) $v ifndef LEGACY -core-app-extra-keys: build clean +core-app-extra-keys: init $i "Bootstrap a new OTP library named $(APP)" $t mkdir $(APP)/ @@ -436,7 +436,7 @@ core-app-extra-keys: build clean halt()" endif -core-app-generate-erl: build clean +core-app-generate-erl: init $i "Bootstrap a new OTP library named $(APP)" $t mkdir $(APP)/ @@ -542,7 +542,7 @@ endif [{module, M} = code:load_file(M) || M <- Mods], \ halt()" -core-app-generate-erl-include: build clean +core-app-generate-erl-include: init $i "Bootstrap a new OTP library named $(APP)" $t mkdir $(APP)/ @@ -604,7 +604,7 @@ core-app-generate-erl-include: build clean [{module, M} = code:load_file(M) || M <- Mods], \ halt()" -core-app-generate-erl-prepend: build clean +core-app-generate-erl-prepend: init $i "Bootstrap a new OTP library named $(APP)" $t mkdir $(APP)/ @@ -713,7 +713,7 @@ endif [{module, M} = code:load_file(M) || M <- Mods], \ halt()" -core-app-hrl: build clean +core-app-hrl: init $i "Bootstrap a new OTP library named $(APP)" $t mkdir $(APP)/ @@ -802,7 +802,7 @@ endif [{module, M} = code:load_file(M) || M <- Mods], \ halt()" -core-app-hrl-recursive: build clean +core-app-hrl-recursive: init $i "Bootstrap a new OTP library named $(APP)" $t mkdir $(APP)/ @@ -893,7 +893,7 @@ endif [{module, M} = code:load_file(M) || M <- Mods], \ halt()" -core-app-makefile-change: build clean +core-app-makefile-change: init $i "Bootstrap a new OTP application named $(APP)" $t mkdir $(APP)/ @@ -918,7 +918,7 @@ core-app-makefile-change: build clean $t find $(APP) -type f -newer $(APP)/Makefile -not -path "$(APP)/.erlang.mk/*" | sort | diff $(APP)/EXPECT - $t rm $(APP)/EXPECT -core-app-mib: build clean +core-app-mib: init $i "Bootstrap a new OTP library named $(APP)" $t mkdir $(APP)/ @@ -1027,7 +1027,7 @@ endif halt()" ifndef LEGACY -core-app-name-special-char: build clean +core-app-name-special-char: init $i "Bootstrap a new OTP library named $(APP)" $t mkdir $(APP)/ @@ -1047,7 +1047,7 @@ core-app-name-special-char: build clean halt()" endif -core-app-no-app: build clean +core-app-no-app: init $i "Bootstrap a project without an OTP library" $t mkdir $(APP)/ @@ -1058,7 +1058,7 @@ core-app-no-app: build clean $i "Build the project" $t $(MAKE) -C $(APP) $v -core-app-no-makedep: build clean +core-app-no-makedep: init $i "Bootstrap a new OTP library named $(APP)" $t mkdir $(APP)/ @@ -1171,7 +1171,7 @@ endif [{module, M} = code:load_file(M) || M <- Mods], \ halt()" -core-app-project-mod: build clean +core-app-project-mod: init $i "Bootstrap a new OTP library named $(APP)" $t mkdir $(APP)/ @@ -1191,7 +1191,7 @@ core-app-project-mod: build clean $i "Check that the application starts correctly" $t $(ERL) -pa $(APP)/ebin/ -eval "ok = application:start($(APP)), halt()" -core-app-pt: build clean +core-app-pt: init $i "Bootstrap a new OTP library named $(APP)" $t mkdir $(APP)/ @@ -1221,7 +1221,7 @@ core-app-pt: build clean [{module, M} = code:load_file(M) || M <- Mods], \ halt()" -core-app-pt-erlc-opts: build clean +core-app-pt-erlc-opts: init $i "Bootstrap a new OTP library named $(APP)" $t mkdir $(APP)/ @@ -1261,7 +1261,7 @@ core-app-pt-erlc-opts: build clean [{module, M} = code:load_file(M) || M <- Mods], \ halt()" -core-app-xrl: build clean +core-app-xrl: init $i "Bootstrap a new OTP library named $(APP)" $t mkdir $(APP)/ @@ -1362,7 +1362,7 @@ endif [{module, M} = code:load_file(M) || M <- Mods], \ halt()" -core-app-xrl-help: build clean +core-app-xrl-help: init $i "Bootstrap a new OTP library named $(APP)" $t mkdir $(APP)/ @@ -1384,7 +1384,7 @@ core-app-xrl-help: build clean $t test ! -e $(APP)/ebin/erlang_scan.beam $t test ! -e $(APP)/src/erlang_scan.erl -core-app-xrl-include: build clean +core-app-xrl-include: init $i "Bootstrap a new OTP library named $(APP)" $t mkdir $(APP)/ @@ -1528,7 +1528,7 @@ endif [{module, M} = code:load_file(M) || M <- Mods], \ halt()" -core-app-yrl: build clean +core-app-yrl: init $i "Bootstrap a new OTP library named $(APP)" $t mkdir $(APP)/ @@ -1626,7 +1626,7 @@ endif [{module, M} = code:load_file(M) || M <- Mods], \ halt()" -core-app-yrl-header: build clean +core-app-yrl-header: init $i "Bootstrap a new OTP library named $(APP)" $t mkdir $(APP)/ @@ -1692,7 +1692,7 @@ core-app-yrl-header: build clean [{module, M} = code:load_file(M) || M <- Mods], \ halt()" -core-app-yrl-include: build clean +core-app-yrl-include: init $i "Bootstrap a new OTP library named $(APP)" $t mkdir $(APP)/ @@ -1806,7 +1806,7 @@ endif [{module, M} = code:load_file(M) || M <- Mods], \ halt()" -core-app-yrl-test-build-then-normal-build: build clean +core-app-yrl-test-build-then-normal-build: init $i "Bootstrap a new OTP library named $(APP)" $t mkdir $(APP)/ @@ -1834,7 +1834,7 @@ core-app-yrl-test-build-then-normal-build: build clean $i "Build the application in normal mode" $t $(MAKE) -C $(APP) $v -core-app-hrl-include-lib: build clean +core-app-hrl-include-lib: init $i "Bootstrap a new OTP library named $(APP)" $t mkdir $(APP)/ @@ -1923,7 +1923,7 @@ endif [{module, M} = code:load_file(M) || M <- Mods], \ halt()" -core-app-hrl-include-lib-recursive: build clean +core-app-hrl-include-lib-recursive: init $i "Bootstrap a new OTP library named $(APP)" $t mkdir $(APP)/ @@ -2014,7 +2014,7 @@ endif [{module, M} = code:load_file(M) || M <- Mods], \ halt()" -core-app-hrl-multiapps-include-lib: build clean +core-app-hrl-multiapps-include-lib: init $i "Create a multi application repository with no root application" $t mkdir $(APP)/ @@ -2117,7 +2117,7 @@ endif [{module, M} = code:load_file(M) || M <- Mods], \ halt()" -core-app-hrl-multiapps-include-lib-recursive: build clean +core-app-hrl-multiapps-include-lib-recursive: init $i "Create a multi application repository with no root application" $t mkdir $(APP)/ @@ -2222,7 +2222,7 @@ endif [{module, M} = code:load_file(M) || M <- Mods], \ halt()" -core-app-hrl-include-lib-src: build clean +core-app-hrl-include-lib-src: init $i "Bootstrap a new OTP library named $(APP)" $t mkdir $(APP)/ @@ -2309,7 +2309,7 @@ endif [{module, M} = code:load_file(M) || M <- Mods], \ halt()" -core-app-hrl-include-lib-src-recursive: build clean +core-app-hrl-include-lib-src-recursive: init $i "Bootstrap a new OTP library named $(APP)" $t mkdir $(APP)/ @@ -2399,7 +2399,7 @@ endif [{module, M} = code:load_file(M) || M <- Mods], \ halt()" -core-app-hrl-deps: build clean +core-app-hrl-deps: init $i "Create a multi application repository with no root application" $t mkdir $(APP)/ @@ -2495,7 +2495,7 @@ ifndef LEGACY halt()" endif -core-app-hrl-include-loop: build clean +core-app-hrl-include-loop: init $i "Bootstrap a new OTP library named $(APP)" $t mkdir $(APP)/ @@ -2518,7 +2518,7 @@ core-app-hrl-include-loop: build clean $t grep -q "src/use_blue.erl:: include/blue.hrl include/red.hrl; @touch" $(APP)/$(APP).d $t grep -q "src/use_red.erl:: include/blue.hrl include/red.hrl; @touch" $(APP)/$(APP).d -core-app-hrl-include_lib-loop: build clean +core-app-hrl-include_lib-loop: init $i "Bootstrap a new OTP library named $(APP)" $t mkdir $(APP)/ @@ -2541,7 +2541,7 @@ core-app-hrl-include_lib-loop: build clean $t grep -q "src/use_blue.erl:: include/blue.hrl include/red.hrl; @touch" $(APP)/$(APP).d $t grep -q "src/use_red.erl:: include/blue.hrl include/red.hrl; @touch" $(APP)/$(APP).d -core-app-hrl-include-loop-define-protected: build clean +core-app-hrl-include-loop-define-protected: init $i "Bootstrap a new OTP library named $(APP)" $t mkdir $(APP)/ @@ -2564,7 +2564,7 @@ core-app-hrl-include-loop-define-protected: build clean $t grep -q "src/use_blue.erl:: include/blue.hrl include/red.hrl; @touch" $(APP)/$(APP).d $t grep -q "src/use_red.erl:: include/blue.hrl include/red.hrl; @touch" $(APP)/$(APP).d -core-app-hrl-include_lib-loop-define-protected: build clean +core-app-hrl-include_lib-loop-define-protected: init $i "Bootstrap a new OTP library named $(APP)" $t mkdir $(APP)/ @@ -2587,7 +2587,7 @@ core-app-hrl-include_lib-loop-define-protected: build clean $t grep -q "src/use_blue.erl:: include/blue.hrl include/red.hrl; @touch" $(APP)/$(APP).d $t grep -q "src/use_red.erl:: include/blue.hrl include/red.hrl; @touch" $(APP)/$(APP).d -core-app-hrl-multiapps-include-loop-define-protected: build clean +core-app-hrl-multiapps-include-loop-define-protected: init $i "Create a multi application repository with no root application" $t mkdir $(APP)/ diff --git a/test/core_apps.mk b/test/core_apps.mk index 14cbb37..47040d0 100644 --- a/test/core_apps.mk +++ b/test/core_apps.mk @@ -6,7 +6,7 @@ CORE_APPS_TARGETS = $(call list_targets,core-apps) core-apps: $(CORE_APPS_TARGETS) -core-apps-build: build clean +core-apps-build: init $i "Bootstrap a new OTP library named $(APP)" $t mkdir $(APP)/ @@ -112,7 +112,7 @@ endif [{module, M} = code:load_file(M) || M <- Mods], \ halt()" -core-apps-build-count: build clean +core-apps-build-count: init $i "Bootstrap a new OTP library named $(APP)" $t mkdir $(APP)/ @@ -148,7 +148,7 @@ core-apps-build-count: build clean $t test "`wc -c $(APP)/apps/app_one/count | awk '{printf $$1}'`" -eq 1 $t test "`wc -c $(APP)/apps/app_two/count | awk '{printf $$1}'`" -eq 1 -core-apps-conflict: build clean +core-apps-conflict: init $i "Bootstrap a new OTP library named $(APP)" $t mkdir $(APP)/ @@ -167,7 +167,7 @@ core-apps-conflict: build clean $i "Check that Cowlib wasn't fetched" $t test ! -e $(APP)/deps/cowlib -core-apps-deep-conflict: build clean +core-apps-deep-conflict: init $i "Bootstrap a new OTP library named $(APP)" $t mkdir $(APP)/ @@ -186,7 +186,7 @@ core-apps-deep-conflict: build clean $i "Check that Cowlib wasn't fetched" $t test ! -e $(APP)/deps/cowlib -core-apps-dir: build clean +core-apps-dir: init $i "Bootstrap a new OTP library named $(APP)" $t mkdir $(APP)/ @@ -257,7 +257,7 @@ endif $i "Check that all relevant files were removed" $t test ! -e $(APP)/deps -core-apps-dir-include-lib: build clean +core-apps-dir-include-lib: init $i "Bootstrap a new OTP library named $(APP)" $t mkdir $(APP)/ @@ -316,7 +316,7 @@ core-apps-dir-include-lib: build clean $t test -f $(APP)/deep/libs/girl_app/ebin/girl_app.app $t test -f $(APP)/deep/libs/girl_app/ebin/girl.beam -core-apps-new-app: build clean +core-apps-new-app: init $i "Bootstrap a new OTP library named $(APP)" $t mkdir $(APP)/ @@ -361,7 +361,7 @@ endif {module, my_server} = code:load_file(my_server), \ halt()" -core-apps-new-lib: build clean +core-apps-new-lib: init $i "Bootstrap a new OTP library named $(APP)" $t mkdir $(APP)/ @@ -400,7 +400,7 @@ endif {module, my_server} = code:load_file(my_server), \ halt()" -core-apps-new-tpl: build clean +core-apps-new-tpl: init $i "Bootstrap a new OTP library named $(APP)" $t mkdir $(APP)/ @@ -432,7 +432,7 @@ core-apps-new-tpl: build clean [{module, M} = code:load_file(M) || M <- Mods], \ halt()" -core-apps-local-deps: build clean +core-apps-local-deps: init $i "Bootstrap a new OTP library named $(APP)" $t mkdir $(APP)/ @@ -502,7 +502,7 @@ core-apps-local-deps: build clean $t test -f $(APP)/apps/my_app_2/ebin/my_app_2_sup.beam $t test -f $(APP)/deps/lager/ebin/lager.app -core-apps-local-deps-circular: build clean +core-apps-local-deps-circular: init $i "Bootstrap a new OTP library named $(APP)" $t mkdir $(APP)/ @@ -536,7 +536,7 @@ core-apps-local-deps-circular: build clean $t test -f $(APP)/apps/my_app_2/ebin/my_app_2_app.beam $t test -f $(APP)/apps/my_app_2/ebin/my_app_2_sup.beam -core-apps-only: build clean +core-apps-only: init $i "Create a multi application repository with no root application" $t mkdir $(APP)/ @@ -601,7 +601,7 @@ core-apps-only: build clean $i "Check that all relevant files were removed" $t test ! -e $(APP)/deps -core-apps-toplevel-local-deps: build clean +core-apps-toplevel-local-deps: init $i "Bootstrap a new OTP library named $(APP)" $t mkdir $(APP)/ diff --git a/test/core_autopatch.mk b/test/core_autopatch.mk index 21fad4b..e9364b8 100644 --- a/test/core_autopatch.mk +++ b/test/core_autopatch.mk @@ -6,7 +6,7 @@ CORE_AUTOPATCH_TARGETS = $(call list_targets,core-autopatch) core-autopatch: $(CORE_AUTOPATCH_TARGETS) -core-autopatch-extended: build clean +core-autopatch-extended: init $i "Bootstrap a new OTP library named $(APP)" $t mkdir $(APP)/ @@ -26,7 +26,7 @@ core-autopatch-extended: build clean $t ! test -e $(APP)/deps/ranch/src/ranch_protocol.erl $t ! test -e $(APP)/deps/ranch/ebin/ranch_protocol.beam -core-autopatch-extended-erlc-opts: build clean +core-autopatch-extended-erlc-opts: init $i "Bootstrap a new OTP library named $(APP)" $t mkdir $(APP)/ @@ -45,7 +45,7 @@ core-autopatch-extended-erlc-opts: build clean $i "Check that couchbeam_ejson was compiled with the added option" $t $(ERL) -pa $(APP)/deps/couchbeam/ebin -eval 'c:m(couchbeam_ejson), halt()' | grep -c "WITH_JIFFY" | grep -q 1 -core-autopatch-no-autopatch: build clean +core-autopatch-no-autopatch: init $i "Bootstrap a new OTP library named $(APP)" $t mkdir $(APP)/ @@ -66,7 +66,7 @@ core-autopatch-no-autopatch: build clean $i "Check that Cowlib was not autopatched" $t grep -q Hoguin $(APP)/deps/cowlib/erlang.mk -core-autopatch-no-autopatch-erlang-mk: build clean +core-autopatch-no-autopatch-erlang-mk: init $i "Bootstrap a new OTP library named $(APP)" $t mkdir $(APP)/ @@ -85,7 +85,7 @@ core-autopatch-no-autopatch-erlang-mk: build clean $i "Check that Erlang.mk was not autopatched" $t grep -q Hoguin $(APP)/deps/cowlib/erlang.mk -core-autopatch-no-autopatch-rebar: build clean +core-autopatch-no-autopatch-rebar: init $i "Bootstrap a new OTP library named $(APP)" $t mkdir $(APP)/ @@ -106,7 +106,7 @@ core-autopatch-no-autopatch-rebar: build clean $t if grep -q erlang\.mk $(APP)/deps/goldrush/Makefile; then false; fi $t if grep -q erlang\.mk $(APP)/deps/lager/Makefile; then false; fi -core-autopatch-port_env: build clean +core-autopatch-port_env: init $i "Bootstrap a new OTP library named $(APP)" $t mkdir $(APP)/ @@ -143,7 +143,7 @@ endif $i "Confirm that the port_env configuration was expanded properly" $t grep -q "shell pkg-config" $(APP)/deps/my_dep/c_src/Makefile.erlang.mk -core-autopatch-rebar: build clean +core-autopatch-rebar: init $i "Bootstrap a new OTP library named $(APP)" $t mkdir $(APP)/ @@ -164,7 +164,7 @@ ifneq ($(PLATFORM),msys2) endif # This test is expected to fail when run in parallel and flock/lockf is not available. -core-autopatch-two-rebar: build clean +core-autopatch-two-rebar: init $i "Bootstrap a new OTP library named $(APP)" $t mkdir $(APP)/ diff --git a/test/core_compat.mk b/test/core_compat.mk index c8de73b..e6dbd92 100644 --- a/test/core_compat.mk +++ b/test/core_compat.mk @@ -11,7 +11,7 @@ REBAR3_BINARY = https://s3.amazonaws.com/rebar3/rebar3 core-compat: $(CORE_COMPAT_TARGETS) -core-compat-auto-rebar: build clean +core-compat-auto-rebar: init $i "Bootstrap a new OTP library named $(APP)" $t mkdir $(APP)/ @@ -53,7 +53,7 @@ core-compat-auto-rebar: build clean $i "Use rebar to build the application" $t cd $(APP) && ./rebar compile $v -core-compat-rebar: build clean +core-compat-rebar: init $i "Bootstrap a new OTP library named $(APP)" $t mkdir $(APP)/ @@ -92,7 +92,7 @@ core-compat-rebar: build clean $i "Use rebar to build the application" $t cd $(APP) && ./rebar compile $v -core-compat-rebar-deps-git: build clean +core-compat-rebar-deps-git: init $i "Bootstrap a new OTP library named $(APP)" $t mkdir $(APP)/ @@ -124,7 +124,7 @@ core-compat-rebar-deps-git: build clean $i "Use rebar to build the application" $t cd $(APP) && ./rebar get-deps compile $v -core-compat-rebar-deps-hex: build clean +core-compat-rebar-deps-hex: init $i "Bootstrap a new OTP library named $(APP)" $t mkdir $(APP)/ @@ -156,7 +156,7 @@ core-compat-rebar-deps-hex: build clean $i "Use rebar to build the application" $t cd $(APP) && ./rebar3 compile $v -core-compat-rebar-deps-pkg: build clean +core-compat-rebar-deps-pkg: init $i "Bootstrap a new OTP library named $(APP)" $t mkdir $(APP)/ @@ -188,7 +188,7 @@ core-compat-rebar-deps-pkg: build clean $i "Use rebar to build the application" $t cd $(APP) && ./rebar get-deps compile $v -core-compat-rebar-erlc-opts: build clean +core-compat-rebar-erlc-opts: init $i "Bootstrap a new OTP library named $(APP)" $t mkdir $(APP)/ @@ -237,7 +237,7 @@ core-compat-rebar-erlc-opts: build clean $i "Use rebar to build the application" $t cd $(APP) && ./rebar compile $v -core-compat-rebar-pt: build clean +core-compat-rebar-pt: init $i "Bootstrap a new OTP library named $(APP)" $t mkdir $(APP)/ diff --git a/test/core_deps.mk b/test/core_deps.mk index 78180f3..9645c9f 100644 --- a/test/core_deps.mk +++ b/test/core_deps.mk @@ -7,7 +7,7 @@ CORE_DEPS_TARGETS = $(call list_targets,core-deps) core-deps: $(CORE_DEPS_TARGETS) ifneq ($(PLATFORM),msys2) -core-deps-build-c-8cc: build clean +core-deps-build-c-8cc: init $i "Bootstrap a new OTP library named $(APP)" $t mkdir $(APP)/ @@ -34,7 +34,7 @@ core-deps-build-c-8cc: build clean halt()" endif -core-deps-build-c-lz4: build clean +core-deps-build-c-lz4: init $i "Bootstrap a new OTP library named $(APP)" $t mkdir $(APP)/ @@ -60,7 +60,7 @@ core-deps-build-c-lz4: build clean false = lists:member(lz4, Deps), \ halt()" -core-deps-build-erl: build clean +core-deps-build-erl: init $i "Bootstrap a new OTP library named $(APP)" $t mkdir $(APP)/ @@ -83,7 +83,7 @@ core-deps-build-erl: build clean false = lists:member(cowlib, Deps), \ halt()" -core-deps-build-js: build clean +core-deps-build-js: init $i "Bootstrap a new OTP library named $(APP)" $t mkdir $(APP)/ @@ -106,7 +106,7 @@ core-deps-build-js: build clean false = lists:member(jquery, Deps), \ halt()" -core-deps-dep-built: build clean +core-deps-dep-built: init $i "Bootstrap a new OTP library named $(APP)" $t mkdir $(APP)/ @@ -145,7 +145,7 @@ core-deps-dep-built: build clean $t find $(APP)/deps/cowlib -type f -newer $(APP)/EXPECT | grep -v ".git" | sort | diff $(APP)/EXPECT - $t rm $(APP)/EXPECT -core-deps-dep-built-full: build clean +core-deps-dep-built-full: init $i "Bootstrap a new OTP library named $(APP)" $t mkdir $(APP)/ @@ -174,7 +174,7 @@ core-deps-dep-built-full: build clean $t find $(APP)/deps/cowlib -type f -newer $(APP)/EXPECT | grep -v ".git" | sort | diff $(APP)/EXPECT - $t rm $(APP)/EXPECT -core-deps-dep-built-ln: build clean +core-deps-dep-built-ln: init $i "Bootstrap a new OTP library named $(APP)" $t mkdir $(APP)/ @@ -209,7 +209,7 @@ core-deps-dep-built-ln: build clean $t find $(APP)/cowlib -type f -newer $(APP)/EXPECT | grep -v ".git" | sort | diff $(APP)/EXPECT - $t rm $(APP)/EXPECT -core-deps-dep-commit: build clean +core-deps-dep-commit: init $i "Bootstrap a new OTP library named $(APP)" $t mkdir $(APP)/ @@ -240,7 +240,7 @@ endif {ok, \"1.0.0\"} = application:get_key(cowboy, vsn), \ halt()" -core-deps-dir: build clean +core-deps-dir: init $i "Bootstrap a new OTP library named $(APP)" $t mkdir $(APP)/ @@ -270,7 +270,7 @@ endif true = lists:member(cowboy, Deps), \ halt()" -core-deps-doc: build clean +core-deps-doc: init $i "Bootstrap a new OTP library named $(APP)" $t mkdir $(APP)/ @@ -307,7 +307,7 @@ core-deps-doc: build clean $t test -f $(APP)/doc/boy.md $t test -f $(APP)/doc/girl.md -core-deps-fetch-cp: build clean +core-deps-fetch-cp: init $i "Bootstrap a new OTP library named $(APP)" $t mkdir $(APP)/ @@ -340,7 +340,7 @@ endif true = lists:member(my_dep, Deps), \ halt()" -core-deps-fetch-custom: build clean +core-deps-fetch-custom: init $i "Bootstrap a new OTP library named $(APP)" $t mkdir $(APP)/ @@ -368,7 +368,7 @@ endif true = lists:member(boop, Deps), \ halt()" -core-deps-fetch-fail-bad: build clean +core-deps-fetch-fail-bad: init $i "Bootstrap a new OTP library named $(APP)" $t mkdir $(APP)/ @@ -381,7 +381,7 @@ core-deps-fetch-fail-bad: build clean $i "Check that building the application fails" $t ! $(MAKE) -C $(APP) $v -core-deps-fetch-fail-unknown: build clean +core-deps-fetch-fail-unknown: init $i "Bootstrap a new OTP library named $(APP)" $t mkdir $(APP)/ @@ -394,7 +394,7 @@ core-deps-fetch-fail-unknown: build clean $i "Check that building the application fails" $t ! $(MAKE) -C $(APP) $v -core-deps-fetch-git: build clean +core-deps-fetch-git: init $i "Bootstrap a new OTP library named $(APP)" $t mkdir $(APP)/ @@ -425,7 +425,7 @@ endif {ok, \"1.0.0\"} = application:get_key(cowboy, vsn), \ halt()" -core-deps-fetch-git-subfolder: build clean +core-deps-fetch-git-subfolder: init $i "Bootstrap a new OTP library named $(APP)" $t mkdir $(APP)/ @@ -466,7 +466,7 @@ endif true = lists:member(my_dep, Deps), \ halt()" -core-deps-fetch-git-submodule: build clean +core-deps-fetch-git-submodule: init $i "Bootstrap a new OTP library named $(APP)" $t mkdir $(APP)/ @@ -520,7 +520,7 @@ endif true = lists:member(my_dep, Deps), \ halt()" -core-deps-fetch-hex: build clean +core-deps-fetch-hex: init $i "Bootstrap a new OTP library named $(APP)" $t mkdir $(APP)/ @@ -551,7 +551,7 @@ endif {ok, \"1.0.0\"} = application:get_key(cowboy, vsn), \ halt()" -core-deps-fetch-hg: build clean +core-deps-fetch-hg: init $i "Bootstrap a new OTP library named $(APP)" $t mkdir $(APP)/ @@ -581,7 +581,7 @@ endif halt()" # Legacy must fail for the top-level application, but work for dependencies. -core-deps-fetch-legacy: build clean +core-deps-fetch-legacy: init $i "Bootstrap a new OTP library named $(APP)" $t mkdir $(APP)/ @@ -597,7 +597,7 @@ core-deps-fetch-legacy: build clean $i "Check that building the application works with IS_DEP=1" $t $(MAKE) -C $(APP) IS_DEP=1 $v -core-deps-fetch-ln: build clean +core-deps-fetch-ln: init $i "Bootstrap a new OTP library named $(APP)" $t mkdir $(APP)/ @@ -630,7 +630,7 @@ endif true = lists:member(my_dep, Deps), \ halt()" -core-deps-fetch-svn: build clean +core-deps-fetch-svn: init $i "Bootstrap a new OTP library named $(APP)" $t mkdir $(APP)/ @@ -659,7 +659,7 @@ endif {ok, \"1.0.0\"} = application:get_key(cowlib, vsn), \ halt()" -core-deps-ignore: build clean +core-deps-ignore: init $i "Bootstrap a new OTP library named $(APP)" $t mkdir $(APP)/ @@ -722,7 +722,7 @@ define add_dep_and_subdep git commit -q --no-gpg-sign -m "Initial commit") endef -core-deps-list-deps: build clean +core-deps-list-deps: init # We pass $(MAKE) directly so that GNU Make can pass its context forward. # If we didn't then $(MAKE) would be expanded in the call without context. @@ -825,7 +825,7 @@ dep_shelldep = git file://$(abspath $(APP)_shelldep) master\ $t cmp $(APP)/expected-all-deps.txt $(APP)/.erlang.mk/recursive-deps-list.log $t $(MAKE) -C $(APP) --no-print-directory distclean $v -core-deps-mv: build clean +core-deps-mv: init $i "Bootstrap a new OTP library named $(APP)" $t mkdir $(APP)/ @@ -847,7 +847,7 @@ core-deps-mv: build clean $i "Build the application" $t $(MAKE) -C $(APP)-moved $v -core-deps-mv-rebar: build clean +core-deps-mv-rebar: init $i "Bootstrap a new OTP library named $(APP)" $t mkdir $(APP)/ @@ -872,7 +872,7 @@ core-deps-mv-rebar: build clean # A lower-level dependency of the first dependency always # wins over a lower-level dependency of the second dependency. -core-deps-order-first: build clean +core-deps-order-first: init $i "Bootstrap a new OTP library named $(APP)" $t mkdir $(APP)/ @@ -913,7 +913,7 @@ endif halt()" # A higher-level dependency always wins. -core-deps-order-top: build clean +core-deps-order-top: init $i "Bootstrap a new OTP library named $(APP)" $t mkdir $(APP)/ @@ -945,7 +945,7 @@ endif halt()" ifndef LEGACY -core-deps-otp: build clean +core-deps-otp: init $i "Bootstrap a new OTP library named $(APP)" $t mkdir $(APP)/ @@ -969,7 +969,7 @@ core-deps-otp: build clean halt()" endif -core-deps-pkg: build clean +core-deps-pkg: init $i "Bootstrap a new OTP library named $(APP)" $t mkdir $(APP)/ @@ -999,7 +999,7 @@ endif true = lists:member(cowboy, Deps), \ halt()" -core-deps-rel: build clean +core-deps-rel: init $i "Bootstrap a new release-enabled OTP library named $(APP)" $t mkdir $(APP)/ @@ -1064,7 +1064,7 @@ else $t $(APP)/_rel/$(APP)_release/bin/$(APP)_release stop $v endif -core-deps-search: build clean +core-deps-search: init $i "Bootstrap a new OTP library named $(APP)" $t mkdir $(APP)/ @@ -1077,7 +1077,7 @@ core-deps-search: build clean $i "Run 'make search q=cowboy' and check that it prints packages" $t test -n "`$(MAKE) -C $(APP) search q=cowboy`" -core-deps-shell: build clean +core-deps-shell: init $i "Bootstrap a new OTP library named $(APP)" $t mkdir $(APP)/ @@ -1116,7 +1116,7 @@ core-deps-shell: build clean false = lists:member(tddreloader, Deps), \ halt()" -core-deps-skip: build clean +core-deps-skip: init $i "Bootstrap a new OTP library named $(APP)" $t mkdir $(APP)/ @@ -1153,7 +1153,7 @@ endif $t test -d $(APP)/deps/cowboy $t test -d $(APP)/deps/ranch -core-deps-test: build clean +core-deps-test: init $i "Bootstrap a new OTP library named $(APP)" $t mkdir $(APP)/ diff --git a/test/core_makedep.mk b/test/core_makedep.mk index 027b859..6df5e8f 100644 --- a/test/core_makedep.mk +++ b/test/core_makedep.mk @@ -6,7 +6,7 @@ CORE_MAKEDEP_TARGETS = $(call list_targets,core-makedep) core-makedep: $(CORE_MAKEDEP_TARGETS) -core-makedep-behavior: build clean +core-makedep-behavior: init $i "Bootstrap a new OTP library named $(APP)" $t mkdir $(APP)/ @@ -25,7 +25,7 @@ core-makedep-behavior: build clean $t test -f $(APP)/ebin/boy.beam $t test -f $(APP)/ebin/human.beam -core-makedep-import: build clean +core-makedep-import: init $i "Bootstrap a new OTP library named $(APP)" $t mkdir $(APP)/ diff --git a/test/core_misc.mk b/test/core_misc.mk index 0d838ac..9b7aa92 100644 --- a/test/core_misc.mk +++ b/test/core_misc.mk @@ -8,7 +8,7 @@ CORE_MISC_TARGETS = $(filter-out core-misc,$(call list_targets,core)) core-misc: $(CORE_MISC_TARGETS) -core-clean-crash-dump: build clean +core-clean-crash-dump: init $i "Bootstrap a new OTP library named $(APP)" $t mkdir $(APP)/ @@ -24,7 +24,7 @@ core-clean-crash-dump: build clean $i "Check that the crash dump is removed" $t test ! -e $(APP)/erl_crash.dump -core-distclean-tmp: build clean +core-distclean-tmp: init $i "Bootstrap a new OTP application named $(APP)" $t mkdir $(APP)/ @@ -40,7 +40,7 @@ core-distclean-tmp: build clean $i "Check that .erlang.mk directory got removed" $t test ! -e $(APP)/.erlang.mk -core-help: build clean +core-help: init $i "Bootstrap a new OTP library named $(APP)" $t mkdir $(APP)/ diff --git a/test/core_plugins.mk b/test/core_plugins.mk index d116900..f8fbff3 100644 --- a/test/core_plugins.mk +++ b/test/core_plugins.mk @@ -6,7 +6,7 @@ CORE_PLUGINS_TARGETS = $(call list_targets,core-plugins) core-plugins: $(CORE_PLUGINS_TARGETS) -core-plugins-all: build clean +core-plugins-all: init $i "Bootstrap a new OTP library named $(APP)" $t mkdir $(APP)/ @@ -38,7 +38,7 @@ core-plugins-all: build clean $i "Run 'make plugin2' and check that it prints plugin2" $t test -n "`$(MAKE) -C $(APP) plugin2 | grep plugin2`" -core-plugins-early: build clean +core-plugins-early: init $i "Bootstrap a new OTP library named $(APP)" $t mkdir $(APP)/ @@ -64,7 +64,7 @@ core-plugins-early: build clean $t test -e $(APP)/deps/cowlib $t test -e $(APP)/deps/ranch -core-plugins-early-local: build clean +core-plugins-early-local: init $i "Bootstrap a new OTP library named $(APP)" $t mkdir $(APP)/ @@ -85,7 +85,7 @@ core-plugins-early-local: build clean $i "Run 'make plugin2' and check that it prints plugin2" $t $(MAKE) --no-print-directory -C $(APP) plugin2 | grep -qw plugin2 -core-plugins-early-help: build clean +core-plugins-early-help: init $i "Bootstrap a new OTP library named $(APP)" $t mkdir $(APP)/ @@ -109,7 +109,7 @@ core-plugins-early-help: build clean $i "Run 'make help' and check that it prints external plugins help" $t test -n "`$(MAKE) -C $(APP) help` | grep WORKING" -core-plugins-early-rebar: build clean +core-plugins-early-rebar: init $i "Bootstrap a new OTP library named $(APP)" $t mkdir $(APP)/ @@ -130,7 +130,7 @@ core-plugins-early-rebar: build clean $i "Build the application" $t $(MAKE) -C $(APP) $v -core-plugins-local: build clean +core-plugins-local: init $i "Bootstrap a new OTP library named $(APP)" $t mkdir $(APP)/ @@ -151,7 +151,7 @@ core-plugins-local: build clean $i "Run 'make plugin2' and check that it prints plugin2" $t $(MAKE) --no-print-directory -C $(APP) plugin2 | grep -qw plugin2 -core-plugins-one: build clean +core-plugins-one: init $i "Bootstrap a new OTP library named $(APP)" $t mkdir $(APP)/ @@ -183,7 +183,7 @@ core-plugins-one: build clean $i "Run 'make plugin2' and confirm the target doesn't exist" $t ! $(MAKE) --no-print-directory -C $(APP) plugin2 -core-plugins-templates: build clean +core-plugins-templates: init $i "Bootstrap a new OTP library named $(APP)" $t mkdir $(APP)/ @@ -221,7 +221,7 @@ core-plugins-templates: build clean $i "Check that the file was compiled correctly" $t test -f $(APP)/ebin/test_mk.beam -core-plugins-templates-apps-only: build clean +core-plugins-templates-apps-only: init $i "Create a multi application repository with no root application" $t mkdir $(APP)/ @@ -263,7 +263,7 @@ core-plugins-templates-apps-only: build clean $i "Check that the file was compiled correctly" $t test -f $(APP)/apps/my_app/ebin/test_mk.beam -core-plugins-test: build clean +core-plugins-test: init $i "Bootstrap a new OTP library named $(APP)" $t mkdir $(APP)/ diff --git a/test/core_upgrade.mk b/test/core_upgrade.mk index 2f729e8..84ff54a 100644 --- a/test/core_upgrade.mk +++ b/test/core_upgrade.mk @@ -6,7 +6,7 @@ CORE_UPGRADE_TARGETS = $(call list_targets,core-upgrade) core-upgrade: $(CORE_UPGRADE_TARGETS) -core-upgrade-changelog: build clean +core-upgrade-changelog: init $i "Bootstrap a new OTP library named $(APP)" $t mkdir $(APP)/ @@ -30,7 +30,7 @@ core-upgrade-changelog: build clean $i "Update erlang.mk; CHANGELOG.asciidoc should be printed" $t $(MAKE) -C $(APP) erlang-mk | grep -c "$(APP)$(APP)" | grep -q 1 -core-upgrade-conflicting-configs: build clean +core-upgrade-conflicting-configs: init $i "Bootstrap a new OTP library named $(APP)" $t mkdir $(APP)/ @@ -59,7 +59,7 @@ core-upgrade-conflicting-configs: build clean $i "Check that the bootstrap plugin is gone" $t ! $(MAKE) -C $(APP) list-templates $v -core-upgrade-custom-build-dir: build clean +core-upgrade-custom-build-dir: init $i "Bootstrap a new OTP library named $(APP)" $t mkdir $(APP)/ @@ -85,7 +85,7 @@ core-upgrade-custom-build-dir: build clean $i "Check that the custom build directory is gone" $t test ! -d $(APP)/custom/ -core-upgrade-custom-config: build clean +core-upgrade-custom-config: init $i "Bootstrap a new OTP library named $(APP)" $t mkdir $(APP)/ @@ -101,7 +101,7 @@ core-upgrade-custom-config: build clean $i "Check that the bootstrap plugin is gone" $t ! $(MAKE) -C $(APP) list-templates $v -core-upgrade-custom-repo: build clean +core-upgrade-custom-repo: init $i "Bootstrap a new OTP library named $(APP)" $t mkdir $(APP)/ @@ -127,7 +127,7 @@ core-upgrade-custom-repo: build clean $i "Check our modification is there" $t grep -q "# Copyright (c) erlang.mk Testsuite!" $(APP)/erlang.mk -core-upgrade-delete-tmp-dir: build clean +core-upgrade-delete-tmp-dir: init $i "Bootstrap a new OTP library named $(APP)" $t mkdir $(APP)/ @@ -146,7 +146,7 @@ core-upgrade-delete-tmp-dir: build clean $i "Check that the .erlang.mk directory was removed" $t ! test -e $(APP)/.erlang.mk/ -core-upgrade-no-config: build clean +core-upgrade-no-config: init $i "Bootstrap a new OTP library named $(APP)" $t mkdir $(APP)/ @@ -165,7 +165,7 @@ core-upgrade-no-config: build clean $i "Check that the rule is gone" $t ! $(MAKE) -C $(APP) erlang_mk_upgrade_test_rule $v -core-upgrade-renamed-config: build clean +core-upgrade-renamed-config: init $i "Bootstrap a new OTP library named $(APP)" $t mkdir $(APP)/ diff --git a/test/plugin_asciidoc.mk b/test/plugin_asciidoc.mk index c2c4318..29dfd07 100644 --- a/test/plugin_asciidoc.mk +++ b/test/plugin_asciidoc.mk @@ -9,7 +9,7 @@ asciidoc: $(ASCIIDOC_TARGETS) # Disable the Asciidoc tests requiring the DocBook toolchain # when Asciidoc is not installed. The toolchain is too heavy for CI. ifneq ($(shell which a2x),) -asciidoc-build: build clean +asciidoc-build: init $i "Bootstrap a new OTP application named $(APP)" $t mkdir $(APP)/ @@ -72,7 +72,7 @@ asciidoc-build: build clean $i "Check that AsciiDoc errors out" $t ! $(MAKE) -C $(APP) asciidoc $v -asciidoc-docs: build clean +asciidoc-docs: init $i "Bootstrap a new OTP application named $(APP)" $t mkdir $(APP)/ @@ -93,7 +93,7 @@ asciidoc-docs: build clean $t test -f $(APP)/doc/guide.pdf $t test -d $(APP)/doc/html/ -asciidoc-guide: build clean +asciidoc-guide: init $i "Bootstrap a new OTP application named $(APP)" $t mkdir $(APP)/ @@ -122,7 +122,7 @@ asciidoc-guide: build clean $t test ! -e $(APP)/doc/man3/ endif -asciidoc-install: build clean +asciidoc-install: init $i "Bootstrap a new OTP application named $(APP)" $t mkdir $(APP)/ @@ -150,7 +150,7 @@ asciidoc-install: build clean $i "Check that the documentation was installed properly" $t test -f $(APP)/installed/share/man3/erlang_mk.3.gz -asciidoc-manual: build clean +asciidoc-manual: init $i "Bootstrap a new OTP application named $(APP)" $t mkdir $(APP)/ diff --git a/test/plugin_bootstrap.mk b/test/plugin_bootstrap.mk index ec71388..8f92fc7 100644 --- a/test/plugin_bootstrap.mk +++ b/test/plugin_bootstrap.mk @@ -6,7 +6,7 @@ BOOTSTRAP_TARGETS = $(call list_targets,bootstrap) bootstrap: $(BOOTSTRAP_TARGETS) -bootstrap-app: build clean +bootstrap-app: init $i "Bootstrap a new OTP application named $(APP)" $t mkdir $(APP)/ @@ -37,35 +37,35 @@ endif {module, $(APP)_sup} = code:load_file($(APP)_sup), \ halt()" -bootstrap-invalid-app-name-dash: build clean +bootstrap-invalid-app-name-dash: init $i "Try to bootstrap a new OTP application named test_$@" $t mkdir test_$@/ $t cp ../erlang.mk test_$@/ $t ! $(MAKE) -C test_$@ -f erlang.mk bootstrap $v -bootstrap-invalid-app-name-uppercase: build clean +bootstrap-invalid-app-name-uppercase: init $i "Try to bootstrap a new OTP application named $(APP)_HELLO" $t mkdir $(APP)_HELLO/ $t cp ../erlang.mk $(APP)_HELLO/ $t ! $(MAKE) -C $(APP)_HELLO -f erlang.mk bootstrap $v -bootstrap-invalid-lib-name-dash: build clean +bootstrap-invalid-lib-name-dash: init $i "Try to bootstrap a new OTP library named test_$@" $t mkdir test_$@/ $t cp ../erlang.mk test_$@/ $t ! $(MAKE) -C test_$@ -f erlang.mk bootstrap-lib $v -bootstrap-invalid-lib-name-uppercase: build clean +bootstrap-invalid-lib-name-uppercase: init $i "Try to bootstrap a new OTP library named $(APP)_HELLO" $t mkdir $(APP)_HELLO/ $t cp ../erlang.mk $(APP)_HELLO/ $t ! $(MAKE) -C $(APP)_HELLO -f erlang.mk bootstrap-lib $v -bootstrap-invalid-new-app-name-dash: build clean +bootstrap-invalid-new-app-name-dash: init $i "Bootstrap a new OTP library named $(APP)" $t mkdir $(APP)/ @@ -75,7 +75,7 @@ bootstrap-invalid-new-app-name-dash: build clean $i "Try to create a new application my-app" $t ! $(MAKE) -C $(APP) new-app in=my-app $v -bootstrap-invalid-new-app-name-uppercase: build clean +bootstrap-invalid-new-app-name-uppercase: init $i "Bootstrap a new OTP library named $(APP)" $t mkdir $(APP)/ @@ -85,7 +85,7 @@ bootstrap-invalid-new-app-name-uppercase: build clean $i "Try to create a new application My_app" $t ! $(MAKE) -C $(APP) new-app in=My_app $v -bootstrap-invalid-new-lib-name-dash: build clean +bootstrap-invalid-new-lib-name-dash: init $i "Bootstrap a new OTP library named $(APP)" $t mkdir $(APP)/ @@ -95,7 +95,7 @@ bootstrap-invalid-new-lib-name-dash: build clean $i "Try to create a new library my-lib" $t ! $(MAKE) -C $(APP) new-lib in=my-lib $v -bootstrap-invalid-new-lib-name-uppercase: build clean +bootstrap-invalid-new-lib-name-uppercase: init $i "Bootstrap a new OTP library named $(APP)" $t mkdir $(APP)/ @@ -105,7 +105,7 @@ bootstrap-invalid-new-lib-name-uppercase: build clean $i "Try to create a new library My_lib" $t ! $(MAKE) -C $(APP) new-lib in=My_lib $v -bootstrap-lib: build clean +bootstrap-lib: init $i "Bootstrap a new OTP library named $(APP)" $t mkdir $(APP)/ @@ -130,7 +130,7 @@ endif {ok, []} = application:get_key($(APP), modules), \ halt()" -bootstrap-new-app-sp: build clean +bootstrap-new-app-sp: init $i "Bootstrap a new OTP application named $(APP)" $t mkdir $(APP)/ @@ -162,7 +162,7 @@ endif $t test -f $(APP)/apps/my_app/ebin/my_app_app.beam $t test -f $(APP)/apps/my_app/ebin/my_app_sup.beam -bootstrap-new-app-sp-override: build clean +bootstrap-new-app-sp-override: init $i "Bootstrap a new OTP application named $(APP)" $t mkdir $(APP)/ @@ -194,7 +194,7 @@ endif $t test -f $(APP)/apps/my_app/ebin/my_app_app.beam $t test -f $(APP)/apps/my_app/ebin/my_app_sup.beam -bootstrap-rel: build clean +bootstrap-rel: init $i "Bootstrap a new release-enabled OTP application named $(APP)" $t mkdir $(APP)/ @@ -243,7 +243,7 @@ endif $i "Check that there's no erl_crash.dump file" $t test ! -f $(APP)/_rel/$(APP)_release/erl_crash.dump -bootstrap-sp: build clean +bootstrap-sp: init $i "Bootstrap a new OTP application named $(APP)" $t mkdir $(APP)/ @@ -282,7 +282,7 @@ endif {module, $(APP)_sup} = code:load_file($(APP)_sup), \ halt()" -bootstrap-tab: build clean +bootstrap-tab: init $i "Bootstrap a new OTP application named $(APP)" $t mkdir $(APP)/ @@ -304,7 +304,7 @@ endif $t test "`awk -F "\t" 'NF > 1' $(APP)/src/$(APP)_app.erl`" $t test "`awk -F "\t" 'NF > 1' $(APP)/src/$(APP)_sup.erl`" -bootstrap-templates: build clean +bootstrap-templates: init $i "Bootstrap a new OTP library named $(APP)" $t mkdir $(APP)/ diff --git a/test/plugin_c_src.mk b/test/plugin_c_src.mk index 289f08c..eeee445 100644 --- a/test/plugin_c_src.mk +++ b/test/plugin_c_src.mk @@ -13,7 +13,7 @@ else C_SRC_OUTPUT_EXECUTABLE_EXTENSION = .so endif -c-src-makefile-change: build clean +c-src-makefile-change: init $i "Bootstrap a new OTP library named $(APP)" $t mkdir $(APP)/ @@ -41,7 +41,7 @@ c-src-makefile-change: build clean $t find $(APP) -type f -newer $(APP)/Makefile -not -path "$(APP)/.erlang.mk/*" | sort | diff $(APP)/EXPECT - $t rm $(APP)/EXPECT -c-src-nif: build clean +c-src-nif: init $i "Bootstrap a new OTP library named $(APP)" $t mkdir $(APP)/ @@ -109,7 +109,7 @@ c-src-nif: build clean $i "Check that all files were removed" $t test ! -e $(APP)/c_src/env.mk -c-src-nif-missing-name: build clean +c-src-nif-missing-name: init $i "Bootstrap a new OTP library named $(APP)" $t mkdir $(APP)/ diff --git a/test/plugin_cover.mk b/test/plugin_cover.mk index ccb5f12..a1d7e51 100644 --- a/test/plugin_cover.mk +++ b/test/plugin_cover.mk @@ -6,7 +6,7 @@ COVER_TARGETS = $(call list_targets,cover) cover: $(COVER_TARGETS) -cover-ct: build clean +cover-ct: init $i "Bootstrap a new OTP application named $(APP)" $t mkdir $(APP)/ @@ -33,7 +33,7 @@ cover-ct: build clean $t test ! -e $(APP)/cover/ct.coverdata $t test ! -e $(APP)/test/ct.cover.spec -cover-ct-incl-apps: build clean +cover-ct-incl-apps: init $i "Bootstrap a new OTP application named $(APP)" $t mkdir $(APP)/ @@ -76,7 +76,7 @@ endif $t test -f $(APP)/logs/ct_run.*/app_three_app.COVER.html $t ! test -e $(APP)/logs/ct_run.*/app_two_app.COVER.html -cover-ct-incl-apps-default: build clean +cover-ct-incl-apps-default: init $i "Bootstrap a new OTP application named $(APP)" $t mkdir $(APP)/ @@ -116,7 +116,7 @@ endif $t test -f $(APP)/logs/ct_run.*/app_two_app.COVER.html $t test -f $(APP)/logs/ct_run.*/app_three_app.COVER.html -cover-ct-incl-deps: build clean +cover-ct-incl-deps: init $i "Bootstrap a new OTP application named $(APP)" $t mkdir $(APP)/ @@ -150,7 +150,7 @@ endif $t test -f $(APP)/logs/ct_run.*/cow_http_hd.COVER.html $t ! test -e $(APP)/logs/ct_run.*/ranch_app.COVER.html -cover-custom-dir: build clean +cover-custom-dir: init $i "Bootstrap a new OTP application named $(APP)" $t mkdir $(APP)/ @@ -206,7 +206,7 @@ cover-custom-dir: build clean $t $(MAKE) -C $(APP) distclean $v $t test -f $(APP)/custom_dir/file -cover-eunit: build clean +cover-eunit: init $i "Bootstrap a new OTP application named $(APP)" $t mkdir $(APP)/ @@ -231,7 +231,7 @@ cover-eunit: build clean $t $(MAKE) -C $(APP) clean $v $t test ! -e $(APP)/cover/eunit.coverdata -cover-eunit-apps-only: build clean +cover-eunit-apps-only: init $i "Create a multi application repository with no root application" $t mkdir $(APP)/ @@ -258,7 +258,7 @@ cover-eunit-apps-only: build clean $i "Check that the generated file exists" $t test -f $(APP)/apps/my_app/cover/eunit.coverdata -cover-eunit-incl-apps: build clean +cover-eunit-incl-apps: init $i "Bootstrap a new OTP application named $(APP)" $t mkdir $(APP)/ @@ -304,7 +304,7 @@ endif $t test -f $(APP)/cover/app_three_app.COVER.html $t ! test -e $(APP)/cover/app_two_app.COVER.html -cover-eunit-incl-apps-default: build clean +cover-eunit-incl-apps-default: init $i "Bootstrap a new OTP application named $(APP)" $t mkdir $(APP)/ @@ -347,7 +347,7 @@ endif $t test -f $(APP)/cover/app_two_app.COVER.html $t test -f $(APP)/cover/app_three_app.COVER.html -cover-eunit-incl-deps: build clean +cover-eunit-incl-deps: init $i "Bootstrap a new OTP application named $(APP)" $t mkdir $(APP)/ @@ -384,7 +384,7 @@ endif $t test -f $(APP)/cover/cow_http_hd.COVER.html $t ! test -e $(APP)/cover/ranch_app.COVER.html -cover-proper: build clean +cover-proper: init $i "Bootstrap a new OTP application named $(APP)" $t mkdir $(APP)/ @@ -412,7 +412,7 @@ cover-proper: build clean $t $(MAKE) -C $(APP) clean $v $t test ! -e $(APP)/cover/proper.coverdata -cover-report-and-merge: build clean +cover-report-and-merge: init $i "Bootstrap a new OTP application named $(APP)" $t mkdir $(APP)/ @@ -460,7 +460,7 @@ cover-report-and-merge: build clean $t $(MAKE) -C $(APP) distclean $v $t test ! -e $(APP)/cover/ -cover-triq: build clean +cover-triq: init $i "Bootstrap a new OTP application named $(APP)" $t mkdir $(APP)/ diff --git a/test/plugin_ct.mk b/test/plugin_ct.mk index 0aaf1ea..381eb5a 100644 --- a/test/plugin_ct.mk +++ b/test/plugin_ct.mk @@ -6,7 +6,7 @@ CT_TARGETS = $(call list_targets,ct) ct: $(CT_TARGETS) -ct-all: build clean +ct-all: init $i "Bootstrap a new OTP application named $(APP)" $t mkdir $(APP)/ @@ -49,7 +49,7 @@ ct-all: build clean $t $(MAKE) -C $(APP) distclean $v $t test ! -e $(APP)/logs/index.html -ct-apps: build clean +ct-apps: init $i "Create a multi application repository with root application" $t mkdir $(APP)/ @@ -83,7 +83,7 @@ ct-apps: build clean $i "Check that Common Test runs tests from a specific test suite using CT_SUITES" $t $(MAKE) -C $(APP) ct CT_SUITES=my_root $v -ct-apps-only: build clean +ct-apps-only: init $i "Create a multi application repository with no root application" $t mkdir $(APP)/ @@ -131,7 +131,7 @@ ct-apps-only: build clean $t test -f $(APP)/apps/my_app_only/logs/index.html $t test -f $(APP)/apps/my_lib_only/logs/index.html -ct-case: build clean +ct-case: init $i "Bootstrap a new OTP application named $(APP)" $t mkdir $(APP)/ @@ -151,7 +151,7 @@ ct-case: build clean $i "Check that we can run Common Test on a specific test case" $t $(MAKE) -C $(APP) ct-$(APP) t=mygroup:ok $v -ct-case-without-group: build clean +ct-case-without-group: init $i "Bootstrap a new OTP application named $(APP)" $t mkdir $(APP)/ @@ -170,7 +170,7 @@ ct-case-without-group: build clean $i "Check that we can run Common Test on a specific test case" $t $(MAKE) -C $(APP) ct-$(APP) c=ok $v -ct-check: build clean +ct-check: init $i "Bootstrap a new OTP application named $(APP)" $t mkdir $(APP)/ @@ -190,7 +190,7 @@ ct-check: build clean $t $(MAKE) -C $(APP) check $v $t test -f $(APP)/logs/index.html -ct-group: build clean +ct-group: init $i "Bootstrap a new OTP application named $(APP)" $t mkdir $(APP)/ @@ -210,7 +210,7 @@ ct-group: build clean $i "Check that we can run Common Test on a specific group" $t $(MAKE) -C $(APP) ct-$(APP) t=okgroup $v -ct-opts: build clean +ct-opts: init $i "Bootstrap a new OTP application named $(APP)" $t mkdir $(APP)/ @@ -234,7 +234,7 @@ ct-opts: build clean $i "Check that Common Test uses options from CT_OPTS" $t grep -q hello_ct_opts $(APP)/logs/index.html -ct-logs-dir: build clean +ct-logs-dir: init $i "Bootstrap a new OTP application named $(APP)" $t mkdir $(APP)/ @@ -257,7 +257,7 @@ ct-logs-dir: build clean $t $(MAKE) -C $(APP) ct $v $t test -f $(APP)/custom_dir/index.html -ct-suite: build clean +ct-suite: init $i "Bootstrap a new OTP application named $(APP)" $t mkdir $(APP)/ @@ -280,7 +280,7 @@ ct-suite: build clean $i "Check that we can run Common Test on a specific test suite" $t $(MAKE) -C $(APP) ct-$(APP)_ok $v -ct-tests: build clean +ct-tests: init $i "Bootstrap a new OTP application named $(APP)" $t mkdir $(APP)/ diff --git a/test/plugin_dialyzer.mk b/test/plugin_dialyzer.mk index a487fae..d8b9455 100644 --- a/test/plugin_dialyzer.mk +++ b/test/plugin_dialyzer.mk @@ -10,7 +10,7 @@ endif dialyzer: $(DIALYZER_TARGETS) -dialyzer-app: build clean +dialyzer-app: init $i "Bootstrap a new OTP application named $(APP)" $t mkdir $(APP)/ @@ -37,7 +37,7 @@ dialyzer-app: build clean $i "Check that the PLT file was removed" $t test ! -e $(APP)/.$(APP).plt -dialyzer-apps-only: build clean +dialyzer-apps-only: init $i "Create a multi application repository with no root application" $t mkdir $(APP)/ @@ -70,7 +70,7 @@ dialyzer-apps-only: build clean $i "Confirm that Dialyzer errors out" $t ! $(DIALYZER_MUTEX) $(MAKE) -C $(APP) dialyze $v -dialyzer-apps-with-local-deps: build clean +dialyzer-apps-with-local-deps: init $i "Create a multi application repository with no root application" $t mkdir $(APP)/ @@ -95,7 +95,7 @@ dialyzer-apps-with-local-deps: build clean $i "Confirm that my_core_app was NOT included in the PLT" $t ! dialyzer --plt_info --plt $(APP)/.$(APP).plt | grep -q my_core_app -dialyzer-beam: build clean +dialyzer-beam: init $i "Bootstrap a new OTP application named $(APP)" $t mkdir $(APP)/ @@ -126,7 +126,7 @@ dialyzer-beam: build clean $i "Run Dialyzer again using the produced PLT file" $t $(DIALYZER_MUTEX) $(MAKE) -C $(APP) dialyze $v -dialyzer-check: build clean +dialyzer-check: init $i "Bootstrap a new OTP application named $(APP)" $t mkdir $(APP)/ @@ -147,7 +147,7 @@ dialyzer-check: build clean $i "Confirm that Dialyzer errors out on 'make check'" $t ! $(DIALYZER_MUTEX) $(MAKE) -C $(APP) check $v -dialyzer-custom-plt: build clean +dialyzer-custom-plt: init $i "Bootstrap a new OTP application named $(APP)" $t mkdir $(APP)/ @@ -169,7 +169,7 @@ dialyzer-custom-plt: build clean $i "Check that the PLT file was removed" $t test ! -e $(APP)/custom.plt -dialyzer-deps: build clean +dialyzer-deps: init $i "Bootstrap a new OTP application named $(APP)" $t mkdir $(APP)/ @@ -188,7 +188,7 @@ dialyzer-deps: build clean $i "Confirm that Cowlib was included in the PLT" $t dialyzer --plt_info --plt $(APP)/.$(APP).plt | grep -q cowlib -dialyzer-erlc-opts: build clean +dialyzer-erlc-opts: init $i "Bootstrap a new OTP application named $(APP)" $t mkdir $(APP)/ @@ -212,7 +212,7 @@ dialyzer-erlc-opts: build clean $i "Run Dialyzer" $t $(DIALYZER_MUTEX) $(MAKE) -C $(APP) dialyze $v -dialyzer-local-deps: build clean +dialyzer-local-deps: init $i "Bootstrap a new OTP application named $(APP)" $t mkdir $(APP)/ @@ -228,7 +228,7 @@ dialyzer-local-deps: build clean $i "Confirm that runtime_tools was included in the PLT" $t dialyzer --plt_info --plt $(APP)/.$(APP).plt | grep -q runtime_tools -dialyzer-opts: build clean +dialyzer-opts: init $i "Bootstrap a new OTP application named $(APP)" $t mkdir $(APP)/ @@ -253,7 +253,7 @@ dialyzer-opts: build clean $i "Check that the output file was created" $t test -f $(APP)/output.txt -dialyzer-plt-apps: build clean +dialyzer-plt-apps: init $i "Bootstrap a new OTP application named $(APP)" $t mkdir $(APP)/ @@ -269,7 +269,7 @@ dialyzer-plt-apps: build clean $i "Confirm that runtime_tools was included in the PLT" $t dialyzer --plt_info --plt $(APP)/.$(APP).plt | grep -q runtime_tools -dialyzer-plt-ebin-only: build clean +dialyzer-plt-ebin-only: init $i "Bootstrap a new OTP application named $(APP)" $t mkdir $(APP)/ @@ -297,7 +297,7 @@ dialyzer-plt-ebin-only: build clean $i "Confirm that rebar files were not included in the PLT" $t ! dialyzer --plt_info --plt $(APP)/.$(APP).plt | grep -q rebar -dialyzer-plt-swallow-warnings: build clean +dialyzer-plt-swallow-warnings: init $i "Bootstrap a new OTP application named $(APP)" $t mkdir $(APP)/ @@ -310,7 +310,7 @@ dialyzer-plt-swallow-warnings: build clean $i "Create the PLT file" $t $(DIALYZER_MUTEX) $(MAKE) -C $(APP) plt $v -dialyzer-pt: build clean +dialyzer-pt: init $i "Bootstrap a new OTP library named $(APP)" $t mkdir $(APP)/ diff --git a/test/plugin_edoc.mk b/test/plugin_edoc.mk index 1ae11b1..1779797 100644 --- a/test/plugin_edoc.mk +++ b/test/plugin_edoc.mk @@ -6,7 +6,7 @@ EDOC_TARGETS = $(call list_targets,edoc) edoc: $(EDOC_TARGETS) -edoc-build: build clean +edoc-build: init $i "Bootstrap a new OTP application named $(APP)" $t mkdir $(APP)/ @@ -58,7 +58,7 @@ edoc-build: build clean $i "Check that EDoc errors out" $t ! $(MAKE) -C $(APP) edoc $v -edoc-docs: build clean +edoc-docs: init $i "Bootstrap a new OTP application named $(APP)" $t mkdir $(APP)/ @@ -81,7 +81,7 @@ edoc-docs: build clean $i "Check that the overview.edoc file was used" $t grep -q frobnicator $(APP)/doc/overview-summary.html -edoc-no-overview: build clean +edoc-no-overview: init $i "Bootstrap a new OTP application named $(APP)" $t mkdir $(APP)/ @@ -92,7 +92,7 @@ edoc-no-overview: build clean $t $(MAKE) -C $(APP) docs $v $t test ! -e $(APP)/doc/index.html -edoc-opts: build clean +edoc-opts: init $i "Bootstrap a new OTP application named $(APP)" $t mkdir $(APP)/ @@ -110,7 +110,7 @@ edoc-opts: build clean $t test -f $(APP)/doc/$(APP)_app.md $t test -f $(APP)/doc/$(APP)_sup.md -edoc-src-dirs: build clean +edoc-src-dirs: init $i "Create a multi application repository with a root application" $t mkdir $(APP)/ diff --git a/test/plugin_erlydtl.mk b/test/plugin_erlydtl.mk index 1735595..1dac6e1 100644 --- a/test/plugin_erlydtl.mk +++ b/test/plugin_erlydtl.mk @@ -6,7 +6,7 @@ ERLYDTL_TARGETS = $(call list_targets,erlydtl) erlydtl: $(ERLYDTL_TARGETS) -erlydtl-compile: build clean +erlydtl-compile: init $i "Bootstrap a new OTP library named $(APP)" $t mkdir $(APP)/ @@ -34,7 +34,7 @@ erlydtl-compile: build clean {ok, [$(APP_)_one_dtl, $(APP)_two_dtl]} = application:get_key($(APP), modules), \ halt()" -erlydtl-custom-tag: build clean +erlydtl-custom-tag: init $i "Bootstrap a new OTP library named $(APP)" $t mkdir $(APP)/ @@ -81,7 +81,7 @@ erlydtl-custom-tag: build clean 'file:write_file("$(APP)/OUT", element(2, $(APP)_dtl:render())), halt()' $t cat $(APP)/OUT | grep -q hello -erlydtl-full-path: build clean +erlydtl-full-path: init $i "Bootstrap a new OTP library named $(APP)" $t mkdir $(APP)/ @@ -109,7 +109,7 @@ erlydtl-full-path: build clean {ok, [deep_$(APP)_two_dtl, $(APP_)_one_dtl]} = application:get_key($(APP), modules), \ halt()" -erlydtl-include-template: build clean +erlydtl-include-template: init $i "Bootstrap a new OTP library named $(APP)" $t mkdir $(APP)/ @@ -136,7 +136,7 @@ erlydtl-include-template: build clean {ok, [foo, foo_bar, foo_baz]} = application:get_key($(APP), modules), \ halt()" -erlydtl-opts: build clean +erlydtl-opts: init $i "Bootstrap a new OTP library named $(APP)" $t mkdir $(APP)/ @@ -173,7 +173,7 @@ erlydtl-opts: build clean <<\"<&>\", _/binary>> = iolist_to_binary(Result), \ halt()" -erlydtl-path-full-path-suffix: build clean +erlydtl-path-full-path-suffix: init $i "Bootstrap a new OTP library named $(APP)" $t mkdir $(APP)/ @@ -198,7 +198,7 @@ erlydtl-path-full-path-suffix: build clean {ok, [one_suffix, two_three_suffix]} = application:get_key($(APP), modules), \ halt()" -erlydtl-prefix: build clean +erlydtl-prefix: init $i "Bootstrap a new OTP library named $(APP)" $t mkdir $(APP)/ @@ -223,7 +223,7 @@ erlydtl-prefix: build clean {ok, [number_one_dtl, number_two_dtl]} = application:get_key($(APP), modules), \ halt()" -erlydtl-suffix: build clean +erlydtl-suffix: init $i "Bootstrap a new OTP library named $(APP)" $t mkdir $(APP)/ diff --git a/test/plugin_escript.mk b/test/plugin_escript.mk index 4a3d7a0..f80db46 100644 --- a/test/plugin_escript.mk +++ b/test/plugin_escript.mk @@ -6,7 +6,7 @@ ESCRIPT_TARGETS = $(call list_targets,escript) escript: $(ESCRIPT_TARGETS) -escript-build: build clean +escript-build: init $i "Bootstrap a new OTP library named $(APP)" $t mkdir $(APP)/ @@ -34,7 +34,7 @@ escript-build: build clean $i "Check that the escript was removed" $t test ! -e $(APP)/$(APP) -escript-build-deps: build clean +escript-build-deps: init $i "Bootstrap a new OTP library named $(APP)" $t mkdir $(APP)/ @@ -65,7 +65,7 @@ escript-build-deps: build clean $i "Check that the escript does not contain the build dependency" $t ! zipinfo $(APP)/$(APP) 2> /dev/null | grep -q lfe -escript-deps: build clean +escript-deps: init $i "Bootstrap a new OTP library named $(APP)" $t mkdir $(APP)/ @@ -90,7 +90,7 @@ escript-deps: build clean $i "Check that the escript contains the dependency" $t zipinfo $(APP)/$(APP) 2> /dev/null | grep -q ranch -escript-deps-with-deps: build clean +escript-deps-with-deps: init $i "Bootstrap a new OTP library named $(APP)" $t mkdir $(APP)/ @@ -120,7 +120,7 @@ escript-deps-with-deps: build clean $t zipinfo $(APP)/$(APP) 2> /dev/null | grep -q cowlib $t zipinfo $(APP)/$(APP) 2> /dev/null | grep -q ranch -escript-distclean: build clean +escript-distclean: init $i "Bootstrap a new OTP library named $(APP)" $t mkdir $(APP)/ @@ -148,7 +148,7 @@ escript-distclean: build clean $t test ! -f $(APP)/$(APP) $t test ! -f $(APP)/real-escript -escript-extra: build clean +escript-extra: init $i "Bootstrap a new OTP library named $(APP)" $t mkdir $(APP)/ diff --git a/test/plugin_eunit.mk b/test/plugin_eunit.mk index 083803a..e5fc197 100644 --- a/test/plugin_eunit.mk +++ b/test/plugin_eunit.mk @@ -6,7 +6,7 @@ EUNIT_TARGETS = $(call list_targets,eunit) eunit: $(EUNIT_TARGETS) -eunit-all: build clean +eunit-all: init $i "Bootstrap a new OTP application named $(APP)" $t mkdir $(APP)/ @@ -43,7 +43,7 @@ eunit-all: build clean $i "Check that EUnit errors out" $t ! $(MAKE) -C $(APP) eunit $v -eunit-apps-include-lib: build clean +eunit-apps-include-lib: init $i "Bootstrap a new OTP library named $(APP)" $t mkdir $(APP)/ @@ -82,7 +82,7 @@ eunit-apps-include-lib: build clean $i "Distclean the application" $t $(MAKE) -C $(APP) distclean $v -eunit-apps-one-app-tested: build clean +eunit-apps-one-app-tested: init $i "Bootstrap a new OTP library named $(APP)" $t mkdir $(APP)/ @@ -114,7 +114,7 @@ eunit-apps-one-app-tested: build clean $i "Run EUnit on my_app only" $t $(MAKE) -C $(APP)/apps/my_app eunit | grep -c "Test passed." | grep -q 1 -eunit-apps-only: build clean +eunit-apps-only: init $i "Create a multi application repository with no root application" $t mkdir $(APP)/ @@ -149,7 +149,7 @@ eunit-apps-only: build clean $i "Check that EUnit runs tests" $t $(MAKE) -C $(APP) eunit | grep -c "Test passed." | grep -q 2 -eunit-apps-only-error: build clean +eunit-apps-only-error: init $i "Create a multi application repository with no root application" $t mkdir $(APP)/ @@ -198,7 +198,7 @@ eunit-apps-only-error: build clean $i "Check exit code of EUnit for the whole project with broken test should be non-zero" $t ! $(MAKE) -C $(APP) eunit $v -eunit-check: build clean +eunit-check: init $i "Bootstrap a new OTP application named $(APP)" $t mkdir $(APP)/ @@ -216,7 +216,7 @@ eunit-check: build clean $i "Check that EUnit runs on 'make check'" $t $(MAKE) -C $(APP) check | grep -c "Test passed." | grep -q 1 -eunit-erl-opts: build clean +eunit-erl-opts: init $i "Bootstrap a new OTP application named $(APP)" $t mkdir $(APP)/ @@ -237,7 +237,7 @@ eunit-erl-opts: build clean $i "Check that EUnit uses EUNIT_ERL_OPTS" $t $(MAKE) -C $(APP) eunit | grep -c "hello" | grep -q 1 -eunit-fun: build clean +eunit-fun: init $i "Bootstrap a new OTP application named $(APP)" $t mkdir $(APP)/ @@ -256,7 +256,7 @@ eunit-fun: build clean $i "Check that we can run EUnit on a specific test" $t $(MAKE) -C $(APP) eunit t=$(APP):ok_test $v -eunit-mod: build clean +eunit-mod: init $i "Bootstrap a new OTP application named $(APP)" $t mkdir $(APP)/ @@ -282,7 +282,7 @@ eunit-mod: build clean $i "Check that we can run EUnit on a specific module" $t $(MAKE) -C $(APP) eunit t=$(APP) $v -eunit-priv: build clean +eunit-priv: init $i "Bootstrap a new OTP application named $(APP)" $t mkdir $(APP)/ @@ -300,7 +300,7 @@ eunit-priv: build clean $i "Check that EUnit can resolve the priv_dir" $t $(MAKE) -C $(APP) tests | grep -c "Test passed." | grep -q 1 -eunit-test-dir: build clean +eunit-test-dir: init $i "Bootstrap a new OTP application named $(APP)" $t mkdir $(APP)/ @@ -328,7 +328,7 @@ eunit-test-dir: build clean $i "Check that tests were both run only once" $t printf "%s\n" $(APP) $(APP)_tests | cmp $(APP)/eunit.log - -eunit-tests: build clean +eunit-tests: init $i "Bootstrap a new OTP application named $(APP)" $t mkdir $(APP)/ diff --git a/test/plugin_proper.mk b/test/plugin_proper.mk index ca92d91..108b6e4 100644 --- a/test/plugin_proper.mk +++ b/test/plugin_proper.mk @@ -6,7 +6,7 @@ PROPER_TARGETS = $(call list_targets,proper) proper: $(PROPER_TARGETS) -proper-test-dir: build clean +proper-test-dir: init $i "Bootstrap a new OTP application named $(APP)" $t mkdir $(APP)/ diff --git a/test/plugin_protobuffs.mk b/test/plugin_protobuffs.mk index 5a23cf4..0d29e4b 100644 --- a/test/plugin_protobuffs.mk +++ b/test/plugin_protobuffs.mk @@ -8,7 +8,7 @@ protobuffs: $(PROTOBUFFS_TARGETS) PROTOBUFFS_URL = https://raw.githubusercontent.com/basho/erlang_protobuffs/master/test/erlang_protobuffs_SUITE_data -protobuffs-compile: build clean +protobuffs-compile: init $i "Bootstrap a new OTP library named $(APP)" $t mkdir $(APP)/ @@ -40,7 +40,7 @@ protobuffs-compile: build clean {ok, [empty_pb, simple_pb]} = application:get_key($(APP), modules), \ halt()" -protobuffs-compile-with-gpb: build clean +protobuffs-compile-with-gpb: init $i "Bootstrap a new OTP library named $(APP)" $t mkdir $(APP)/ @@ -72,7 +72,7 @@ protobuffs-compile-with-gpb: build clean {ok, [empty_pb, simple_pb]} = application:get_key($(APP), modules), \ halt()" -protobuffs-makefile-change: build clean +protobuffs-makefile-change: init $i "Bootstrap a new OTP library named $(APP)" $t mkdir $(APP)/ diff --git a/test/plugin_relx.mk b/test/plugin_relx.mk index 92b141f..e71cb8f 100644 --- a/test/plugin_relx.mk +++ b/test/plugin_relx.mk @@ -15,7 +15,7 @@ endif relx: $(RELX_TARGETS) -relx-rel: build clean +relx-rel: init $i "Bootstrap a new release named $(APP)" $t mkdir $(APP)/ @@ -53,7 +53,7 @@ relx-rel: build clean $i "Check that the output directory was removed entirely" $t test ! -d $(APP)/_rel/ -relx-apps-with-deps: build clean +relx-apps-with-deps: init $i "Bootstrap a new release as a multi application repository" $t mkdir $(APP)/ @@ -87,7 +87,7 @@ endif $i "Check that Cowlib was included in the release" $t test -d $(APP)/_rel/test_relx_apps_with_deps_release/lib/cowlib-1.0.2 -relx-bare-rel: build clean +relx-bare-rel: init $i "Bootstrap a new release named $(APP)" $t mkdir $(APP)/ @@ -108,7 +108,7 @@ relx-bare-rel: build clean $t test -d $(APP)/_rel/$(APP)_release/releases $t test -d $(APP)/_rel/$(APP)_release/releases/1 -relx-post-rel: build clean +relx-post-rel: init $i "Bootstrap a new release named $(APP)" $t mkdir $(APP)/ @@ -154,7 +154,7 @@ relx-post-rel: build clean $i "Check that the output directory was removed entirely" $t test ! -d $(APP)/_rel/ -relx-relup: build clean +relx-relup: init $i "Bootstrap a new release named $(APP)" $t mkdir $(APP)/ @@ -243,7 +243,7 @@ ifeq ($(PLATFORM),msys2) $t $(APP)/_rel/$(APP)_release/bin/$(APP)_release$(RELX_REL_EXT) uninstall $v endif -relx-start-stop: build clean +relx-start-stop: init $i "Bootstrap a new release named $(APP)" $t mkdir $(APP)/ @@ -272,7 +272,7 @@ endif $i "Check that further pings get no replies" $t ! $(APP)/_rel/$(APP)_release/bin/$(APP)_release$(RELX_REL_EXT) ping $v -relx-tar: build clean +relx-tar: init $i "Bootstrap a new release named $(APP)" $t mkdir $(APP)/ @@ -291,7 +291,7 @@ relx-tar: build clean $i "Check that tarball exists" $t test -f $(APP)/_rel/$(APP)_release/$(APP)_release-1.tar.gz -relx-vsn: build clean +relx-vsn: init $i "Bootstrap a new release named $(APP)" $t mkdir $(APP)/ diff --git a/test/plugin_shell.mk b/test/plugin_shell.mk index 5a43678..06b973a 100644 --- a/test/plugin_shell.mk +++ b/test/plugin_shell.mk @@ -6,7 +6,7 @@ SHELL_TARGETS = $(call list_targets,shell) shell: $(SHELL_TARGETS) -shell-compile: build clean +shell-compile: init $i "Bootstrap a new OTP application named $(APP)" $t mkdir $(APP)/ @@ -25,7 +25,7 @@ shell-compile: build clean $t test -f $(APP)/ebin/$(APP)_app.beam $t test -f $(APP)/ebin/$(APP)_sup.beam -shell-default: build clean +shell-default: init $i "Bootstrap a new OTP library named $(APP)" $t mkdir $(APP)/ @@ -35,7 +35,7 @@ shell-default: build clean $i "Run the shell" $t $(MAKE) -C $(APP) shell SHELL_OPTS="-eval 'halt()'" $v -shell-kjell: build clean +shell-kjell: init $i "Bootstrap a new OTP library named $(APP)" $t mkdir $(APP)/ @@ -48,7 +48,7 @@ shell-kjell: build clean $i "Run the shell" $t $(MAKE) -C $(APP) shell SHELL_OPTS="-eval 'halt()'" $v -shell-test-dir: build clean +shell-test-dir: init $i "Bootstrap a new OTP library named $(APP)" $t mkdir $(APP)/ diff --git a/test/plugin_sphinx.mk b/test/plugin_sphinx.mk index d5e51e4..915bf8b 100644 --- a/test/plugin_sphinx.mk +++ b/test/plugin_sphinx.mk @@ -11,7 +11,7 @@ endif sphinx: $(SPHINX_TARGETS) -sphinx-build: build clean +sphinx-build: init $i "Bootstrap a new OTP application named $(APP)" $t mkdir $(APP)/ @@ -44,7 +44,7 @@ sphinx-build: build clean $i "Check that the 'today' macro was defined" $t grep -q erlang_mk_sphinx_today $(APP)/html/manpage.html -sphinx-source-dir: build clean +sphinx-source-dir: init $i "Bootstrap a new OTP application named $(APP)" $t mkdir $(APP)/ @@ -64,7 +64,7 @@ sphinx-source-dir: build clean $t test -f $(APP)/html/index.html $t test -f $(APP)/html/manpage.html -sphinx-formats: build clean +sphinx-formats: init $i "Bootstrap a new OTP application named $(APP)" $t mkdir $(APP)/ @@ -113,7 +113,7 @@ sphinx-formats: build clean $t test ! -e $(APP)/sphinx/html_output/index.html $t test ! -e $(APP)/sphinx/html_output/manpage.html -sphinx-format-opts: build clean +sphinx-format-opts: init $i "Bootstrap a new OTP application named $(APP)" $t mkdir $(APP)/ diff --git a/test/plugin_triq.mk b/test/plugin_triq.mk index 7350cf7..58fd217 100644 --- a/test/plugin_triq.mk +++ b/test/plugin_triq.mk @@ -6,7 +6,7 @@ TRIQ_TARGETS = $(call list_targets,triq) triq: $(TRIQ_TARGETS) -triq-test-dir: build clean +triq-test-dir: init $i "Bootstrap a new OTP application named $(APP)" $t mkdir $(APP)/ -- cgit v1.2.3