forked from upper/db
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
43 lines (29 loc) · 878 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
34
35
36
37
38
39
40
41
42
43
SHELL := /bin/bash
WAPPER ?= all
DB_HOST ?= 127.0.0.1
TEST_FLAGS ?=
export DB_HOST
export WRAPPER
benchmark-lib:
go test -v -benchtime=500ms -bench=. ./lib/...
benchmark-internal:
go test -v -benchtime=500ms -bench=. ./internal/...
benchmark: benchmark-lib benchmark-internal
test-lib:
go test -v ./lib/...
test-internal:
go test -v ./internal/...
test-libs: test-lib test-internal
test-adapters: test-adapter-postgresql test-adapter-mysql test-adapter-sqlite test-adapter-mssql test-adapter-ql test-adapter-mongo
reset-db:
$(MAKE) -C postgresql reset-db && \
$(MAKE) -C mysql reset-db && \
$(MAKE) -C sqlite reset-db && \
$(MAKE) -C mssql reset-db && \
$(MAKE) -C ql reset-db && \
$(MAKE) -C mongo reset-db
test-main: reset-db
go test $(TEST_FLAGS) -v ./tests/...
test: test-adapters test-libs test-main
test-adapter-%:
$(MAKE) -C $* test || exit 1;