geary/test/meson.build

171 lines
5.5 KiB
Python
Raw Normal View History

subdir('data')
geary_test_engine_sources = [
'test-case.vala',
'test-server.vala',
'test-engine.vala',
# These should be included in the test lib sources, but we can't
# since that would make the test lib depend on geary-engine.vapi,
# and the engine test sute needs to depend
# geary-engine_internal.vapi, which leads to duplicate symbols when
# linking
'engine/api/geary-account-mock.vala',
'engine/api/geary-contact-store-mock.vala',
'engine/api/geary-credentials-mediator-mock.vala',
'engine/api/geary-email-identifier-mock.vala',
'engine/api/geary-email-properties-mock.vala',
'engine/api/geary-folder-mock.vala',
'engine/api/geary-folder-properties-mock.vala',
'engine/common/common-contact-harvester-mock.vala',
'engine/api/geary-account-information-test.vala',
'engine/api/geary-attachment-test.vala',
'engine/api/geary-composed-email-test.vala',
'engine/api/geary-email-test.vala',
'engine/api/geary-engine-test.vala',
'engine/api/geary-folder-path-test.vala',
'engine/api/geary-service-information-test.vala',
'engine/app/app-conversation-test.vala',
'engine/app/app-conversation-monitor-test.vala',
'engine/app/app-conversation-set-test.vala',
2019-06-09 21:56:25 +10:00
'engine/common/common-contact-store-impl-test.vala',
'engine/common/common-contact-harvester-test.vala',
Make database classes more amenable to asynchronous use. This makes both the open() and open_connection() methods on Geary.DB.Database asynchronous, which allows the VersionedDatabase open_background() and its hackery to be removed, and upgrades to be performed asynchronously as well. It also adds a exec_transaction_async() method to Connection, allowing an existing object to also be used to establish an async transaction. * src/engine/db/db-connection.vala (Connection): Add exec_transaction_async method, update doc comments. * src/engine/db/db-database.vala (Database): Make open and open_connection async by executing SQLite code in a background thread, update call sites. Move job management code out of exec_transaction_async into a new internal add_async_job() method so it can be used by Connection. Add unit tests. * src/engine/db/db-transaction-async-job.vala (TransactionAsyncJob): Add an optional internal connection method and make the job's cancellable an internal property so a Connection instance can specify itself for the transaction. * src/engine/db/db-versioned-database.vala (VersionedDatabase): Remove open_background() hack since open() is now async. Make version upgrade hooks for derived classes async and update call sites. Use a Nonblocking.Mutex rather than GLib mutex so upgrade exclusion works asynchronously. Add unit tests. * src/engine/imap-db/imap-db-database.vala (Database): Make database upgrade methods async and execute SQL in async instructions now that the bases classes support it. Add unit tests.
2018-05-08 09:18:06 +09:30
'engine/db/db-database-test.vala',
'engine/db/db-versioned-database-test.vala',
'engine/imap/command/imap-create-command-test.vala',
'engine/imap/command/imap-fetch-command-test.vala',
'engine/imap/message/imap-data-format-test.vala',
'engine/imap/message/imap-mailbox-specifier-test.vala',
'engine/imap/parameter/imap-list-parameter-test.vala',
'engine/imap/response/imap-namespace-response-test.vala',
'engine/imap/transport/imap-client-connection-test.vala',
'engine/imap/transport/imap-client-session-test.vala',
'engine/imap/transport/imap-deserializer-test.vala',
'engine/imap-db/imap-db-account-test.vala',
'engine/imap-db/imap-db-attachment-test.vala',
Make database classes more amenable to asynchronous use. This makes both the open() and open_connection() methods on Geary.DB.Database asynchronous, which allows the VersionedDatabase open_background() and its hackery to be removed, and upgrades to be performed asynchronously as well. It also adds a exec_transaction_async() method to Connection, allowing an existing object to also be used to establish an async transaction. * src/engine/db/db-connection.vala (Connection): Add exec_transaction_async method, update doc comments. * src/engine/db/db-database.vala (Database): Make open and open_connection async by executing SQLite code in a background thread, update call sites. Move job management code out of exec_transaction_async into a new internal add_async_job() method so it can be used by Connection. Add unit tests. * src/engine/db/db-transaction-async-job.vala (TransactionAsyncJob): Add an optional internal connection method and make the job's cancellable an internal property so a Connection instance can specify itself for the transaction. * src/engine/db/db-versioned-database.vala (VersionedDatabase): Remove open_background() hack since open() is now async. Make version upgrade hooks for derived classes async and update call sites. Use a Nonblocking.Mutex rather than GLib mutex so upgrade exclusion works asynchronously. Add unit tests. * src/engine/imap-db/imap-db-database.vala (Database): Make database upgrade methods async and execute SQL in async instructions now that the bases classes support it. Add unit tests.
2018-05-08 09:18:06 +09:30
'engine/imap-db/imap-db-database-test.vala',
'engine/imap-db/imap-db-email-identifier-test.vala',
'engine/imap-db/imap-db-folder-test.vala',
'engine/imap-engine/account-processor-test.vala',
'engine/imap-engine/imap-engine-generic-account-test.vala',
'engine/mime/mime-content-type-test.vala',
'engine/outbox/outbox-email-identifier-test.vala',
'engine/rfc822/rfc822-mailbox-address-test.vala',
'engine/rfc822/rfc822-mailbox-addresses-test.vala',
'engine/rfc822/rfc822-message-test.vala',
'engine/rfc822/rfc822-message-data-test.vala',
'engine/rfc822/rfc822-part-test.vala',
'engine/rfc822/rfc822-utils-test.vala',
'engine/util-ascii-test.vala',
'engine/util-config-file-test.vala',
'engine/util-html-test.vala',
'engine/util-idle-manager-test.vala',
'engine/util-inet-test.vala',
'engine/util-string-test.vala',
'engine/util-timeout-manager-test.vala',
geary_test_engine_resources
]
geary_test_client_sources = [
'test-case.vala',
'test-client.vala',
# These should be included in the test lib sources, but we can't
# since that would make the test lib depend on geary-engine.vapi,
# and the engine test sute needs to depend
# geary-engine_internal.vapi, which leads to duplicate symbols when
# linking
'engine/api/geary-email-identifier-mock.vala',
'engine/api/geary-credentials-mediator-mock.vala',
'client/accounts/accounts-manager-test.vala',
'client/application/application-client-test.vala',
'client/application/application-configuration-test.vala',
'client/components/client-web-view-test.vala',
'client/components/client-web-view-test-case.vala',
'client/components/components-validator-test.vala',
'client/composer/composer-web-view-test.vala',
'client/util/util-avatar-test.vala',
'client/util/util-cache-test.vala',
'client/util/util-email-test.vala',
'client/util/util-js-test.vala',
'js/client-page-state-test.vala',
'js/composer-page-state-test.vala',
'js/conversation-page-state-test.vala',
geary_compiled_schema,
geary_resources
]
geary_test_integration_sources = [
'test-case.vala',
'test-integration.vala',
'integration/imap/client-session.vala',
2019-04-24 17:18:03 +10:00
'integration/smtp/client-session.vala',
]
2019-04-19 13:23:00 +10:00
# Engine tests
geary_test_engine_dependencies = [
geary_engine_internal_dep,
vala_unit_dep,
2019-04-19 13:23:00 +10:00
]
geary_test_engine_dependencies += geary_engine_dependencies
geary_test_engine_vala_args = geary_vala_args
2019-04-19 13:23:00 +10:00
if get_option('tnef-support')
geary_test_engine_dependencies += libytnef
geary_test_engine_vala_args += [
2019-04-19 13:23:00 +10:00
'-D', 'WITH_TNEF_SUPPORT'
]
endif
geary_test_engine_bin = executable('test-engine',
geary_test_engine_sources,
dependencies: geary_test_engine_dependencies,
include_directories: config_h_dir,
vala_args: geary_test_engine_vala_args,
c_args: geary_c_args,
)
2019-04-19 13:23:00 +10:00
# Client tests
geary_test_client_dependencies = [
geary_client_dep,
vala_unit_dep,
2019-04-19 13:23:00 +10:00
]
geary_test_client_dependencies += geary_client_dependencies
geary_test_client_bin = executable('test-client',
geary_test_client_sources,
dependencies: geary_test_client_dependencies,
include_directories: config_h_dir,
vala_args: geary_vala_args,
c_args: geary_c_args,
)
2019-04-19 13:23:00 +10:00
# Integration tests
geary_test_integration_bin = executable('test-integration',
geary_test_integration_sources,
dependencies: [
geary_engine_dep,
gee,
gio,
gmime,
vala_unit_dep,
webkit2gtk,
],
include_directories: config_h_dir,
vala_args: geary_vala_args,
c_args: geary_c_args,
)
test('engine-tests', geary_test_engine_bin)
test('client-tests', geary_test_client_bin)