libpurple/tests/meson.build

Sat, 01 Oct 2022 01:50:52 -0500

author
Gary Kramlich <grim@reaperworld.com>
date
Sat, 01 Oct 2022 01:50:52 -0500
changeset 41771
c5877e2c93f2
parent 41754
abf413211063
child 41804
36c3c3cd2402
permissions
-rw-r--r--

Create and add PurpleContacts to the manager when purple_buddy_new is called

This required some additional changes to PurpleContact. Namely that the contact always has a presence and it is no longer writeable.

Testing Done:
Ran the unit tests and verified nothing funky happens when running.

We can't test that all of the properties are properly bound because we would have to start up a lot more of libpurple than I'm willing to do for something that's temporary.

Bugs closed: PIDGIN-17685

Reviewed at https://reviews.imfreedom.org/r/1873/

PROGS = [
    'account_option',
    'account_manager',
    'authorization_request',
    'circular_buffer',
    'contact',
    'contact_manager',
    'credential_provider',
    'history_adapter',
    'history_manager',
    'image',
    'keyvaluepair',
    'markup',
    'menu',
    'notification',
    'notification_manager',
    'person',
    'protocol_action',
    'protocol_xfer',
    'purplepath',
    'queued_output_stream',
    'tags',
    'util',
    'whiteboard_manager',
    'xmlnode',
]

test_ui = static_library(
    'test-ui',
    'test_ui.c',
    'test_ui.h',
    c_args: [
        '-DTEST_DATA_DIR="@0@/data"'.format(meson.current_source_dir()),
        '-DG_LOG_USE_STRUCTURED',
        '-DG_LOG_DOMAIN="Purple-TestUI"',
    ],
    dependencies: [libpurple_dep, glib]
)

testenv.set('XDG_CONFIG_HOME', meson.current_build_dir() / 'config')

foreach prog : PROGS
    e = executable('test_' + prog, 'test_@0@.c'.format(prog),
                   c_args : [
                       '-DTEST_DATA_DIR="@0@/data"'.format(meson.current_source_dir())
                   ],
                   dependencies : [libpurple_dep, glib],
                   link_with: test_ui,
    )
    test(prog, e,
        env: testenv,
    )
endforeach

e = executable('test_credential_manager', 'test_credential_manager.c',
               c_args : [
                   '-DTEST_DATA_DIR="@0@/data"'.format(meson.current_source_dir())
               ],
               dependencies : [libpurple_dep, glib],
               link_with: test_ui,
)
test('credential_manager', e, env: testenv, is_parallel : false)

mercurial