forked from antlinker/libmqtt
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
72 lines (52 loc) · 1.66 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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
# Copyright Go-IIoT (https://github.com/goiiot)
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
.PHONY: test lib client clean fuzz_test
TEST_FLAGS=-v -count=1 -race -mod=vendor -pkgdir=vendor -coverprofile=coverage.txt -covermode=atomic
test_reconnect:
go test ${TEST_FLAGS} -tags offline -run=TestClient_Reconnect
test:
go test ${TEST_FLAGS} -run=.
test_auth:
go test ${TEST_FLAGS} -run=TestAuth
test_conn:
go test ${TEST_FLAGS} -run=TestConn
go test ${TEST_FLAGS} -run=TestDisConn
test_ping:
go test ${TEST_FLAGS} -run=TestPing
test_pub:
go test ${TEST_FLAGS} -run=TestPub
test_sub:
go test ${TEST_FLAGS} -run=TestSub
go test ${TEST_FLAGS} -run=TestUnSub
.PHONY: all_lib c_lib java_lib py_lib \
clean_c_lib clean_java_lib clean_py_lib
all_lib: c_lib java_lib
clean_all_lib: clean_c_lib clean_java_lib
c_lib:
$(MAKE) -C c lib
clean_c_lib:
$(MAKE) -C c clean
java_lib:
$(MAKE) -C java build
clean_java_lib:
$(MAKE) -C java clean
client:
$(MAKE) -C cmd build
clean: clean_all_lib fuzz_clean
rm -rf coverage.txt
fuzz_test:
go-fuzz-build github.com/goiiot/libmqtt
go-fuzz -bin=./libmqtt-fuzz.zip -workdir=fuzz-test
fuzz_clean:
rm -rf fuzz-test libmqtt-fuzz.zip