[tracker-miners/sam/fix-run-uninstalled: 2/2] build: Fix run-installed when -Dfunctional_tests=false




commit 03b89d0692bcdc279c6712552c8452a93e6630a4
Author: Sam Thursfield <sam afuera me uk>
Date:   Mon Aug 16 14:23:58 2021 +0200

    build: Fix run-installed when -Dfunctional_tests=false
    
    We should remove the functional_tests= config option, but not in a stable series.
    In the meantime, rearrange test-domain.rule generation so it can be used even
    when functional tests are disabled.

 meson.build                                      | 2 +-
 run-uninstalled.in                               | 2 +-
 tests/functional-tests/meson.build               | 8 +-------
 tests/meson.build                                | 8 ++++++++
 tests/{functional-tests => }/test-domain.rule.in | 0
 5 files changed, 11 insertions(+), 9 deletions(-)
---
diff --git a/meson.build b/meson.build
index e9b40db5f..dc616ed71 100644
--- a/meson.build
+++ b/meson.build
@@ -462,7 +462,7 @@ run_uninstalled_conf = configuration_data()
 run_uninstalled_conf.set('tracker_sparql_uninstalled_dir', tracker_sparql_uninstalled_dir)
 run_uninstalled_conf.set('tracker_uninstalled_cli_dir', tracker_uninstalled_cli_dir)
 run_uninstalled_conf.set('tracker_uninstalled_cli_subcommands_dir', tracker_uninstalled_cli_subcommands_dir)
-run_uninstalled_conf.set('tracker_uninstalled_domain_rule', meson.current_build_dir() / 'tests' / 
'functional-tests' / 'test-domain.rule')
+run_uninstalled_conf.set('tracker_uninstalled_domain_rule', meson.current_build_dir() / 'tests' / 
'test-domain.rule')
 run_uninstalled_conf.set('tracker_uninstalled_extract_rules_dir', tracker_uninstalled_extract_rules_dir)
 run_uninstalled_conf.set('tracker_uninstalled_extractors_dir', meson.current_build_dir() / 'src' / 
'tracker-extract')
 run_uninstalled_conf.set('tracker_uninstalled_miner_services_dir', tracker_uninstalled_miner_services_dir)
diff --git a/run-uninstalled.in b/run-uninstalled.in
index 8d2bcf51f..51e5e0217 100755
--- a/run-uninstalled.in
+++ b/run-uninstalled.in
@@ -30,7 +30,7 @@ tracker_sparql_dir = "@tracker_sparql_uninstalled_dir@"
 testutils_dir = "@tracker_uninstalled_testutils_dir@"
 
 build_directory = pathlib.Path(__file__).parent
-dbus_config = build_directory.joinpath('tests/test-bus.conf')
+dbus_config = build_directory.joinpath('tests/test-session-bus.conf')
 
 env = os.environ
 
diff --git a/tests/functional-tests/meson.build b/tests/functional-tests/meson.build
index 9ed3be7b5..cd9ae5ee8 100644
--- a/tests/functional-tests/meson.build
+++ b/tests/functional-tests/meson.build
@@ -11,7 +11,7 @@ testconf.set('TEST_CLI_DIR', tracker_uninstalled_cli_dir)
 testconf.set('TEST_CLI_SUBCOMMANDS_DIR', tracker_uninstalled_cli_subcommands_dir)
 testconf.set('TEST_DBUS_DAEMON_CONFIG_FILE', build_root / 'tests' / 'test-bus.conf')
 testconf.set('TEST_DCONF_PROFILE', dconf_profile_full_path)
-testconf.set('TEST_DOMAIN_ONTOLOGY_RULE', meson.current_build_dir() / 'test-domain.rule')
+testconf.set('TEST_DOMAIN_ONTOLOGY_RULE', meson.current_build_dir() / '..' / 'test-domain.rule')
 testconf.set('TEST_EXTRACTOR_RULES_DIR', tracker_uninstalled_extract_rules_dir)
 testconf.set('TEST_EXTRACTORS_DIR', tracker_extractors_dir)
 testconf.set('TEST_GSETTINGS_SCHEMA_DIR', tracker_miners_uninstalled_gsettings_schema_dir)
@@ -21,12 +21,6 @@ testconf.set('TEST_WRITEBACK_MODULES_DIR', tracker_uninstalled_writeback_modules
 testconf.set('TEST_TAP_ENABLED', get_option('tests_tap_protocol').to_string())
 testconf.set('TRACKER_EXTRACT_PATH', uninstalled_tracker_extract_path)
 
-test_domain_rule = configure_file(
-  input: 'test-domain.rule.in',
-  output: 'test-domain.rule',
-  configuration: testconf
-)
-
 config_json = configure_file(
   input: 'configuration.json.in',
   output: 'configuration.json',
diff --git a/tests/meson.build b/tests/meson.build
index b559274ca..8d3fa2041 100644
--- a/tests/meson.build
+++ b/tests/meson.build
@@ -14,6 +14,14 @@ test_bus_conf_file = configure_file(
   output: 'test-bus.conf',
   configuration: conf)
 
+testdomainconf = configuration_data()
+testdomainconf.set('TEST_ONTOLOGIES_DIR', tracker_uninstalled_nepomuk_ontologies_dir)
+test_domain_rule = configure_file(
+  input: 'test-domain.rule.in',
+  output: 'test-domain.rule',
+  configuration: testdomainconf
+)
+
 if get_option('functional_tests')
   subdir('functional-tests')
 endif
diff --git a/tests/functional-tests/test-domain.rule.in b/tests/test-domain.rule.in
similarity index 100%
rename from tests/functional-tests/test-domain.rule.in
rename to tests/test-domain.rule.in


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