summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam Thursfield <sam@afuera.me.uk>2019-09-14 13:15:42 +0000
committerSam Thursfield <sam@afuera.me.uk>2019-09-14 13:15:42 +0000
commitfd5c2933869e091524ee847aca2905962245e3d5 (patch)
treef08ecbb1563a8e0a0909a6f528992a1758b92377
parent8f9645c8052124891d44262afa690012b7089d95 (diff)
parent802caa34f2805b896cb2eb7e51399d221769d3ca (diff)
downloadtracker-fd5c2933869e091524ee847aca2905962245e3d5.tar.gz
Merge branch 'sam/test-fixes' into 'master'
functional-tests: Two small fixes See merge request GNOME/tracker!135
-rw-r--r--.gitlab-ci.yml2
-rw-r--r--tests/functional-tests/17-ontology-changes.py1
-rw-r--r--tests/functional-tests/ipc/meson.build2
-rw-r--r--tests/functional-tests/ipc/test-insert-or-replace.vala4
-rw-r--r--utils/trackertestutils/__main__.py6
5 files changed, 12 insertions, 3 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 29a459acd..f659c6fd9 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -28,6 +28,8 @@ test-fedora-latest:
after_script:
- |
+ python3 -c 'import multiprocessing; print(f"Meson probably started {multiprocessing.cpu_count()} tests in parallel.")'
+ - |
echo "Test suite settings:"
echo
echo " TRACKER_VERBOSITY: ${TRACKER_VERBOSITY}"
diff --git a/tests/functional-tests/17-ontology-changes.py b/tests/functional-tests/17-ontology-changes.py
index e2cb132f1..defa1e431 100644
--- a/tests/functional-tests/17-ontology-changes.py
+++ b/tests/functional-tests/17-ontology-changes.py
@@ -76,6 +76,7 @@ class OntologyChangeTestTemplate (ut.TestCase):
self.__assert_ontology_dates(self.FIRST_ONTOLOGY_DIR, self.SECOND_ONTOLOGY_DIR)
extra_env = cfg.test_environment(self.tmpdir)
+ extra_env['LANG'] = 'en_GB.utf8'
extra_env['LC_COLLATE'] = 'en_GB.utf8'
extra_env['TRACKER_DB_ONTOLOGIES_DIR'] = self.get_ontology_dir(self.FIRST_ONTOLOGY_DIR)
diff --git a/tests/functional-tests/ipc/meson.build b/tests/functional-tests/ipc/meson.build
index a0548b1c9..f07d08bfe 100644
--- a/tests/functional-tests/ipc/meson.build
+++ b/tests/functional-tests/ipc/meson.build
@@ -7,6 +7,8 @@ sandbox_args = ['-m', 'trackertestutils', '--dbus-config', test_dbus_config, '--
sandbox_env = environment()
+test_env.set('GSETTINGS_SCHEMA_DIR', tracker_uninstalled_gsettings_schema_dir)
+test_env.set('LANG', 'en_GB.utf-8')
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)
diff --git a/tests/functional-tests/ipc/test-insert-or-replace.vala b/tests/functional-tests/ipc/test-insert-or-replace.vala
index ce64eecbe..78ba81c58 100644
--- a/tests/functional-tests/ipc/test-insert-or-replace.vala
+++ b/tests/functional-tests/ipc/test-insert-or-replace.vala
@@ -148,9 +148,9 @@ int main (string[] args) {
print ("ORIGINAL : %u contacts: %f\n", y, timer.elapsed());
}
+ return 0;
} catch (GLib.Error e) {
critical ("%s", e.message);
+ return 1;
}
-
- return 0;
}
diff --git a/utils/trackertestutils/__main__.py b/utils/trackertestutils/__main__.py
index 859a82545..b67b23d12 100644
--- a/utils/trackertestutils/__main__.py
+++ b/utils/trackertestutils/__main__.py
@@ -432,11 +432,15 @@ def main():
try:
if args.command:
command = [shell, '-c', ' '.join(shlex.quote(c) for c in args.command)]
+
log.debug("Running: %s", command)
- subprocess.run(command)
+ result = subprocess.run(command)
if len(miner_watches) > 0:
wait_for_miners(miner_watches)
+
+ log.debug("Process finished with returncode %i", result.returncode)
+ sys.exit(result.returncode)
else:
if args.dbus_config:
print(f"Using Tracker daemons from build tree with D-Bus config {args.dbus_config}")