From 69f93b5040c593f800bb0d5c80e3fa4bd2e60c2b Mon Sep 17 00:00:00 2001 From: Gilles Peskine Date: Thu, 21 Nov 2019 16:49:50 +0100 Subject: [PATCH] Move the names of input files to global variables No behavior change. --- tests/scripts/test_psa_constant_names.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/tests/scripts/test_psa_constant_names.py b/tests/scripts/test_psa_constant_names.py index 785d1a4be..6ae393643 100755 --- a/tests/scripts/test_psa_constant_names.py +++ b/tests/scripts/test_psa_constant_names.py @@ -349,6 +349,9 @@ def run_tests(options, inputs): errors += e return count, errors +HEADERS = ['psa/crypto.h', 'psa/crypto_extra.h', 'psa/crypto_values.h'] +TEST_SUITES = ['tests/suites/test_suite_psa_crypto_metadata.data'] + def main(): parser = argparse.ArgumentParser(description=globals()['__doc__']) parser.add_argument('--include', '-I', @@ -364,10 +367,8 @@ def main(): default='programs/psa/psa_constant_names', help='Program to test') options = parser.parse_args() - headers = [os.path.join(options.include[0], 'psa', h) - for h in ['crypto.h', 'crypto_extra.h', 'crypto_values.h']] - test_suites = ['tests/suites/test_suite_psa_crypto_metadata.data'] - inputs = gather_inputs(headers, test_suites) + headers = [os.path.join(options.include[0], h) for h in HEADERS] + inputs = gather_inputs(headers, TEST_SUITES) count, errors = run_tests(options, inputs) report_errors(errors) if errors == []: