[tracker/sam/functional-tests-quiet: 4/11] functional-tests: Run the IPC tests through tracker-sandbox



commit 5a7ce56411cf0e6c7739e5e1847a9d656b98f632
Author: Sam Thursfield <sam afuera me uk>
Date:   Sat Aug 31 04:30:03 2019 +0300

    functional-tests: Run the IPC tests through tracker-sandbox
    
    We can't use trackertestutils directly in these tests, because they are
    not written in Python. Now we use tracker-sandbox and a few environment
    variables set in meson.build to achieve the same thing.

 tests/functional-tests/ipc/meson.build | 18 ++++++++++++++----
 tests/functional-tests/meson.build     |  7 ++++---
 2 files changed, 18 insertions(+), 7 deletions(-)
---
diff --git a/tests/functional-tests/ipc/meson.build b/tests/functional-tests/ipc/meson.build
index 8ee7175fe..1c558c514 100644
--- a/tests/functional-tests/ipc/meson.build
+++ b/tests/functional-tests/ipc/meson.build
@@ -3,10 +3,21 @@ functional_ipc_test_c_args = [
   '-DTEST_ONTOLOGIES_DIR="@0@"'.format(tracker_uninstalled_nepomuk_ontologies_dir),
 ]
 
+tracker_sandbox = find_program(join_paths(source_root, 'utils', 'sandbox', 'tracker-sandbox.py'))
+sandbox_args = ['--dbus-config', test_dbus_config, '--debug-sandbox', '--index-tmpdir', '--']
+
+sandbox_env = environment()
+
+test_env.prepend('PYTHONPATH', tracker_uninstalled_testutils_dir)
+test_env.set('TRACKER_DB_ONTOLOGIES_DIR', tracker_uninstalled_nepomuk_ontologies_dir)
+test_env.set('TRACKER_LANGUAGE_STOP_WORDS_DIR', tracker_uninstalled_stop_words_dir)
+test_env.set('TRACKER_TEST_DOMAIN_ONTOLOGY_RULE', tracker_uninstalled_domain_rule)
+
 insert_or_replace_test = executable('test-insert-or-replace',
   'test-insert-or-replace.vala', tracker_sparql_vapi,
   dependencies: [tracker_common_dep, tracker_sparql_dep])
-test('functional-ipc-insert-or-replace', insert_or_replace_test,
+test('functional-ipc-insert-or-replace', tracker_sandbox,
+  args: sandbox_args + [insert_or_replace_test],
   env: test_env)
 
 bus_query_cancellation_test = executable('test-bus-query-cancellation',
@@ -14,7 +25,6 @@ bus_query_cancellation_test = executable('test-bus-query-cancellation',
   c_args: functional_ipc_test_c_args,
   dependencies: [tracker_common_dep, tracker_sparql_dep])
 
-test('functional-ipc-bus-query-cancellation',
-  test_runner,
-  args: bus_query_cancellation_test,
+test('functional-ipc-bus-query-cancellation', tracker_sandbox,
+  args: sandbox_args + [bus_query_cancellation_test],
   env: test_env)
diff --git a/tests/functional-tests/meson.build b/tests/functional-tests/meson.build
index 62719eb4a..43b5fe1e0 100644
--- a/tests/functional-tests/meson.build
+++ b/tests/functional-tests/meson.build
@@ -6,8 +6,10 @@ testconf = configuration_data()
 config_json_full_path = join_paths(meson.current_build_dir(), 'configuration.json')
 dconf_profile_full_path = join_paths(meson.current_source_dir(), 'trackertest')
 
+test_dbus_config = join_paths(build_root, 'tests', 'test-bus.conf')
+
 testconf.set10('DISABLE_JOURNAL', not get_option('journal'))
-testconf.set('TEST_DBUS_DAEMON_CONFIG_FILE', join_paths(build_root, 'tests', 'test-bus.conf'))
+testconf.set('TEST_DBUS_DAEMON_CONFIG_FILE', test_dbus_config)
 testconf.set('TEST_DCONF_PROFILE', dconf_profile_full_path)
 testconf.set('TEST_DOMAIN_ONTOLOGY_RULE', tracker_uninstalled_domain_rule)
 testconf.set('TEST_GSETTINGS_SCHEMA_DIR', tracker_uninstalled_gsettings_schema_dir)
@@ -52,5 +54,4 @@ foreach t: functional_tests
     timeout: 60)
 endforeach
 
-# FIXME
-#subdir('ipc')
+subdir('ipc')


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]