-
Notifications
You must be signed in to change notification settings - Fork 11
/
Makefile
45 lines (35 loc) · 1.22 KB
/
Makefile
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
.PHONY: help
help: ## Lists the available commands. Add a comment with '##' to describe a command.
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
.PHONY: tests
tests: ## Execute all the tests
@cargo test
.PHONY: build
build: tests ## Execute all the tests and build funzzy binary
@cargo build --release
.PHONY: integration-cleanup
integration-cleanup:
rm -rf target && \
rm -rf tests/integration/release && \
rm -rf tests/integration/workdir && \
rm -f tests/integration/funzzy
.PHONY: integration ## Exectute integration tests
integration: integration-cleanup
@bash tests/integration/runner.sh $(testpath)
.PHONY: integration-tail
integration-tail:
while true; do cat tests/integration/workdir/output.log; sleep 1; clear; done
.PHONY: integration-batch-1
integration-batch-1: integration-cleanup
@bash tests/integration/batches.sh 5
.PHONY: integration-batch-2
integration-batch-2: integration-cleanup
@bash tests/integration/batches.sh 10
.PHONY: lint
lint:
cargo clippy
.PHONY: linter
linter: lint
.PHONY: install
install: tests ## Install funzzy on your machine
GITSHA="$(shell git rev-parse --short HEAD)" cargo install --path .