Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Overhaul #31

Merged
merged 7 commits into from
Jun 8, 2015
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.erlang.mk/
.eunit
.edts
deps
Expand Down
36 changes: 26 additions & 10 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,19 +1,35 @@
PROJECT = lasse

TEST_DEPS = cowboy lager sync gun meck
CONFIG ?= rel/sys.config

dep_cowboy = https://github.com/extend/cowboy.git master
dep_lager = https://github.com/basho/lager.git master
dep_sync = https://github.com/rustyio/sync.git master
dep_gun = https://github.com/extend/gun.git master
dep_meck = https://github.com/inaka/meck master
SELL_DEPS = sync
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this should be SHELL_DEPS.

TEST_DEPS = cowboy lager shotgun meck katana xref_runner

dep_meck = git https://github.com/eproxus/meck.git 0.8.2
dep_cowboy = git https://github.com/extend/cowboy.git 1.0.1
dep_shotgun = git https://github.com/inaka/shotgun.git 0.1.11
dep_katana = git https://github.com/inaka/erlang-katana.git 0.2.5
dep_xref_runner = git https://github.com/inaka/xref_runner.git 0.2.2

DIALYZER_DIRS := ebin/
DIALYZER_OPTS := --verbose --statistics -Werror_handling \
-Wrace_conditions #-Wunmatched_returns

include erlang.mk

ERLC_OPTS := +warn_unused_vars +warn_export_all +warn_shadow_vars +warn_unused_import +warn_unused_function
ERLC_OPTS += +warn_bif_clash +warn_unused_record +warn_deprecated_function +warn_obsolete_guard +strict_validation
ERLC_OPTS += +warn_export_vars +warn_exported_vars +warn_missing_spec +warn_untyped_record +debug_info

TEST_ERLC_OPTS += +'{parse_transform, lager_transform}'
CT_OPTS += -cover test/${PROJECT}.coverspec -vvv -erl_args -config ${CONFIG}

SHELL_OPTS += -name ${PROJECT}@`hostname` -config ${CONFIG} -s lager -s sync

CT_SUITES = lasse_handler
CT_OPTS = -cover test/lasse_handler.coverspec -cover_stop false -erl_args -config rel/sys.config
quicktests: app
@$(MAKE) --no-print-directory app-build test-dir ERLC_OPTS="$(TEST_ERLC_OPTS)"
@mkdir -p logs/
$(gen_verbose) $(CT_RUN) -suite $(addsuffix _SUITE,$(CT_SUITES)) $(CT_OPTS)

test-shell: build-tests
erl -pa ebin -pa deps/*/ebin -pa test -s sync -config rel/sys.config
erldocs:
erldocs . -o docs
Loading