-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
49 lines (37 loc) · 1.39 KB
/
Copy pathMakefile
File metadata and controls
49 lines (37 loc) · 1.39 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
.PHONY: help build test run-simple run-continuous clean fmt vet
help: ## Show this help
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-20s\033[0m %s\n", $$1, $$2}'
build: ## Build all examples
@echo "Building examples..."
@mkdir -p bin
@go build -tags=chaos -o bin/simple examples/simple/main.go
@go build -tags=chaos -o bin/continuous examples/continuous/main.go
@go build -tags=chaos -o bin/chaos_context examples/chaos_context/main.go
@echo "Build complete! Binaries in bin/"
build-tools: ## Build report-viewer tool
@echo "Building report-viewer..."
@mkdir -p bin
@go build -tags=chaos -o bin/report-viewer ./cmd/report-viewer
@echo "Build complete! Binary: bin/report-viewer"
test: ## Run tests
@echo "Running tests..."
@go test -tags=chaos -v -race -gcflags=all=-l ./...
race: ## Run tests with race detector
@echo "Running race detector..."
@go test -tags=chaos -race -count=100 ./...
run-simple: build ## Run simple chaos example
@echo "Running simple chaos example..."
@./bin/simple
run-continuous: build ## Run continuous chaos testing
@echo "Running continuous chaos testing (Ctrl+C to stop)..."
@./bin/continuous
fmt: ## Format code
@go fmt ./...
vet: ## Run go vet
@go vet ./...
lint: ## Lint code
@golangci-lint run ./...
clean: ## Clean build artifacts
@rm -rf bin/
@echo "Clean complete!"
.DEFAULT_GOAL := help