You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: tools/flakeguard/Makefile
+35-3Lines changed: 35 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -8,14 +8,34 @@ test:
8
8
set -euo pipefail
9
9
go list ./... | grep -v 'example_test_package'| xargs go test -json -cover -coverprofile unit-test-coverage.out -v 2>&1| tee /tmp/gotest.log | gotestfmt
10
10
11
+
.PHONY: test-package
12
+
test-package:
13
+
go install github.com/gotesttools/gotestfmt/v2/cmd/gotestfmt@latest
14
+
set -euo pipefail
15
+
go test -json -cover -coverprofile unit-test-coverage.out -v $(PKG)2>&1| tee /tmp/gotest.log | gotestfmt
16
+
17
+
.PHONY: test-race
18
+
test-race:
19
+
go list ./... | grep -v 'example_test_package'| xargs go test -count=1 -race
20
+
21
+
.PHONY: bench
22
+
bench:
23
+
go test -run=^$$ -bench=. -benchmem ./...
24
+
11
25
.PHONY: example
12
26
example:
13
27
rm -rf example_results
14
28
mkdir -p example_results
15
29
- go run . run --project-path=./runner --test-packages=./example_test_package --run-count=5 --skip-tests=Panic,Timeout --max-pass-ratio=1 --race=false --output-json=example_results/example_run_1.json
16
30
- go run . run --project-path=./runner --test-packages=./example_test_package --run-count=5 --skip-tests=Panic,Timeout --max-pass-ratio=1 --race=false --output-json=example_results/example_run_2.json
17
31
- go run . run --project-path=./runner --test-packages=./example_test_package --run-count=5 --skip-tests=Panic,Timeout --max-pass-ratio=1 --race=false --output-json=example_results/example_run_3.json
18
-
go run . aggregate-results --results-path ./example_results --output-results ./example_results/all_tests_example.json
- go run . run --project-path=./runner --test-packages=./example_test_package --run-count=5 --skip-tests=TestPanic --max-pass-ratio=1 --race=false --output-json=example_results/example_run_1.json
25
45
- go run . run --project-path=./runner --test-packages=./example_test_package --run-count=5 --skip-tests=TestPanic --max-pass-ratio=1 --race=false --output-json=example_results/example_run_2.json
26
46
- go run . run --project-path=./runner --test-packages=./example_test_package --run-count=5 --skip-tests=TestPanic --max-pass-ratio=1 --race=false --output-json=example_results/example_run_3.json
27
-
go run . aggregate-results --results-path ./example_results --output-results ./example_results/all_tests_example.json
- go run . run --project-path=./runner --test-packages=./example_test_package --run-count=5 --select-tests=TestTimeout --timeout=1s --max-pass-ratio=1 --race=false --output-json=example_results/example_run_1.json
34
60
- go run . run --project-path=./runner --test-packages=./example_test_package --run-count=5 --select-tests=TestTimeout --timeout=1s --max-pass-ratio=1 --race=false --output-json=example_results/example_run_2.json
35
61
- go run . run --project-path=./runner --test-packages=./example_test_package --run-count=5 --select-tests=TestTimeout --timeout=1s --max-pass-ratio=1 --race=false --output-json=example_results/example_run_3.json
36
-
go run . aggregate-results --results-path ./example_results --output-results ./example_results/all_tests_example.json
0 commit comments