xref: /aosp_15_r20/tools/external_updater/Makefile (revision 3c875a214f382db1236d28570d1304ce57138f32)
1*3c875a21SAndroid Build Coastguard Worker# TODO: Move sources into a package.
2*3c875a21SAndroid Build Coastguard WorkerSRC_PATHS := *.py tests
3*3c875a21SAndroid Build Coastguard Worker# This is distinct from SRC_PATHS because not all the tests can be run with
4*3c875a21SAndroid Build Coastguard Worker# pytest. Any test that touches the METADATA file (or even imports a module that
5*3c875a21SAndroid Build Coastguard Worker# does) must be run via soong.
6*3c875a21SAndroid Build Coastguard WorkerPYTEST_PATHS := tests
7*3c875a21SAndroid Build Coastguard Worker
8*3c875a21SAndroid Build Coastguard Worker.PHONY: check
9*3c875a21SAndroid Build Coastguard Workercheck: lint test
10*3c875a21SAndroid Build Coastguard Worker.DEFAULT_GOAL: check
11*3c875a21SAndroid Build Coastguard Worker
12*3c875a21SAndroid Build Coastguard Worker.PHONY: lint
13*3c875a21SAndroid Build Coastguard Workerlint:
14*3c875a21SAndroid Build Coastguard Worker	mypy $(SRC_PATHS)
15*3c875a21SAndroid Build Coastguard Worker	pylint $(SRC_PATHS)
16*3c875a21SAndroid Build Coastguard Worker
17*3c875a21SAndroid Build Coastguard Worker.PHONY: test
18*3c875a21SAndroid Build Coastguard Workertest:
19*3c875a21SAndroid Build Coastguard Worker	pytest $(PYTEST_PATHS)
20*3c875a21SAndroid Build Coastguard Worker	atest --host-unit-test-only
21