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