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



commit 4d2e9391087b9af7bf1c434b06b48feba4a0d9c8
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.

 .gitlab-ci.yml                                     |  3 +-
 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 -----------------
 8 files changed, 6 insertions(+), 71 deletions(-)
---
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 52ce4b6b4..25f4f0317 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -26,8 +26,7 @@ stages:
       # whole environment for every failed test, and that gives a whole
       # screenful of junk each time unless we strip these.
       unset $(env|grep -o '^CI_[^=]*')
-
-      su tracker -c 'cd build; env LANG=C.UTF-8 LC_ALL=C.UTF-8 eatmydata meson test --print-errorlogs 
${MESON_TEST_EXTRA_ARGS}'
+      su tracker -c 'cd build; env LANG=C.UTF-8 LC_ALL=C.UTF-8 dbus-run-session eatmydata meson test 
--print-errorlogs ${MESON_TEST_EXTRA_ARGS}'
 
   after_script:
     - |
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 63740eee6..993c99891 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,31 +26,15 @@ 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('TRACKER_LANGUAGE_STOP_WORDS_DIR', join_paths(source_root, 'src', 'libtracker-common', 
'stop-words'))
   test_env.set('TRACKER_TEST_DOMAIN_ONTOLOGY_RULE', join_paths(source_root, 'src', 'tracker-store', 
'default.rule'))
   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]