From a87e178553e148adce8f1f05be8542fc0cb5c32a Mon Sep 17 00:00:00 2001 From: Gilles Peskine Date: Tue, 12 Jan 2021 01:13:39 +0100 Subject: [PATCH] If there are no arguments, don't update the file content This avoids having to bother with edge cases of the .data syntax. Signed-off-by: Gilles Peskine --- tests/scripts/set_psa_test_dependencies.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/scripts/set_psa_test_dependencies.py b/tests/scripts/set_psa_test_dependencies.py index 894272ef48..49716b89af 100755 --- a/tests/scripts/set_psa_test_dependencies.py +++ b/tests/scripts/set_psa_test_dependencies.py @@ -190,6 +190,10 @@ def updated_dependencies(file_name, function_name, arguments, dependencies): def keep_manual_dependencies(file_name, function_name, arguments): #pylint: disable=unused-argument """Declare test functions with unusual dependencies here.""" + # If there are no arguments, we can't do any useful work. Assume that if + # there are dependencies, they are warranted. + if not arguments: + return True # When PSA_ERROR_NOT_SUPPORTED is expected, usually, at least one of the # constants mentioned in the test should not be supported. It isn't # possible to determine which one in a systematic way. So let the programmer