-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
30 lines (26 loc) · 899 Bytes
/
Copy pathMakefile
File metadata and controls
30 lines (26 loc) · 899 Bytes
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
.DEFAULT_GOAL := help
.PHONY: run
run:
@echo ">> running 2PC cluster simulation"
go run main.go
.PHONY: test
test:
@echo ">> running all tests (Happy Path, Abort, Recovery)"
go test ./internal/... -v -count=1
.PHONY: clean
clean:
@echo ">> cleaning up log directories"
rm -rf logs/
.PHONY: help
help:
@echo "Makefile for Two-Phase Commit (2PC) Library"
@echo ""
@echo "Usage:"
@echo " make run - Run the main simulation (spins up a local cluster)."
@echo " make test - Run integration tests (includes failure & recovery scenarios)."
@echo " make clean - Remove the 'logs/' directory generated by WAL and Snapshots."
@echo ""
@echo "Typical workflow:"
@echo "1. Run 'make test' to verify the protocol logic and recovery mechanisms."
@echo "2. Run 'make run' to see a live simulation of transactions across 4 nodes."
@echo "3. Run 'make clean' to reset the environment."