meson.build (11231B)
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: 300, 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 ) 183 184 185 test_merchant_api_twisted_rsa = executable( 186 'test_merchant_api_twisted_rsa', 187 ['test_merchant_api_twisted.c'], 188 dependencies: [ 189 talertesting_dep, 190 libtalermerchant_dep, 191 libtalermerchantutil_dep, 192 libtalermerchantdb_dep, 193 libtalermerchanttesting_dep, 194 talertwistertesting_dep, 195 twister_dep, 196 talerexchange_dep, 197 talerbank_dep, 198 talerfakebank_dep, 199 talerjson_dep, 200 talerutil_dep, 201 json_dep, 202 gcrypt_dep, 203 gnunetutil_dep, 204 gnunetjson_dep, 205 gnunetcurl_dep, 206 ], 207 include_directories: [incdir, configuration_inc], 208 build_by_default: false, 209 install: false, 210 ) 211 test( 212 'test_merchant_api_twisted_rsa', 213 test_merchant_api_twisted_rsa, 214 workdir: meson.current_build_dir(), 215 suite: ['testing', 'integrationtests'], 216 is_parallel: false, 217 ) 218 219 endif 220 221 test_merchant_api_cs = executable( 222 'test_merchant_api_cs', 223 ['test_merchant_api.c'], 224 dependencies: [ 225 donautesting_dep, 226 talertesting_dep, 227 libtalermerchant_dep, 228 libtalermerchantutil_dep, 229 libtalermerchantdb_dep, 230 libtalermerchanttesting_dep, 231 talerexchange_dep, 232 talerbank_dep, 233 talerfakebank_dep, 234 talerjson_dep, 235 talerutil_dep, 236 json_dep, 237 gcrypt_dep, 238 gnunetutil_dep, 239 gnunetjson_dep, 240 gnunetcurl_dep, 241 ], 242 include_directories: [incdir, configuration_inc], 243 build_by_default: false, 244 install: false, 245 ) 246 test( 247 'test_merchant_api_cs', 248 test_merchant_api_cs, 249 workdir: meson.current_build_dir(), 250 suite: ['testing', 'integrationtests'], 251 is_parallel: false, 252 ) 253 254 test_merchant_api_rsa = executable( 255 'test_merchant_api_rsa', 256 ['test_merchant_api.c'], 257 dependencies: [ 258 donautesting_dep, 259 talertesting_dep, 260 libtalermerchant_dep, 261 libtalermerchantutil_dep, 262 libtalermerchantdb_dep, 263 libtalermerchanttesting_dep, 264 talerexchange_dep, 265 talerbank_dep, 266 talerfakebank_dep, 267 talerjson_dep, 268 talerutil_dep, 269 json_dep, 270 gcrypt_dep, 271 gnunetutil_dep, 272 gnunetjson_dep, 273 gnunetcurl_dep, 274 ], 275 include_directories: [incdir, configuration_inc], 276 build_by_default: false, 277 install: false, 278 ) 279 test( 280 'test_merchant_api_rsa', 281 test_merchant_api_rsa, 282 workdir: meson.current_build_dir(), 283 suite: ['testing', 'integrationtests'], 284 is_parallel: false, 285 ) 286 287 test_reconciliation_rsa = executable( 288 'test_reconciliation_rsa', 289 ['test_reconciliation.c'], 290 dependencies: [ 291 talertesting_dep, 292 libtalermerchant_dep, 293 libtalermerchantutil_dep, 294 libtalermerchantdb_dep, 295 libtalermerchanttesting_dep, 296 talerexchange_dep, 297 talerbank_dep, 298 talerfakebank_dep, 299 talerjson_dep, 300 talerutil_dep, 301 json_dep, 302 gcrypt_dep, 303 gnunetutil_dep, 304 gnunetjson_dep, 305 gnunetcurl_dep, 306 ], 307 include_directories: [incdir, configuration_inc], 308 build_by_default: false, 309 install: false, 310 ) 311 test( 312 'test_reconciliation_rsa', 313 test_reconciliation_rsa, 314 workdir: meson.current_build_dir(), 315 suite: ['testing', 'integrationtests'], 316 is_parallel: false, 317 ) 318 319 test_kyc_api = executable( 320 'test_kyc_api', 321 ['test_kyc_api.c'], 322 dependencies: [ 323 talertesting_dep, 324 libtalermerchant_dep, 325 libtalermerchantutil_dep, 326 libtalermerchantdb_dep, 327 libtalermerchanttesting_dep, 328 talerexchange_dep, 329 talerbank_dep, 330 talerfakebank_dep, 331 talerjson_dep, 332 talerutil_dep, 333 json_dep, 334 gcrypt_dep, 335 gnunetutil_dep, 336 gnunetjson_dep, 337 gnunetcurl_dep, 338 ], 339 include_directories: [incdir, configuration_inc], 340 build_by_default: false, 341 install: false, 342 ) 343 test( 344 'test_kyc_api', 345 test_kyc_api, 346 workdir: meson.current_build_dir(), 347 suite: ['testing', 'integrationtests'], 348 is_parallel: false, 349 ) 350 351 352 endif 353 354 EXTRA_DIST = [ 355 'setup.sh', 356 'test_key_rotation.conf', 357 'test_kyc_api.conf', 358 'test_merchant_api.conf', 359 'test_merchant_api-cs.conf', 360 'test_merchant_api-rsa.conf', 361 'test_merchant_api_twisted-cs.conf', 362 'test_merchant_api_twisted-rsa.conf', 363 'test_merchant_api_proxy_merchant.conf', 364 'test_merchant_api_proxy_exchange.conf', 365 'test_merchant.priv', 366 'test_template.conf', 367 ] 368 foreach f : EXTRA_DIST 369 configure_file(input: f, output: f, copy: true) 370 endforeach