test: build more test cases with meson
[dpdk.git] / test / test / meson.build
1 # SPDX-License-Identifier: BSD-3-Clause
2 # Copyright(c) 2017 Intel Corporation
3
4 test_sources = files('commands.c',
5         'packet_burst_generator.c',
6         'test.c',
7         'test_acl.c',
8         'test_alarm.c',
9         'test_atomic.c',
10         'test_byteorder.c',
11         'test_cmdline.c',
12         'test_cmdline_cirbuf.c',
13         'test_cmdline_etheraddr.c',
14         'test_cmdline_ipaddr.c',
15         'test_cmdline_lib.c',
16         'test_cmdline_num.c',
17         'test_cmdline_portlist.c',
18         'test_cmdline_string.c',
19         'test_common.c',
20         'test_cpuflags.c',
21         'test_crc.c',
22         'test_cryptodev.c',
23         'test_cryptodev_blockcipher.c',
24         'test_cycles.c',
25         'test_debug.c',
26         'test_devargs.c',
27         'test_distributor.c',
28         'test_distributor_perf.c',
29         'test_eal_flags.c',
30         'test_eal_fs.c',
31         'test_efd.c',
32         'test_efd_perf.c',
33         'test_errno.c',
34         'test_event_ring.c',
35         'test_eventdev.c',
36         'test_func_reentrancy.c',
37         'test_flow_classify.c',
38         'test_hash.c',
39         'test_hash_functions.c',
40         'test_hash_multiwriter.c',
41         'test_hash_perf.c',
42         'test_hash_scaling.c',
43         'test_interrupts.c',
44         'test_kni.c',
45         'test_kvargs.c',
46         'test_link_bonding.c',
47         'test_link_bonding_mode4.c',
48         'test_logs.c',
49         'test_lpm.c',
50         'test_lpm6.c',
51         'test_lpm6_perf.c',
52         'test_lpm_perf.c',
53         'test_malloc.c',
54         'test_mbuf.c',
55         'test_member.c',
56         'test_member_perf.c',
57         'test_memcpy.c',
58         'test_memcpy_perf.c',
59         'test_memory.c',
60         'test_mempool.c',
61         'test_mempool_perf.c',
62         'test_memzone.c',
63         'test_meter.c',
64         'test_mp_secondary.c',
65         'test_per_lcore.c',
66         'test_pmd_perf.c',
67         'test_pmd_ring.c',
68         'test_pmd_ring_perf.c',
69         'test_power.c',
70         'test_power_acpi_cpufreq.c',
71         'test_power_kvm_vm.c',
72         'test_prefetch.c',
73         'test_red.c',
74         'test_reorder.c',
75         'test_ring.c',
76         'test_ring_perf.c',
77         'test_rwlock.c',
78         'test_sched.c',
79         'test_service_cores.c',
80         'test_spinlock.c',
81         'test_string_fns.c',
82         'test_table.c',
83         'test_table_acl.c',
84         'test_table_combined.c',
85         'test_table_pipeline.c',
86         'test_table_ports.c',
87         'test_table_tables.c',
88         'test_tailq.c',
89         'test_thash.c',
90         'test_timer.c',
91         'test_timer_perf.c',
92         'test_timer_racecond.c',
93         'test_version.c',
94         'virtual_pmd.c'
95 )
96
97 test_deps = ['acl',
98         'cfgfile',
99         'cmdline',
100         'cryptodev',
101         'distributor',
102         'efd',
103         'ethdev',
104         'eventdev',
105         'flow_classify',
106         'hash',
107         'lpm',
108         'member',
109         'pipeline',
110         'port',
111         'power',
112         'reorder',
113         'ring',
114         'timer'
115 ]
116
117 test_names = [
118         'acl_autotest',
119         'alarm_autotest',
120         'atomic_autotest',
121         'byteorder_autotest',
122         'cmdline_autotest',
123         'common_autotest',
124         'cpuflags_autotest',
125         'crc_autotest',
126         'cryptodev_qat_autotest',
127         'cryptodev_aesni_mb_autotest',
128         'cryptodev_openssl_autotest',
129         'cryptodev_aesni_gcm_autotest',
130         'cryptodev_null_autotest',
131         'cryptodev_sw_snow3g_autotest',
132         'cryptodev_sw_kasumi_autotest',
133         'cryptodev_sw_zuc_autotest',
134         'cryptodev_sw_armv8_autotest',
135         'cryptodev_sw_mrvl_autotest',
136         'cryptodev_dpaa2_sec_autotest',
137         'cryptodev_dpaa_sec_autotest',
138         'cycles_autotest',
139         'debug_autotest',
140         'devargs_autotest',
141         'distributor_autotest',
142         'distributor_perf_autotest',
143         'eal_flags_autotest',
144         'eal_fs_autotest',
145         'efd_autotest',
146         'efd_perf_autotest',
147         'errno_autotest',
148         'event_ring_autotest',
149         'eventdev_common_autotest',
150         'eventdev_octeontx_autotest',
151         'eventdev_sw_autotest',
152         'func_reentrancy_autotest',
153         'flow_classify_autotest',
154         'hash_scaling_autotest',
155         'hash_autotest',
156         'hash_functions_autotest',
157         'hash_multiwriter_autotest',
158         'hash_perf_autotest',
159         'interrupt_autotest',
160         'kni_autotest',
161         'kvargs_autotest',
162         'link_bonding_autotest',
163         'link_bonding_mode4_autotest',
164         'logs_autotest',
165         'lpm6_autotest',
166         'lpm6_perf_autotest',
167         'lpm_autotest',
168         'lpm_perf_autotest',
169         'malloc_autotest',
170         'mbuf_autotest',
171         'member_autotest',
172         'member_perf_autotest',
173         'memcpy_autotest',
174         'memcpy_perf_autotest',
175         'memory_autotest',
176         'mempool_autotest',
177         'mempool_perf_autotest',
178         'memzone_autotest',
179         'meter_autotest',
180         'multiprocess_autotest',
181         'per_lcore_autotest',
182         'pmd_perf_autotest',
183         'power_acpi_cpufreq_autotest',
184         'power_autotest',
185         'power_kvm_vm_autotest',
186         'prefetch_autotest',
187         'red_all',
188         'red_autotest',
189         'red_perf',
190         'reorder_autotest',
191         'ring_autotest',
192         'ring_perf_autotest',
193         'ring_pmd_autotest',
194         'ring_pmd_perf_autotest',
195         'rwlock_autotest',
196         'sched_autotest',
197         'service_autotest',
198         'spinlock_autotest',
199         'string_autotest',
200         'table_autotest',
201         'tailq_autotest',
202         'thash_autotest',
203         'timer_autotest',
204         'timer_perf__autotest',
205         'timer_racecond_autotest',
206         'user_delay_us',
207         'version_autotest',
208 ]
209
210 if dpdk_conf.has('RTE_LIBRTE_PDUMP')
211         test_deps += 'pdump'
212 endif
213 if dpdk_conf.has('RTE_LIBRTE_I40E_PMD')
214         test_deps += 'pmd_i40e'
215 endif
216 if dpdk_conf.has('RTE_LIBRTE_IXGBE_PMD')
217         test_deps += 'pmd_ixgbe'
218 endif
219 if dpdk_conf.has('RTE_LIBRTE_BOND_PMD')
220         test_deps += 'pmd_bond'
221 endif
222 if dpdk_conf.has('RTE_LIBRTE_RING_PMD')
223         test_deps += 'pmd_ring'
224 endif
225
226 test_dep_objs = []
227 foreach d:test_deps
228         def_lib = get_option('default_library')
229         test_dep_objs += get_variable(def_lib + '_rte_' + d)
230 endforeach
231
232 link_libs = []
233 if get_option('default_library') == 'static'
234         link_libs = dpdk_drivers
235 endif
236
237 if get_option('tests')
238         dpdk_test = executable('dpdk-test',
239                 test_sources,
240                 link_whole: link_libs,
241                 dependencies: test_dep_objs,
242                 c_args: [machine_arg, '-DALLOW_EXPERIMENTAL_API'],
243                 install_rpath: driver_install_path,
244                 install: false)
245
246         # some perf tests (eg: memcpy perf autotest)take very long
247         # to complete, so timeout to 10 minutes
248         timeout_seconds = 600
249
250         foreach t:test_names
251                 test(t, dpdk_test,
252                         env : ['DPDK_TEST='+t],
253                         timeout : timeout_seconds,
254                         is_parallel : false)
255         endforeach
256 endif