From 95ab71a19ad94697db9852ae20c42e5e2cf7afe1 Mon Sep 17 00:00:00 2001 From: Gilles Peskine Date: Fri, 4 Jan 2019 19:46:59 +0100 Subject: [PATCH] test_psa_constant_names: make tmp files easier to recognize --- tests/scripts/test_psa_constant_names.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tests/scripts/test_psa_constant_names.py b/tests/scripts/test_psa_constant_names.py index de0d0146d..7f7076c4c 100755 --- a/tests/scripts/test_psa_constant_names.py +++ b/tests/scripts/test_psa_constant_names.py @@ -206,13 +206,16 @@ def run_c(options, type, names): c_name = None exe_name = None try: - c_fd, c_name = tempfile.mkstemp(suffix='.c', + c_fd, c_name = tempfile.mkstemp(prefix='tmp-{}-'.format(type), + suffix='.c', dir='programs/psa') exe_suffix = '.exe' if platform.system() == 'Windows' else '' exe_name = c_name[:-2] + exe_suffix remove_file_if_exists(exe_name) c_file = os.fdopen(c_fd, 'w', encoding='ascii') - c_file.write('''/* Generated by test_psa_constant_names.py */ + c_file.write('/* Generated by test_psa_constant_names.py for {} values */' + .format(type)) + c_file.write(''' #include #include int main(void)