Makefile 755 B

12345678910111213141516171819202122232425262728293031
  1. REBAR = rebar
  2. LASTVERSION = $(shell git rev-parse HEAD )
  3. all: compile
  4. compile:
  5. @$(REBAR) compile
  6. clean:
  7. @$(REBAR) clean
  8. # The INSERT is used to make sure the schema_version matches the tests
  9. # being run.
  10. create_testdbs:
  11. psql template1 < ./test_data/test_schema.sql
  12. psql epgsql_test_db1 -c "INSERT INTO schema_version (version) VALUES ('${LASTVERSION}');"
  13. test:
  14. @$(REBAR) eunit
  15. performance_test: compile
  16. erlc ./test/epgsql_perf_tests.erl
  17. erl -noshell -pa ./ebin -eval "eunit:test(epgsql_perf_tests, [verbose])" -run init stop
  18. dialyzer: build.plt compile
  19. dialyzer --plt $< ebin
  20. build.plt:
  21. dialyzer -q --build_plt --apps erts kernel stdlib ssl --output_plt $@
  22. .PHONY: all compile release clean create_testdbs performance_test test dialyzer