aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2024-11-25 11:13:06 +0100
committerLoïc Hoguin <[email protected]>2024-11-25 11:13:06 +0100
commit79413746470f1ea112ac57ed189e39e71ac22cdd (patch)
tree2cbdbd691d09e9705ee2604be77b14d2b312f789 /test
parenta6f9a450af99a7a95848dde671de658bb53a43dc (diff)
downloaderlang.mk-79413746470f1ea112ac57ed189e39e71ac22cdd.tar.gz
erlang.mk-79413746470f1ea112ac57ed189e39e71ac22cdd.tar.bz2
erlang.mk-79413746470f1ea112ac57ed189e39e71ac22cdd.zip
Check templates independently from tests
Diffstat (limited to 'test')
-rw-r--r--test/Makefile15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/Makefile b/test/Makefile
index 5240115..78603aa 100644
--- a/test/Makefile
+++ b/test/Makefile
@@ -406,3 +406,18 @@ $(foreach pkg,$(shell grep -v '^#' hexpm_packages.txt | sed 's/ /@/'),$(eval $(c
hexpm-packages: $(addprefix hexpm-pkg-,$(HEXPM_PACKAGES))
endif
+
+# Templates.
+#
+# apps_Makefile, top_Makefile and vm.args are not currently tested here.
+
+templates: clean
+ $i "Compile Erlang modules"
+ $t mkdir test_templates/
+ $t cd test_templates/ && erlc +no_error_module_mismatch ../../templates/*.erl
+
+ $i "Load Erlang term files"
+ $t $(ERL) -eval '{ok, _} = file:consult("../templates/application.app.src"), halt()'
+ $t $(ERL) -eval '{ok, _} = file:consult("../templates/library.app.src"), halt()'
+ $t $(ERL) -eval '{ok, _} = file:consult("../templates/relx.config"), halt()'
+ $t $(ERL) -eval '{ok, _} = file:consult("../templates/sys.config"), halt()'