-
-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathMakefile
More file actions
43 lines (35 loc) · 1.07 KB
/
Copy pathMakefile
File metadata and controls
43 lines (35 loc) · 1.07 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
.PHONY: help
help: ## Show the help.
@echo "Usage: make <target>"
@echo ""
@echo "Targets:"
@fgrep "##" Makefile | fgrep -v fgrep
.PHONY: show
show: ## Show the current environment.
@echo "Current environment:"
@echo "Running using $(VIRTUAL_ENV)"
@$(VIRTUAL_ENV)/bin/python -V
@$(VIRTUAL_ENV)/bin/python -m site
.PHONY: fmt
fmt: ## Format every file with treefmt (alejandra, isort, black).
nix fmt
.PHONY: lint
lint: ## Run pep8, type & static checks.
flake8 sqlelf/ benchmarks/ tests/ tools/
pyright
mypy --strict sqlelf tests tools
.PHONY: test
test: ## Run pytest primarily.
pytest
pytest -m "slow"
.PHONY: fixture
fixture: ## Regenerate the committed ELF test fixture (needs Nix).
install -m 644 \
"$$(nix build --no-link --print-out-paths .#test-fixture)/hello-x86_64.elf" \
tests/data/hello-x86_64.elf
.PHONY: coverage
coverage:
coverage run -m pytest
.PHONY: vendor
vendor: ## Update third-party dependencies.
copybara copy.bara.sky vendor_pyelftools --folder-dir ./sqlelf/_vendor