summaryrefslogtreecommitdiff
path: root/tests/functional-tests/meson.build
diff options
context:
space:
mode:
Diffstat (limited to 'tests/functional-tests/meson.build')
-rw-r--r--tests/functional-tests/meson.build37
1 files changed, 20 insertions, 17 deletions
diff --git a/tests/functional-tests/meson.build b/tests/functional-tests/meson.build
index be3fc2a4a..8bc70c446 100644
--- a/tests/functional-tests/meson.build
+++ b/tests/functional-tests/meson.build
@@ -1,13 +1,24 @@
-test_runner = configure_file(
- input: 'test-runner.sh.in',
- output: 'test-runner.sh',
- configuration: conf)
-test_runner = find_program(test_runner)
+python = find_program('python3')
+
+# Configure functional tests to run completely from source tree.
+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.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)
+testconf.set('TEST_ONTOLOGIES_DIR', tracker_uninstalled_nepomuk_ontologies_dir)
+testconf.set('TEST_LANGUAGE_STOP_WORDS_DIR', tracker_uninstalled_stop_words_dir)
config_json = configure_file(
input: 'configuration.json.in',
output: 'configuration.json',
- configuration: conf
+ configuration: testconf
)
functional_tests = [
@@ -26,25 +37,17 @@ functional_tests = [
'17-ontology-changes',
]
-config_json_full_path = join_paths(meson.current_build_dir(), 'configuration.json')
-dconf_profile_full_path = join_paths(meson.current_source_dir(), 'trackertest')
-
test_env = environment()
-test_env.set('DCONF_PROFILE', dconf_profile_full_path)
-test_env.set('GSETTINGS_SCHEMA_DIR', tracker_uninstalled_gsettings_schema_dir)
tracker_uninstalled_testutils_dir = join_paths(meson.current_source_dir(), '..', '..', 'utils')
test_env.prepend('PYTHONPATH', tracker_uninstalled_testutils_dir)
-test_env.set('TRACKER_DB_ONTOLOGIES_DIR', tracker_uninstalled_nepomuk_ontologies_dir)
-test_env.set('TRACKER_FUNCTIONAL_TEST_BUILD_DIR', build_root)
test_env.set('TRACKER_FUNCTIONAL_TEST_CONFIG', config_json_full_path)
-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)
foreach t: functional_tests
- test('functional-' + t, test_runner,
- args: './' + t + '.py',
+ file = '@0@.py'.format(t)
+ test('functional-' + t, python,
+ args: [file],
env: test_env,
workdir: meson.current_source_dir(),
timeout: 60)