generated from honeycombio/.github
-
Notifications
You must be signed in to change notification settings - Fork 15
/
Makefile
49 lines (38 loc) · 1.4 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
clean:
rm -rf ./smoke-tests/collector/data.json
rm -rf ./smoke-tests/collector/data-results/*.json
rm -rf ./smoke-tests/report.*
GOTESTCMD = $(if $(shell command -v gotestsum),gotestsum --junitfile ./test_results/$(1).xml --format testname --,go test)
test:
$(call GOTESTCMD,$@) -v ./...
smoke-tests/collector/data.json:
@echo ""
@echo "+++ Zhuzhing smoke test's Collector data.json"
@touch $@ && chmod o+w $@
smoke-sdk-grpc: smoke-tests/collector/data.json
@echo ""
@echo "+++ Running gRPC smoke tests."
@echo ""
cd smoke-tests && bats ./smoke-sdk-grpc.bats --report-formatter junit --output ./
smoke-sdk-http: smoke-tests/collector/data.json
@echo ""
@echo "+++ Running HTTP smoke tests."
@echo ""
cd smoke-tests && bats ./smoke-sdk-http.bats --report-formatter junit --output ./
smoke-sdk: smoke-sdk-grpc smoke-sdk-http
smoke: docker_compose_present
@echo ""
@echo "+++ Smoking all the tests."
@echo ""
cd smoke-tests && bats . --report-formatter junit --output ./
unsmoke: docker_compose_present
@echo ""
@echo "+++ Spinning down the smokers."
@echo ""
cd smoke-tests && docker-compose down --volumes
#: use this for local smoke testing
resmoke: unsmoke smoke
.PHONY: clean-smoke-tests example smoke unsmoke resmoke smoke-sdk-grpc smoke-sdk-http smoke-sdk
.PHONY: docker_compose_present
docker_compose_present:
@which docker-compose || (echo "Required docker-compose command is missing"; exit 1)