forked from epgsql/epgsql
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
executable file
·33 lines (24 loc) · 937 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
REBAR = rebar
LASTVERSION = $(shell git rev-parse HEAD )
all: compile
compile:
@$(REBAR) compile
clean:
@$(REBAR) clean
# The INSERT is used to make sure the schema_version matches the tests
# being run.
create_testdbs:
# Uses the test environment set up with setup_test_db.sh
echo "CREATE DATABASE ${USER};" | psql -h 127.0.0.1 -p 10432 template1
psql -h 127.0.0.1 -p 10432 template1 < ./test_data/test_schema.sql
psql -h 127.0.0.1 -p 10432 epgsql_test_db1 -c "INSERT INTO schema_version (version) VALUES ('${LASTVERSION}');"
test: compile
@$(REBAR) eunit
performance_test: compile
erlc ./test/epgsql_perf_tests.erl
erl -noshell -pa ./ebin -eval "eunit:test(epgsql_perf_tests, [verbose])" -run init stop
dialyzer: build.plt compile
dialyzer --plt $< ebin
build.plt:
dialyzer -q --build_plt --apps erts kernel stdlib ssl --output_plt $@
.PHONY: all compile release clean create_testdbs performance_test test dialyzer