-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
69 lines (53 loc) · 1.91 KB
/
Copy pathMakefile
File metadata and controls
69 lines (53 loc) · 1.91 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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
# SPDX-FileCopyrightText: 2024 Henrik Sandklef
#
# SPDX-License-Identifier: GPL-3.0-or-later
clean:
find . -name "*~" | xargs rm -f
rm -fr licomp_toolkit.egg-info
rm -fr build
rm -fr dist sdist
rm -fr licomp_toolkit/__pycache__
rm -fr tests/python/__pycache__
rm -fr .pytest_cache
rm -f licomp_toolkit_test.tmp tmp.pdf
.PHONY: build
build:
rm -fr build && python3 setup.py sdist
lint:
PYTHONPATH=. python3.11 -m flake8 licomp_toolkit
check_version:
@echo -n "Checking api versions: "
@MY_VERSION=`grep api_version licomp_toolkit/config.py | cut -d = -f 2 | sed -e "s,[ ']*,,g"` ; LICOMP_VERSION=`grep "licomp " requirements.txt | cut -d = -f 3 | sed -e "s,[ ']*,,g" -e "s,[ ']*,,g" -e "s,\(^[0-9].[0-9]\)[\.0-9\*]*,\1,g"` ; if [ "$$MY_VERSION" != "$$LICOMP_VERSION" ] ; then echo "FAIL" ; echo "API versions differ \"$$MY_VERSION\" \"$$LICOMP_VERSION\"" ; exit 1 ; else echo OK ; fi
unit-test:
PYTHONPATH=. python3 -m pytest tests/python
unit-test-local:
PYTHONPATH=.:../licomp:../licomp-reclicense:../licomp-osadl:../licomp-proprietary:../licomp-hermione:../licomp-dwheeler:../licomp-gnuguide python3 -m pytest
unit-test-local-verbose:
PYTHONPATH=.:../licomp:../licomp-reclicense:../licomp-osadl:../licomp-proprietary:../licomp-hermione:../licomp-dwheeler:../licomp-gnuguide python3 -m pytest --log-cli-level=10 tests
cli-test:
tests/shell/test-cli.sh
tests/shell/test_returns.sh
tests/shell/test_display_compat.sh
tests/shell/test_validate.sh
cli-test-local:
tests/shell/test-cli.sh --local
tests/shell/test_returns.sh --local
tests/shell/test_display_compat.sh --local
test: unit-test cli-test
test-local: unit-test-local cli-test-local
install:
pip install .
reuse:
reuse lint
check: clean reuse lint test check_version build
@echo
@echo
@echo "All tests passed :)"
@echo
@echo
check-local: clean reuse lint test-local check_version build
@echo
@echo
@echo "All (local) tests passed :)"
@echo
@echo