| 1 |
# Copyright (c) 2022-2025, PostgreSQL Global Development Group |
| 2 |
|
| 3 |
pgc_files = [ |
| 4 |
'array_of_struct', |
| 5 |
'autoprep', |
| 6 |
'comment', |
| 7 |
'cursor', |
| 8 |
'define', |
| 9 |
'init', |
| 10 |
'outofscope', |
| 11 |
'pointer_to_struct', |
| 12 |
'strings', |
| 13 |
'type', |
| 14 |
'variable', |
| 15 |
'whenever', |
| 16 |
'whenever_do_continue', |
| 17 |
] |
| 18 |
|
| 19 |
pgc_extra_flags = { |
| 20 |
'array_of_struct': ['-c'], |
| 21 |
'pointer_to_struct': ['-c'], |
| 22 |
'autoprep': ['-r', 'prepare'], |
| 23 |
'strings': ['-i'], |
| 24 |
} |
| 25 |
|
| 26 |
foreach pgc_file : pgc_files |
| 27 |
exe_input = custom_target('@[email protected]'.format(pgc_file), |
| 28 |
input: '@[email protected]'.format(pgc_file), |
| 29 |
command: ecpg_preproc_test_command_start + |
| 30 |
pgc_extra_flags.get(pgc_file, []) + |
| 31 |
ecpg_preproc_test_command_end, |
| 32 |
kwargs: ecpg_preproc_kw, |
| 33 |
) |
| 34 |
|
| 35 |
ecpg_test_dependencies += executable(pgc_file, |
| 36 |
exe_input, |
| 37 |
kwargs: ecpg_test_exec_kw, |
| 38 |
) |
| 39 |
endforeach |