Skip to content

Commit a9db735

Browse files
author
Jonathan Woollett-Light
committed
test: Add test for instrumentation
Install and use `clippy-tracing` with `clippy-tracing --check` to assert code is properly instrumented. Signed-off-by: Jonathan Woollett-Light <jcawl@amazon.co.uk>
1 parent 145b558 commit a9db735

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

tests/integration_tests/build/test_clippy.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77

88
import pytest
99

10+
from framework import utils
1011
from host_tools.cargo_build import cargo
1112

1213
SUCCESS_CODE = 0
@@ -23,3 +24,13 @@ def test_rust_clippy(target):
2324
Test that clippy does not generate any errors/warnings.
2425
"""
2526
cargo("clippy", f"--target {target} --all --profile test", "-D warnings")
27+
28+
def test_clippy_tracing():
29+
"""
30+
Tests clippy-tracing
31+
"""
32+
33+
# TODO Temporary for testing before creating a new docker container.
34+
utils.run_cmd("cargo install clippy-tracing --features log")
35+
36+
utils.run_cmd("clippy-tracing --action check --path ../src --exclude vmm_config/logger.rs,virtio_gen,bindings.rs,net_gen,benches,logger/src,signal_handler.rs")

0 commit comments

Comments
 (0)