aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2017-04-25 17:29:09 +0200
committerLoïc Hoguin <[email protected]>2017-04-25 17:29:09 +0200
commit5a2ca3b0c0212a12e9d546187a96c9dc84103b3c (patch)
treeebbbc641bfdefe5e93d05a0a362dffc775fa6476 /test
parent094ece5472c07b50c38d7d6f369fbf6f97968a89 (diff)
downloaderlang.mk-5a2ca3b0c0212a12e9d546187a96c9dc84103b3c.tar.gz
erlang.mk-5a2ca3b0c0212a12e9d546187a96c9dc84103b3c.tar.bz2
erlang.mk-5a2ca3b0c0212a12e9d546187a96c9dc84103b3c.zip
Stylistic changes to makedep tests2017.04.25
Diffstat (limited to 'test')
-rw-r--r--test/core_makedep.mk16
1 files changed, 11 insertions, 5 deletions
diff --git a/test/core_makedep.mk b/test/core_makedep.mk
index 9e5e053..4fed06a 100644
--- a/test/core_makedep.mk
+++ b/test/core_makedep.mk
@@ -1,22 +1,25 @@
# Core: COMPILE_FIRST dependencies generation.
-CORE_MAKEDEP_CASES = behaviour import
+CORE_MAKEDEP_CASES = behavior import
CORE_MAKEDEP_TARGETS = $(addprefix core-makedep-,$(CORE_MAKEDEP_CASES))
.PHONY: core-makedep $(CORE_MAKEDEP_TARGETS)
core-makedep: $(CORE_MAKEDEP_TARGETS)
-core-makedep-behaviour: build clean
+core-makedep-behavior: 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
$t mkdir $(APP)/src/core
+
$i "Generate related .erl files"
$t printf "%s\n" "-module(human)." "-callback live() -> 'ok'." > $(APP)/src/core/human.erl
- $t printf "%s\n" "-module(boy)." "-behaviour(human)." "-export([live/0])." "live() -> ok." > $(APP)/src/boy.erl
+ $t printf "%s\n" "-module(boy)." "-behavior(human)." "-export([live/0])." "live() -> ok." > $(APP)/src/boy.erl
$t $(MAKE) -C $(APP) $v
+
$i "Check that all compiled files exist"
$t test -f $(APP)/$(APP).d
$t test -f $(APP)/ebin/$(APP).app
@@ -24,20 +27,23 @@ core-makedep-behaviour: build clean
$t test -f $(APP)/ebin/human.beam
core-makedep-import: 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
$t mkdir $(APP)/src/core
+
$i "Generate related .erl files"
$t printf "%s\n" "-module(human)." "-export([live/0])." "live() -> ok." > $(APP)/src/core/human.erl
$t printf "%s\n" "-module(boy)." "-import(human,[live/0])." > $(APP)/src/boy.erl
$t $(MAKE) -C $(APP) $v
+
$i "Check that all compiled files exist"
$t test -f $(APP)/$(APP).d
$t test -f $(APP)/ebin/$(APP).app
$t test -f $(APP)/ebin/boy.beam
$t test -f $(APP)/ebin/human.beam
- $t grep COMPILE $(APP)/$(APP).d | grep core
-
+ $i "Confirm the file was added by makedep"
+ $t grep COMPILE_FIRST $(APP)/$(APP).d | grep -q core/human