diff options
-rw-r--r-- | doc/src/guide/shell.asciidoc | 4 | ||||
-rw-r--r-- | plugins/shell.mk | 2 | ||||
-rw-r--r-- | test/plugin_shell.mk | 15 |
3 files changed, 20 insertions, 1 deletions
diff --git a/doc/src/guide/shell.asciidoc b/doc/src/guide/shell.asciidoc index a527253..5484b9d 100644 --- a/doc/src/guide/shell.asciidoc +++ b/doc/src/guide/shell.asciidoc @@ -44,3 +44,7 @@ $ make shell The shell can be stopped as usual with a double Ctrl+C or the command `q().`. + +Note that the `shell` target does not build the application. To do it, +use either the `app` target or, if you want to include also test +modules, the `test-build` target.
\ No newline at end of file diff --git a/plugins/shell.mk b/plugins/shell.mk index 00d2c52..c9e9975 100644 --- a/plugins/shell.mk +++ b/plugins/shell.mk @@ -7,7 +7,7 @@ # Configuration. SHELL_ERL ?= erl -SHELL_PATHS ?= $(CURDIR)/ebin $(APPS_DIR)/*/ebin $(DEPS_DIR)/*/ebin +SHELL_PATHS ?= $(CURDIR)/ebin $(APPS_DIR)/*/ebin $(DEPS_DIR)/*/ebin $(TEST_DIR) SHELL_OPTS ?= ALL_SHELL_DEPS_DIRS = $(addprefix $(DEPS_DIR)/,$(SHELL_DEPS)) diff --git a/test/plugin_shell.mk b/test/plugin_shell.mk index 0e9ee39..dea4ca1 100644 --- a/test/plugin_shell.mk +++ b/test/plugin_shell.mk @@ -28,3 +28,18 @@ shell-kjell: build clean $i "Run the shell" $t $(MAKE) -C $(APP) shell SHELL_OPTS="-eval 'halt()'" $v + +shell-test-dir: build clean + + $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 "Generate a module in TEST_DIR" + $t mkdir $(APP)/test + $t printf "%s\n" \ + "-module(foo)." > $(APP)/test/foo.erl + + $i "Check that the module is visible" + $t $(MAKE) -C $(APP) test-build shell SHELL_OPTS="-eval 'foo:module_info()' -eval 'halt()'" $v |