merchant

Merchant backend to process payments, run by merchants
Log | Files | Refs | Submodules | README | LICENSE

meson.build (11732B)


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