-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
39 lines (33 loc) · 957 Bytes
/
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
#==================================================================
#
# FILE: countdown/Makefile
#
# USAGE: make all
#
# DESCRIPTION: Create a virtualenv and run test shell scripts.
# REQUIREMENTS: python3, venv
#
#==================================================================
# all sets up the venv and runs the tests
.PHONY: all
all: venv test-ocr test-loop
venv: .venv/touchfile
# Build the venv and place a touchfile inside
.venv/touchfile: requirements.txt
test -d .venv || python3 -m venv .venv
. .venv/bin/activate; pip install -Ur requirements.txt
touch .venv/touchfile
# Run the OCR tests inside the venv
.PHONY: test-ocr
test-ocr: venv
. .venv/bin/activate; ./scripts/run_ocr_tests.sh
# Run the loop tests inside the venv
.PHONY: test-loop
test-loop: venv
. .venv/bin/activate; ./scripts/run_loop_tests.sh -l 100
# Cleanup the venv
.PHONY: clean
clean:
rm -rf .venv
rm -rf .ruff_cache
rm -rf .mypy_cache