[tracker/sam/tracker-3.0-functional-tests: 1/4] tests: Remove the test tracker-store service file



commit 3e020b7e65961c7151812468726ee9c788ff57ba
Author: Sam Thursfield <sam afuera me uk>
Date:   Fri Jan 24 22:03:06 2020 +0100

    tests: Remove the test tracker-store service file
    
    This isn't needed since tracker-store is no longer a separate daemon.
    Some tests still connect to the session bus but they should no longer
    autostart any services. Callers should use `dbus-run-session` to
    create a separate session bus if worried about having test processes
    talking on the real session bus.

 tests/libtracker-data/meson.build                  |  2 --
 tests/libtracker-fts/meson.build                   |  1 -
 tests/libtracker-sparql/meson.build                |  2 --
 tests/meson.build                                  | 33 ++++------------------
 tests/services/meson.build                         |  6 ----
 tests/services/org.freedesktop.Tracker1.service.in |  4 ---
 tests/test-bus.conf.in                             | 26 -----------------
 7 files changed, 5 insertions(+), 69 deletions(-)
---
diff --git a/tests/libtracker-data/meson.build b/tests/libtracker-data/meson.build
index e531c1f73..18791433e 100644
--- a/tests/libtracker-data/meson.build
+++ b/tests/libtracker-data/meson.build
@@ -28,7 +28,6 @@ foreach base_name: libtracker_data_tests
       'name': base_name,
       'exe': binary,
       'suite': ['data'],
-      'requires_dbus': true,
     }
 endforeach
 
@@ -44,7 +43,6 @@ foreach base_name: libtracker_data_slow_tests
         'name': base_name,
         'exe': binary,
         'suite': ['data', 'slow'],
-        'requires_dbus': true,
         'timeout': 280
     }
 endforeach
diff --git a/tests/libtracker-fts/meson.build b/tests/libtracker-fts/meson.build
index 536a227a7..4682b1a4c 100644
--- a/tests/libtracker-fts/meson.build
+++ b/tests/libtracker-fts/meson.build
@@ -8,5 +8,4 @@ tests += {
   'name': 'fts',
   'exe': fts_test,
   'suite': ['fts'],
-  'requires_dbus': true,
 }
diff --git a/tests/libtracker-sparql/meson.build b/tests/libtracker-sparql/meson.build
index 143f18c85..071ed688c 100644
--- a/tests/libtracker-sparql/meson.build
+++ b/tests/libtracker-sparql/meson.build
@@ -29,7 +29,6 @@ tests += {
   'exe': tracker_sparql_test,
   'suite': ['sparql'],
   'is_parallel': false,
-  'requires_dbus': true,
 }
 
 tracker_fd_test = executable('tracker-fd-test',
@@ -41,5 +40,4 @@ tests += {
   'name': 'fd',
   'exe': tracker_fd_test,
   'suite': ['sparql'],
-  'requires_dbus': true,
 }
diff --git a/tests/meson.build b/tests/meson.build
index 33f6e6987..d23b1296f 100644
--- a/tests/meson.build
+++ b/tests/meson.build
@@ -16,13 +16,6 @@ if get_option('functional_tests')
   subdir('functional-tests')
 endif
 
-subdir('services')
-
-test_bus_conf_file = configure_file(
-  input: 'test-bus.conf.in',
-  output: 'test-bus.conf',
-  configuration: conf)
-
 foreach t: tests
   test_name = t.get('name')
   test_exe = t.get('exe')
@@ -33,11 +26,6 @@ foreach t: tests
   # generally indicates a bug or design flaw in that test.
   test_is_parallel = t.get('is_parallel', true)
 
-  # This flag marks unit tests which need to contact a D-Bus session bus. This
-  # is a sign of a bad unit test -- anything which uses D-Bus belongs in the
-  # functional-tests directory.
-  test_requires_dbus = t.get('requires_dbus', false)
-
   test_env = environment()
   test_env.set('GSETTINGS_SCHEMA_DIR', join_paths(build_root, 'data'))
   test_env.set('TRACKER_LANGUAGE_STOP_WORDS_DIR', join_paths(source_root, 'src', 'libtracker-common', 
'stop-words'))
@@ -45,20 +33,9 @@ foreach t: tests
   test_env.set('TRACKER_DB_ONTOLOGIES_DIR', join_paths(source_root, 'src', 'ontologies', 'nepomuk'))
   test_env.set('LANG', 'en_US.UTF8')
 
-  if test_requires_dbus
-    test(test_name, dbus_run_session,
-      env: test_env,
-      args: ['--config-file=@0@'.format(join_paths(meson.current_build_dir(), 'test-bus.conf')),
-             '--',
-             test_exe],
-      suite: test_suite,
-      timeout: test_timeout,
-      is_parallel: test_is_parallel)
-  else
-    test(test_name, test_exe,
-      env: test_env,
-      timeout: test_timeout,
-      suite: test_suite,
-      is_parallel: test_is_parallel)
-  endif
+  test(test_name, test_exe,
+    env: test_env,
+    timeout: test_timeout,
+    suite: test_suite,
+    is_parallel: test_is_parallel)
 endforeach


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