Tests: Silence deprecation warnings in test-cov and test-verifier

c2de7da added -W ignore::DeprecationWarning to the 'test' target only, so
'make test-cov' and 'make test-verifier' still drown in warnings from the
generated vmlinux.py.

Also correct the test-verifier note: the suite does not run pytest under sudo,
tests/framework/verifier.py shells out to 'sudo bpftool' itself.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Pragyansh Chaturvedi
2026-08-07 05:37:05 +05:30
parent c2de7dad96
commit f796338245

View File

@ -10,12 +10,13 @@ test:
pytest tests/ -W ignore::DeprecationWarning -v --tb=short -m "not verifier"
test-cov:
pytest tests/ -v --tb=short -m "not verifier" \
pytest tests/ -W ignore::DeprecationWarning -v --tb=short -m "not verifier" \
--cov=pythonbpf --cov-report=term-missing --cov-report=html
test-verifier:
@echo "NOTE: verifier tests require sudo and bpftool. Uses sudo .venv/bin/python3."
pytest tests/test_verifier.py -v --tb=short -m verifier
@echo "NOTE: verifier tests shell out to 'sudo bpftool'; run 'sudo -v' first so"
@echo " the timestamp does not lapse mid-run. bpftool must be installed."
pytest tests/test_verifier.py -W ignore::DeprecationWarning -v --tb=short -m verifier
all: clean install