-
Notifications
You must be signed in to change notification settings - Fork 76
/
Copy pathMakefile
executable file
·47 lines (40 loc) · 1.04 KB
/
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
44
45
46
47
PROJECT_DIR:=$(strip $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST)))))
all:
@rebar3 compile
compile_test:
@rebar3 as test compile
clean:
@rebar3 clean
@find $(PROJECT_DIR)/. -name "erl_crash\.dump" | xargs rm -f
@find $(PROJECT_DIR)/. -name "*\.beam" | xargs rm -f
@find $(PROJECT_DIR)/. -name "*\.so" | xargs rm -f
dialyzer:
@rebar3 dialyzer
run: all
ifdef node
@# 'make test node=syn2@127.0.0.1
@erl -pa `rebar3 path` \
-name $(sname)@127.0.0.1 \
-eval 'syn:start().'
else
@erl -pa `rebar3 path` \
-name syn@127.0.0.1 \
-eval 'syn:start().'
endif
test: compile_test
ifdef suite
@# 'make test suite=syn_registry_SUITE'
ct_run -dir $(PROJECT_DIR)/test -logdir $(PROJECT_DIR)/test/results \
-suite $(suite) \
-pa `rebar3 as test path`
else
ct_run -dir $(PROJECT_DIR)/test -logdir $(PROJECT_DIR)/test/results \
-pa `rebar3 as test path`
endif
bench: compile_test
@erl -pa `rebar3 as test path` \
-pa `rebar3 as test path`/../test \
-name syn_bench_master@127.0.0.1 \
-noshell \
+P 5000000 \
-eval 'syn_benchmark:start().'