GithubHelp home page GithubHelp logo

Comments (11)

essen avatar essen commented on May 20, 2024

Like you did. Please post the makefile.

from erlang.mk.

dnldd avatar dnldd commented on May 20, 2024

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.

essen avatar essen commented on May 20, 2024

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.

dnldd avatar dnldd commented on May 20, 2024

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.

essen avatar essen commented on May 20, 2024

I think the -config option is for specifying the sys.config file. Can you try with -ct_config instead?

from erlang.mk.

dnldd avatar dnldd commented on May 20, 2024

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.

essen avatar essen commented on May 20, 2024

Well I don't really know, never used that myself. You'll have better luck on erlang-questions.

from erlang.mk.

dnldd avatar dnldd commented on May 20, 2024

Ok, I'm on it. Will post what I find here. Thanks for the help @essen

from erlang.mk.

dnldd avatar dnldd commented on May 20, 2024

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.

dnldd avatar dnldd commented on May 20, 2024

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.

rlipscombe avatar rlipscombe commented on May 20, 2024

CT_OPTS = -erl_args -config test/app.config was sufficient in my case.

from erlang.mk.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.