mirror of
https://github.com/Mbed-TLS/mbedtls-framework.git
synced 2026-10-17 22:17:56 +00:00
generate_psa_tests.py: Sort and uniquify dependencies
No semantic change. In the generated files, `depends_on:` lines have entries that are reordered. Signed-off-by: Gilles Peskine <[email protected]>
This commit is contained in:
@@ -83,7 +83,12 @@ class TestCase(test_case.TestCase):
|
||||
self.manual_dependencies += dependencies
|
||||
|
||||
def get_dependencies(self) -> List[str]:
|
||||
return sorted(self.automatic_dependencies) + self.manual_dependencies
|
||||
# Make the output independent of the order in which the dependencies
|
||||
# are calculated by the script. Also avoid duplicates. This makes
|
||||
# the output robust with respect to refactoring of the scripts.
|
||||
dependencies = set(self.manual_dependencies)
|
||||
dependencies.update(self.automatic_dependencies)
|
||||
return sorted(dependencies)
|
||||
|
||||
def skip_if_any_not_implemented(self, dependencies: List[str]) -> None:
|
||||
"""Skip the test case if any of the given dependencies is not implemented."""
|
||||
|
||||
Reference in New Issue
Block a user