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