Skip to content

Commit 64082ef

Browse files
author
Jonathan Woollett-Light
committed
tests: clippy-tracing
Adds test to check functions are instrumented. Signed-off-by: Jonathan Woollett-Light <jcawl@amazon.co.uk>
1 parent 69516c9 commit 64082ef

File tree

2 files changed

+18
-6
lines changed

2 files changed

+18
-6
lines changed

Cargo.lock

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tests/integration_tests/build/test_clippy.py

Lines changed: 12 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,14 @@ 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+
# This is only temporary for testing before creating a new docker container.
34+
# TODO Remove this and instead add the tool to the docker container.
35+
utils.run_cmd("cargo install --git https://github.com/JonathanWoollett-Light/clippy-tracing --rev da3403e4feb6ff3ec6d74d735e374e21e03488f4")
36+
37+
utils.run_cmd("clippy-tracing --action check path --path ../src --exclude virtio_gen,bindings.rs,net_gen,benches")

0 commit comments

Comments
 (0)