-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathMakefile
More file actions
37 lines (28 loc) · 898 Bytes
/
Copy pathMakefile
File metadata and controls
37 lines (28 loc) · 898 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
31
32
33
34
35
36
37
.PHONY: all build test clean runner mock-handler suite-validate specgen
BUILD_DIR := build
RUNNER_BIN := $(BUILD_DIR)/runner
MOCK_HANDLER_BIN := $(BUILD_DIR)/mock-handler
all: build test suite-validate
build: runner mock-handler
runner:
@echo "Building test runner..."
@mkdir -p $(BUILD_DIR)
go build -o $(RUNNER_BIN) ./cmd/runner
mock-handler:
@echo "Building mock handler..."
@mkdir -p $(BUILD_DIR)
go build -o $(MOCK_HANDLER_BIN) ./cmd/mock-handler
test: build
@echo "Running runner unit tests..."
go test -v ./runner/...
@echo "Running conformance tests with mock handler..."
$(RUNNER_BIN) --handler $(MOCK_HANDLER_BIN) -vv
suite-validate:
@echo "Validating testdata against the suite schema..."
go run ./cmd/suite-validate
specgen:
@echo "Generating method reference from schemas..."
go run ./cmd/specgen
clean:
@echo "Cleaning build artifacts..."
rm -rf $(BUILD_DIR)