Skip to content

Commit

Permalink
test: Add test for instrumentation
Browse files Browse the repository at this point in the history
Install and use `clippy-tracing` with `clippy-tracing --check` to
assert code is properly instrumented.

Signed-off-by: Jonathan Woollett-Light <[email protected]>
  • Loading branch information
Jonathan Woollett-Light committed Oct 9, 2023
1 parent de49e0b commit 39bdb3a
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions tests/integration_tests/build/test_clippy.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

import pytest

from framework import utils
from host_tools.cargo_build import cargo

SUCCESS_CODE = 0
Expand All @@ -23,3 +24,13 @@ def test_rust_clippy(target):
Test that clippy does not generate any errors/warnings.
"""
cargo("clippy", f"--target {target} --all --profile test", "-D warnings")

def test_clippy_tracing():
"""
Tests clippy-tracing
"""

# TODO Temporary for testing before creating a new docker container.
utils.run_cmd("cargo install clippy-tracing --features log")

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 comments on commit 39bdb3a

Please sign in to comment.