diff options
author | Loïc Hoguin <[email protected]> | 2016-11-29 18:24:41 +0100 |
---|---|---|
committer | Loïc Hoguin <[email protected]> | 2016-11-29 18:24:41 +0100 |
commit | 0b1932ec65386d08a862cdfc3e01c4b23a7220a2 (patch) | |
tree | 588656d9c42d21fdcd9552254336949d47036605 /test | |
parent | e519628eec711ff295096358652f60f42828e6b4 (diff) | |
download | erlang.mk-0b1932ec65386d08a862cdfc3e01c4b23a7220a2.tar.gz erlang.mk-0b1932ec65386d08a862cdfc3e01c4b23a7220a2.tar.bz2 erlang.mk-0b1932ec65386d08a862cdfc3e01c4b23a7220a2.zip |
Give ebin paths when creating the PLT
Before we had Dialyzer look for BEAM files in every subfolders
of every deps. This resulted in the PLT bundling extra files
and/or Dialyzer failing because some of them are not built with
+debug_info, or because there are duplicates (in test logs for
example). Now Dialyzer will only look in ebin/.
Diffstat (limited to 'test')
-rw-r--r-- | test/plugin_dialyzer.mk | 30 |
1 files changed, 29 insertions, 1 deletions
diff --git a/test/plugin_dialyzer.mk b/test/plugin_dialyzer.mk index af7a5f4..9a13bcd 100644 --- a/test/plugin_dialyzer.mk +++ b/test/plugin_dialyzer.mk @@ -1,6 +1,6 @@ # Dialyzer plugin. -DIALYZER_CASES = app apps-only apps-with-local-deps beam check custom-plt deps erlc-opts local-deps opts plt-apps +DIALYZER_CASES = app apps-only apps-with-local-deps beam check custom-plt deps erlc-opts local-deps opts plt-apps plt-ebin-only DIALYZER_TARGETS = $(addprefix dialyzer-,$(DIALYZER_CASES)) ifneq ($(shell which sem 2>/dev/null),) @@ -263,3 +263,31 @@ 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 + + $i "Bootstrap a new OTP application named $(APP)" + $t mkdir $(APP)/ + $t cp ../erlang.mk $(APP)/ + $t $(MAKE) -C $(APP) -f erlang.mk bootstrap $v + + $i "Add Cowlib to the list of dependencies" + $t perl -ni.bak -e 'print;if ($$.==1) {print "DEPS = cowlib\ndep_cowlib_commit = master\n"}' $(APP)/Makefile + + $i "Build the application" + $t $(MAKE) -C $(APP) $v + + $i "Run Cowlib tests to fetch autopatched dependencies" + $t $(MAKE) -C $(APP)/deps/cowlib tests $v + + $i "Run Dialyzer" + $t $(DIALYZER_MUTEX) $(MAKE) -C $(APP) dialyze $v + + $i "Check that the PLT file was created" + $t test -f $(APP)/.$(APP).plt + + $i "Confirm that Cowlib was included in the PLT" + $t dialyzer --plt_info --plt $(APP)/.$(APP).plt | grep -q cowlib + + $i "Confirm that rebar files were not included in the PLT" + $t ! dialyzer --plt_info --plt $(APP)/.$(APP).plt | grep -q rebar |