diff options
author | Loïc Hoguin <[email protected]> | 2019-06-26 14:47:18 +0200 |
---|---|---|
committer | Loïc Hoguin <[email protected]> | 2019-06-26 14:47:18 +0200 |
commit | 3d4edcf31426a766be26caae329ff0cc688a83d7 (patch) | |
tree | 344f2a79514dfe0626070705b77f1bf5c58c28d9 | |
parent | db8fc6859985287ae40a548b1296e2ef116ce73e (diff) | |
download | erlang.mk-3d4edcf31426a766be26caae329ff0cc688a83d7.tar.gz erlang.mk-3d4edcf31426a766be26caae329ff0cc688a83d7.tar.bz2 erlang.mk-3d4edcf31426a766be26caae329ff0cc688a83d7.zip |
Fix "make eunit/ct" not fetching apps dependencies
-rw-r--r-- | core/test.mk | 2 | ||||
-rw-r--r-- | test/plugin_eunit.mk | 21 |
2 files changed, 21 insertions, 2 deletions
diff --git a/core/test.mk b/core/test.mk index 3cc9d0a..bbacbbe 100644 --- a/core/test.mk +++ b/core/test.mk @@ -55,7 +55,7 @@ endif # We only care about compiling the current application. ifdef IS_APP test-build-app:: ERLC_OPTS=$(TEST_ERLC_OPTS) -test-build-app:: test-deps +test-build-app:: deps test-deps ifneq ($(wildcard $(TEST_DIR)),) $(verbose) $(MAKE) --no-print-directory test-dir ERLC_OPTS="$(call escape_dquotes,$(TEST_ERLC_OPTS))" endif diff --git a/test/plugin_eunit.mk b/test/plugin_eunit.mk index 8fa7b59..768358c 100644 --- a/test/plugin_eunit.mk +++ b/test/plugin_eunit.mk @@ -71,7 +71,7 @@ eunit-apps-include-lib: init $t $(MAKE) -C $(APP) $v $i "Run eunit" - $t $(MAKE) -C $(APP) $v + $t $(MAKE) -C $(APP) eunit $v $i "Distclean the application" $t $(MAKE) -C $(APP) distclean $v @@ -82,6 +82,25 @@ eunit-apps-include-lib: init $i "Distclean the application" $t $(MAKE) -C $(APP) distclean $v +eunit-apps-include-lib-deps: init + + $i "Bootstrap a new OTP library named $(APP)" + $t mkdir $(APP)/ + $t cp ../erlang.mk $(APP)/ + $t $(MAKE) -C $(APP) -f erlang.mk bootstrap-lib $v + + $i "Create new library the_app" + $t $(MAKE) -C $(APP) new-lib in=the_app $v + + $i "Add Cowlib to the list of dependencies of the_app" + $t perl -ni.bak -e 'print;if ($$.==1) {print "DEPS = cowlib\ndep_cowlib_commit = master\n"}' $(APP)/apps/the_app/Makefile + + $i "Generate .erl file that uses include_lib()" + $t echo '-module(the). -include_lib("cowlib/include/cow_parse.hrl"). -export([thing/0]). thing() -> true.' > $(APP)/apps/the_app/src/the.erl + + $i "Run eunit" + $t $(MAKE) -C $(APP) eunit $v + eunit-apps-one-app-tested: init $i "Bootstrap a new OTP library named $(APP)" |