diff options
author | Hugo Mills <[email protected]> | 2018-07-14 17:49:32 +0100 |
---|---|---|
committer | Loïc Hoguin <[email protected]> | 2018-11-24 23:00:01 +0100 |
commit | 40db558812f5e0fee0607baeae0248e3166bc07b (patch) | |
tree | f1a1a22f3db3bb11f7e50f2c44ded89a98053957 /test | |
parent | 1a5852f6750615f72e3523bb8685f98210f81e11 (diff) | |
download | erlang.mk-40db558812f5e0fee0607baeae0248e3166bc07b.tar.gz erlang.mk-40db558812f5e0fee0607baeae0248e3166bc07b.tar.bz2 erlang.mk-40db558812f5e0fee0607baeae0248e3166bc07b.zip |
Test case for yecc, switching between test mode and normal mode
With a yecc grammar in the project, and this sequence of commands:
$ make clean
$ make check
$ make
$ make
the "make check" succeeds. The first "make" fails because the .erl
file built from the .yrl file doesn't exist. The second "make"
succeeds.
Add a test case for this situation.
Signed-off-by: Hugo Mills <[email protected]>
Diffstat (limited to 'test')
-rw-r--r-- | test/core_app.mk | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/test/core_app.mk b/test/core_app.mk index 48d1105..d8832c5 100644 --- a/test/core_app.mk +++ b/test/core_app.mk @@ -1758,6 +1758,26 @@ endif [{module, M} = code:load_file(M) || M <- Mods], \ halt()" +core-app-yrl-normal-to-debug: 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 "Create the parser .yrl file" + $t echo "Nonterminals top.\nTerminals plus num.\nRootsymbol top.\ntop -> num plus num : {'$1', '$3'}." >$(APP)/src/$(APP)_parser.yrl + + $i "Create the test suite" + $t mkdir $(APP)/test + $t echo "-module(test_SUITE).\n-export([all/0, test/1]).\nall() -> [test].\ntest(_) -> 0=0." >$(APP)/test/test_SUITE.erl + + $i "Build the application in test mode" + $t $(MAKE) -C $(APP) ct $v + + $i "Build the application in normal mode" + $t $(MAKE) -C $(APP) $v + core-app-hrl-include-lib: build clean $i "Bootstrap a new OTP library named $(APP)" |