Debian Codegraph @

ansible_collections/dellemc/openmanage/Makefile

raw symbols SCIP
1
2 venv:
3 rm -rf .venv
4 python3 -m venv .venv
5 . .venv/bin/activate && \
6 pip install ansible-core>=2.19 ansible-lint \
7 -r requirements.txt \
8 -r test-requirements.txt
9
10 ifneq ($(origin tname), undefined)
11 ttype?=modules
12 TC?=tests/unit/plugins/$(ttype)/test_$(tname).py
13 else ifneq ($(origin ttype), undefined)
14 TC?=tests/unit/plugins/$(ttype)
15 else
16 TC?=tests/unit/plugins
17 endif
18
19 # Examples
20 # 1. make unit-test # to run all
21 # 2. make unit-test ttype=module_utils # to run only module_utils
22 # 3. make unit-test ttype=modules_ttils tname=ome # to run only modules_utils/ome
23 # 4. make unit-test tname=idrac_secure_boot # ttype defaults to modules
24 # 5. make unit-test TC=tests/unit/plugins/modules/test_idrac_secure_boot.py
25 unit-test:
26 rm -rf coverage
27 PYTHONPATH=$(subst ansible_collections/dellemc/openmanage,,$(CURDIR)):$(PYTHONPATH) \
28 pytest $(TC) --cov=plugins/ --cov-report=html:coverage