Comments (11)
Like you did. Please post the makefile.
from erlang.mk.
PROJECT = roadsigns
ERLC_OPTS ?= -Werror +debug_info
+warn_export_all +warn_export_vars
+warn_shadow_vars +warn_obsolete_guard
CT_SUITES = test
CT_OPTS = -config debug.config
DEPS = cowboy emysql jiffy lager erlcloud
dep_cowboy = https://github.com/extend/cowboy.git master
dep_emysql = https://github.com/Eonblast/Emysql.git v0.4.1
dep_jiffy = https://github.com/davisp/jiffy.git 0.8.5
dep_lager = https://github.com/basho/lager.git 2.0.3
dep_erlcloud = https://github.com/gleber/erlcloud.git master
cr:
rm -rf _rel/
cct:
rm -r ./logs
rd: app
if [ -n "${PROJECT}" ]; then erl -pa ebin -pa deps/*/ebin -smp -boot start_sasl ${ERL_ARGS} -config debug.config -name ${PROJECT}@hostname
-s ${PROJECT};
else ${RUN} -s ${PROJECT};
fi
include erlang.mk
from erlang.mk.
Yeah it should work. Is your config file in the same directory as the makefile though? You gotta say tests/debug.config if it's in there.
from erlang.mk.
Yes they are in the same directory. The config has param "roadsigns" in there which I try getting in init_per_group/2 with ct:get_config(roadsigns)
and it keeps returning undefined.
from erlang.mk.
I think the -config option is for specifying the sys.config file. Can you try with -ct_config instead?
from erlang.mk.
Yeah just tried it, didn't work either. I must be messing up somewhere else. I'm loading the config just so I can set it as the app env in init_per_group/2. Perhaps I'm going about that wrong.
init_per_group(roadsigns_api, Config) -> RSConfig = ct:get_config(roadsigns), application:ensure_all_started(roadsigns), application:set_env(roadsigns, roadsigns, RSConfig), .
Here is a snippet of the config:
[ { roadsigns, [ { cowboy_port, 8080 }, { cowboy_listeners, 100 }, { emysql_pool_size, 10 }, … ]} ]
from erlang.mk.
Well I don't really know, never used that myself. You'll have better luck on erlang-questions.
from erlang.mk.
Ok, I'm on it. Will post what I find here. Thanks for the help @essen
from erlang.mk.
It seems the default config from the app takes precedence over whatever config is set via CT_OPTS. I'm also getting noproc errors for functions that run just fine in the release.
from erlang.mk.
Finally got it to work, I used CT_OPTS = -erl_args -pa ebin -pa deps/*/ebin -smp -boot start_sasl ${ERL_ARGS} -config ./test/debug.config -name ${PROJECT}@
hostname -s ${PROJECT}
. Setting the config via erl_args solved it.
from erlang.mk.
CT_OPTS = -erl_args -config test/app.config
was sufficient in my case.
from erlang.mk.
Related Issues (20)
- Release fails to build if top folder name is different from app name HOT 4
- system deps are not included in release anymore HOT 4
- Release package saved into a wrong output dir? HOT 3
- make RELOAD=1 does not work HOT 2
- Feature: Additional template modifiers HOT 1
- is Getting started instruction correct? HOT 1
- OTP26 dialyzer support: `--no_native` flag is gone HOT 1
- Feature: Compilation of Elixir projects
- autopatching is overly verbose (missing $(verbose)) HOT 3
- Add advice on project directory naming rule on `creating_a_folder_for_your_project` tutorial HOT 2
- Failed to eval: application:load(rebar) HOT 7
- Problem building NIF on Mac M1 HOT 2
- erlang.mk tutorial release build failure HOT 4
- Windows 11(OTP-26) release build : system cannot find the file path to \hello_rel_release\erts-14.0\bin\werl.exe.
- relx can't find app HOT 3
- Failing on Mac Sonoma 14 M2 HOT 1
- Crash release when `Erlang.mk` project has dependency builded and use `SemVer` VSN HOT 2
- Make failed, argument list too long HOT 4
- Build failure on OTP-27
- Allows apps dir to contain symlinks
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from erlang.mk.