[tracker/sam/tracker-2.3-developer-experience: 8/45] functional-tests: Run the IPC tests through tracker-sandbox
- From: Sam Thursfield <sthursfield src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/sam/tracker-2.3-developer-experience: 8/45] functional-tests: Run the IPC tests through tracker-sandbox
- Date: Wed, 2 Oct 2019 11:54:17 +0000 (UTC)
commit fa2eb5769a6c67ecada17db8a2095b0456ab0246
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 21813e410..8bc70c446 100644
--- a/tests/functional-tests/meson.build
+++ b/tests/functional-tests/meson.build
@@ -6,7 +6,9 @@ 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')
-testconf.set('TEST_DBUS_DAEMON_CONFIG_FILE', join_paths(build_root, 'tests', 'test-bus.conf'))
+test_dbus_config = 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)
@@ -51,5 +53,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]