-
Notifications
You must be signed in to change notification settings - Fork 22
Expand file tree
/
Copy pathMakefile
More file actions
63 lines (51 loc) · 2.17 KB
/
Makefile
File metadata and controls
63 lines (51 loc) · 2.17 KB
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
#: cleans up smoke test output
clean-smoke-tests:
rm -rf ./smoke-tests/collector/data.json
rm -rf ./smoke-tests/collector/data-results/*.json
rm -rf ./smoke-tests/report.*
#: cleans up TS build, smoke test output, and example app detritus
squeaky-clean: clean clean-smoke-tests
rm -rf ./smoke-tests/hello-node-express-ts/dist
rm -rf ./smoke-tests/hello-node-express-ts/node_modules
smoke-tests/collector/data.json:
@echo ""
@echo "+++ Zhuzhing smoke test's Collector data.json"
@touch $@ && chmod o+w $@
#: build Docker images for smoke tests (with caching)
build-smoke-images:
@echo ""
@echo "+++ Building smoke test Docker images (cached)"
@echo ""
cd smoke-tests && docker compose build
smoke-sdk-grpc-ts: build-smoke-images smoke-tests/collector/data.json
@echo ""
@echo "+++ Running gRPC smoke tests for TypeScript."
@echo ""
cd smoke-tests && bats ./smoke-sdk-grpc-ts.bats --report-formatter junit --output ./ --verbose-run
smoke-sdk-http-ts: build-smoke-images smoke-tests/collector/data.json
@echo ""
@echo "+++ Running HTTP smoke tests for TypeScript."
@echo ""
cd smoke-tests && bats ./smoke-sdk-http-ts.bats --report-formatter junit --output ./ --verbose-run
smoke-sdk-http-ts-programmaticImports: build-smoke-images smoke-tests/collector/data.json
@echo ""
@echo "+++ Running HTTP programmatic imports smoke tests for TypeScript."
@echo ""
cd smoke-tests && bats ./smoke-sdk-http-ts-programmaticImports.bats --report-formatter junit --output ./ --verbose-run
smoke-sdk: smoke-sdk-http-ts smoke-sdk-grpc-ts
smoke: docker_compose_present
@echo ""
@echo "+++ Smoking all the tests."
@echo ""
cd smoke-tests && bats . --report-formatter junit --output ./ --verbose-run
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 build-smoke-images example smoke unsmoke resmoke smoke-sdk-grpc-ts smoke-sdk-http-ts smoke-sdk-http-ts-programmaticImports smoke-sdk
.PHONY: docker_compose_present
docker_compose_present:
@which docker compose || (echo "Required docker compose command is missing"; exit 1)