meson.build (11618B)
1 # This build file is in the public domain 2 3 4 check_SCRIPTS = [ 5 'test_merchant_instance_auth', 6 'test_merchant_instance_creation', 7 'test_merchant_instance_response', 8 'test_merchant_instance_purge', 9 'test_merchant_kyc', 10 'test_merchant_mfa', 11 'test_merchant_order_creation', 12 'test_merchant_order_refund', 13 'test_merchant_order_autocleanup', 14 'test_merchant_product_creation', 15 'test_merchant_statistics', 16 'test_merchant_templates', 17 'test_merchant_transfer_tracking', 18 'test-merchant-walletharness', 19 'test_merchant_wirewatch', 20 ] 21 22 foreach f : check_SCRIPTS 23 f_sh = '@0@.sh'.format(f) 24 s = configure_file(input: f_sh, output: f_sh, copy: true) 25 test( 26 f, 27 s, 28 workdir: meson.current_build_dir(), 29 suite: ['testing', 'integrationtests'], 30 is_parallel: false, 31 timeout: 600, 32 ) 33 34 endforeach 35 36 37 libtalermerchanttesting_la_SOURCES = [ 38 'testing_api_cmd_config.c', 39 'testing_api_cmd_abort_order.c', 40 'testing_api_cmd_claim_order.c', 41 'testing_api_cmd_check_order_external.c', 42 'testing_api_cmd_collect_order.c', 43 'testing_api_cmd_depositcheck.c', 44 'testing_api_cmd_get_instance.c', 45 'testing_api_cmd_get_instances.c', 46 'testing_api_cmd_get_orders.c', 47 'testing_api_cmd_get_otp_device.c', 48 'testing_api_cmd_get_otp_devices.c', 49 'testing_api_cmd_get_product.c', 50 'testing_api_cmd_get_product_image.c', 51 'testing_api_cmd_get_products.c', 52 'testing_api_cmd_get_statisticsamount.c', 53 'testing_api_cmd_get_statisticscounter.c', 54 'testing_api_cmd_get_transfers.c', 55 'testing_api_cmd_get_templates.c', 56 'testing_api_cmd_get_template.c', 57 'testing_api_cmd_get_unit.c', 58 'testing_api_cmd_get_units.c', 59 'testing_api_cmd_get_webhooks.c', 60 'testing_api_cmd_get_webhook.c', 61 'testing_api_cmd_delete_account.c', 62 'testing_api_cmd_delete_instance.c', 63 'testing_api_cmd_delete_order.c', 64 'testing_api_cmd_delete_otp_device.c', 65 'testing_api_cmd_delete_product.c', 66 'testing_api_cmd_delete_template.c', 67 'testing_api_cmd_delete_unit.c', 68 'testing_api_cmd_delete_webhook.c', 69 'testing_api_cmd_delete_transfer.c', 70 'testing_api_cmd_exec_donaukeyupdate.c', 71 'testing_api_cmd_forget_order.c', 72 'testing_api_cmd_kyc_get.c', 73 'testing_api_cmd_lock_product.c', 74 'testing_api_cmd_instance_auth.c', 75 'testing_api_cmd_instance_token.c', 76 'testing_api_cmd_merchant_get_order.c', 77 'testing_api_cmd_patch_instance.c', 78 'testing_api_cmd_patch_otp_device.c', 79 'testing_api_cmd_patch_product.c', 80 'testing_api_cmd_patch_template.c', 81 'testing_api_cmd_patch_unit.c', 82 'testing_api_cmd_patch_webhook.c', 83 'testing_api_cmd_pay_order.c', 84 'testing_api_cmd_post_account.c', 85 'testing_api_cmd_post_instances.c', 86 'testing_api_cmd_post_orders_paid.c', 87 'testing_api_cmd_post_orders.c', 88 'testing_api_cmd_post_otp_devices.c', 89 'testing_api_cmd_post_categories.c', 90 'testing_api_cmd_post_products.c', 91 'testing_api_cmd_post_transfers.c', 92 'testing_api_cmd_post_templates.c', 93 'testing_api_cmd_post_units.c', 94 'testing_api_cmd_post_tokenfamilies.c', 95 'testing_api_cmd_post_using_templates.c', 96 'testing_api_cmd_post_webhooks.c', 97 'testing_api_cmd_refund_external.c', 98 'testing_api_cmd_refund_order.c', 99 'testing_api_cmd_tme.c', 100 'testing_api_cmd_wallet_get_order.c', 101 'testing_api_cmd_wallet_get_template.c', 102 'testing_api_cmd_wallet_post_orders_refund.c', 103 'testing_api_cmd_webhook.c', 104 'testing_api_cmd_testserver.c', 105 'testing_api_cmd_checkserver.c', 106 'testing_api_helpers.c', 107 'testing_api_traits.c', 108 'testing_api_cmd_post_donau_charity_merchant.c', 109 'testing_api_cmd_post_donau_instances.c', 110 'testing_api_cmd_get_donau_instances.c', 111 'testing_api_cmd_delete_donau_instances.c', 112 ] 113 114 115 libtalermerchanttesting = library( 116 'talermerchanttesting', 117 libtalermerchanttesting_la_SOURCES, 118 soversion: solibversions['libtalermerchanttesting']['soversion'], 119 version: solibversions['libtalermerchanttesting']['soversion'], 120 install_rpath: rpath_option, 121 dependencies: [ 122 donau_dep, 123 donauutil_dep, 124 libtalermerchant_dep, 125 donautesting_dep, 126 talerexchange_dep, 127 talermhd_dep, 128 talerbank_dep, 129 talertesting_dep, 130 talerjson_dep, 131 talerutil_dep, 132 gnunetutil_dep, 133 gnunetcurl_dep, 134 gnunetjson_dep, 135 json_dep, 136 mhd_dep, 137 m_dep, 138 ], 139 include_directories: [incdir, configuration_inc], 140 install: true, 141 install_dir: get_option('libdir'), 142 ) 143 144 libtalermerchanttesting_dep = declare_dependency( 145 link_with: libtalermerchanttesting, 146 ) 147 pkg.generate( 148 libtalermerchanttesting, 149 url: 'https://taler.net', 150 description: 'GNU Taler merchant testing library', 151 ) 152 153 if talerfakebank_dep.found() 154 if twister_dep.found() 155 test_merchant_api_twisted_cs = executable( 156 'test_merchant_api_twisted_cs', 157 ['test_merchant_api_twisted.c'], 158 dependencies: [ 159 talertesting_dep, 160 libtalermerchant_dep, 161 libtalermerchantutil_dep, 162 libtalermerchantdb_dep, 163 libtalermerchanttesting_dep, 164 talertwistertesting_dep, 165 twister_dep, 166 talerexchange_dep, 167 talerbank_dep, 168 talerfakebank_dep, 169 talerjson_dep, 170 talerutil_dep, 171 json_dep, 172 gcrypt_dep, 173 gnunetutil_dep, 174 gnunetjson_dep, 175 gnunetcurl_dep, 176 ], 177 include_directories: [incdir, configuration_inc], 178 build_by_default: false, 179 install: false, 180 ) 181 test( 182 'test_merchant_api_twisted_cs', 183 test_merchant_api_twisted_cs, 184 workdir: meson.current_build_dir(), 185 suite: ['testing', 'integrationtests'], 186 is_parallel: false, 187 timeout: 300, 188 ) 189 190 191 test_merchant_api_twisted_rsa = executable( 192 'test_merchant_api_twisted_rsa', 193 ['test_merchant_api_twisted.c'], 194 dependencies: [ 195 talertesting_dep, 196 libtalermerchant_dep, 197 libtalermerchantutil_dep, 198 libtalermerchantdb_dep, 199 libtalermerchanttesting_dep, 200 talertwistertesting_dep, 201 twister_dep, 202 talerexchange_dep, 203 talerbank_dep, 204 talerfakebank_dep, 205 talerjson_dep, 206 talerutil_dep, 207 json_dep, 208 gcrypt_dep, 209 gnunetutil_dep, 210 gnunetjson_dep, 211 gnunetcurl_dep, 212 ], 213 include_directories: [incdir, configuration_inc], 214 build_by_default: false, 215 install: false, 216 ) 217 test( 218 'test_merchant_api_twisted_rsa', 219 test_merchant_api_twisted_rsa, 220 workdir: meson.current_build_dir(), 221 suite: ['testing', 'integrationtests'], 222 is_parallel: false, 223 timeout: 300, 224 ) 225 226 endif 227 228 test_merchant_api_cs = executable( 229 'test_merchant_api_cs', 230 ['test_merchant_api.c'], 231 dependencies: [ 232 donautesting_dep, 233 talertesting_dep, 234 libtalermerchant_dep, 235 libtalermerchantutil_dep, 236 libtalermerchantdb_dep, 237 libtalermerchanttesting_dep, 238 talerexchange_dep, 239 talerbank_dep, 240 talerfakebank_dep, 241 talerjson_dep, 242 talerutil_dep, 243 json_dep, 244 gcrypt_dep, 245 gnunetutil_dep, 246 gnunetjson_dep, 247 gnunetcurl_dep, 248 ], 249 include_directories: [incdir, configuration_inc], 250 build_by_default: false, 251 install: false, 252 ) 253 test( 254 'test_merchant_api_cs', 255 test_merchant_api_cs, 256 workdir: meson.current_build_dir(), 257 suite: ['testing', 'integrationtests'], 258 is_parallel: false, 259 timeout: 300, 260 ) 261 262 test_merchant_api_rsa = executable( 263 'test_merchant_api_rsa', 264 ['test_merchant_api.c'], 265 dependencies: [ 266 donautesting_dep, 267 talertesting_dep, 268 libtalermerchant_dep, 269 libtalermerchantutil_dep, 270 libtalermerchantdb_dep, 271 libtalermerchanttesting_dep, 272 talerexchange_dep, 273 talerbank_dep, 274 talerfakebank_dep, 275 talerjson_dep, 276 talerutil_dep, 277 json_dep, 278 gcrypt_dep, 279 gnunetutil_dep, 280 gnunetjson_dep, 281 gnunetcurl_dep, 282 ], 283 include_directories: [incdir, configuration_inc], 284 build_by_default: false, 285 install: false, 286 ) 287 test( 288 'test_merchant_api_rsa', 289 test_merchant_api_rsa, 290 workdir: meson.current_build_dir(), 291 suite: ['testing', 'integrationtests'], 292 is_parallel: false, 293 timeout: 300, 294 ) 295 296 test_reconciliation_rsa = executable( 297 'test_reconciliation_rsa', 298 ['test_reconciliation.c'], 299 dependencies: [ 300 talertesting_dep, 301 libtalermerchant_dep, 302 libtalermerchantutil_dep, 303 libtalermerchantdb_dep, 304 libtalermerchanttesting_dep, 305 talerexchange_dep, 306 talerbank_dep, 307 talerfakebank_dep, 308 talerjson_dep, 309 talerutil_dep, 310 json_dep, 311 gcrypt_dep, 312 gnunetutil_dep, 313 gnunetjson_dep, 314 gnunetcurl_dep, 315 ], 316 include_directories: [incdir, configuration_inc], 317 build_by_default: false, 318 install: false, 319 ) 320 test( 321 'test_reconciliation_rsa', 322 test_reconciliation_rsa, 323 workdir: meson.current_build_dir(), 324 suite: ['testing', 'integrationtests'], 325 is_parallel: false, 326 ) 327 328 test_kyc_api = executable( 329 'test_kyc_api', 330 ['test_kyc_api.c'], 331 dependencies: [ 332 talertesting_dep, 333 libtalermerchant_dep, 334 libtalermerchantutil_dep, 335 libtalermerchantdb_dep, 336 libtalermerchanttesting_dep, 337 talerexchange_dep, 338 talerbank_dep, 339 talerfakebank_dep, 340 talerjson_dep, 341 talerutil_dep, 342 json_dep, 343 gcrypt_dep, 344 gnunetutil_dep, 345 gnunetjson_dep, 346 gnunetcurl_dep, 347 ], 348 include_directories: [incdir, configuration_inc], 349 build_by_default: false, 350 install: false, 351 ) 352 test( 353 'test_kyc_api', 354 test_kyc_api, 355 workdir: meson.current_build_dir(), 356 suite: ['testing', 'integrationtests'], 357 is_parallel: false, 358 timeout: 300, 359 ) 360 361 362 endif 363 364 EXTRA_DIST = [ 365 'setup.sh', 366 'test_key_rotation.conf', 367 'test_kyc_api.conf', 368 'test_merchant_api.conf', 369 'test_merchant_api-cs.conf', 370 'test_merchant_api-rsa.conf', 371 'test_merchant_api_twisted-cs.conf', 372 'test_merchant_api_twisted-rsa.conf', 373 'test_merchant_api_proxy_merchant.conf', 374 'test_merchant_api_proxy_exchange.conf', 375 'test_merchant_mfa.conf', 376 'test_email_helper.sh', 377 'test_sms_helper.sh', 378 'test_merchant.priv', 379 'test_template.conf', 380 ] 381 foreach f : EXTRA_DIST 382 configure_file(input: f, output: f, copy: true) 383 endforeach