From a678ecc7c62e25dc96824365681f801fc8400da3 Mon Sep 17 00:00:00 2001 From: Jonathan Woollett-Light Date: Thu, 12 Oct 2023 10:00:09 +0100 Subject: [PATCH] ci: Test for unused cargo dependencies From: Jonathan Woollett-Light Adds test for unused cargo dependencies. Signed-off-by: Jonathan Woollett-Light Co-authored-by: Patrick Roy Signed-off-by: Patrick Roy --- tests/integration_tests/build/test_dependencies.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 tests/integration_tests/build/test_dependencies.py diff --git a/tests/integration_tests/build/test_dependencies.py b/tests/integration_tests/build/test_dependencies.py new file mode 100644 index 00000000000..6ee3a675702 --- /dev/null +++ b/tests/integration_tests/build/test_dependencies.py @@ -0,0 +1,12 @@ +# Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. +# SPDX-License-Identifier: Apache-2.0 +"""Enforces controls over dependencies.""" + +from host_tools.cargo_build import cargo + + +def test_unused_dependencies(): + """ + Test that there are no unused dependencies. + """ + cargo("udeps", "--all", nightly=True)