Commit a52c1654 authored by Sam Thursfield's avatar Sam Thursfield

Merge branch 'sam/test-runner-fix' into 'master'

functional-tests: Fix failed tests being reported as successful

See merge request GNOME/tracker-miners!46
parents 95034552 861f539e
......@@ -27,7 +27,7 @@ test-fedora-latest:
# screenful of junk each time unless we strip these.
unset $(env|grep -o '^CI_[^=]*')
su tracker -c 'cd build; LANG=en_US.UTF8 dbus-launch meson test --suite tracker-miners --print-errorlogs'
su tracker -c 'cd build; dbus-run-session -- env LANG=en_US.UTF8 meson test --suite tracker-miners --print-errorlogs'
when: always
......@@ -161,6 +161,7 @@ class MinerCrawlTest (CommonTrackerMinerTest):
self.assertEquals (3, self.tracker.count_instances ("nfo:TextDocument"))
def test_05_move_from_unmonitored_to_monitored (self):
Move a file from unmonitored to monitored directory
......@@ -63,6 +63,7 @@ class MinerResourceRemovalTest (CommonTrackerMinerTest):
return self.tracker.await_resource_inserted (rdf_class = NFO_DOCUMENT,
url = self.uri(file_name))
def test_01_file_deletion (self):
Ensure every logical resource (nie:InformationElement) contained with
......@@ -22,6 +22,7 @@ Write values in tracker and check the actual values are written
on the files. Note that these tests are highly platform dependant.
import os
import sys
import time
from common.utils.extractor import get_tracker_extract_jsonld_output
......@@ -155,4 +156,7 @@ class WritebackBasicDataTest (CommonTrackerWritebackTest):
# self.__writeback_hasTag_test (self.get_test_filename_png (), "image/png")
if __name__ == "__main__":
print("FIXME: This test is skipped as it currently fails. See:")
ut.main (failfast=True)
......@@ -22,6 +22,7 @@ from common.utils.extractor import get_tracker_extract_jsonld_output
from common.utils.helpers import log
import unittest as ut
import os
import sys
import time
REASONABLE_TIMEOUT = 5 # Seconds we wait for tracker-writeback to do the work
......@@ -105,4 +106,7 @@ class WritebackKeepDateTest (CommonTrackerWritebackTest):
if __name__ == "__main__":
print("FIXME: This test is skipped as it currently fails. See:")
ut.main ()
......@@ -111,8 +111,13 @@ if _TEST_MONITORED_TMP_DIR.startswith('/tmp'):
def create_monitored_test_dir():
'''Returns a unique tmpdir which supports filesystem monitor events.'''
if not os.path.exists(_TEST_MONITORED_TMP_DIR):
except OSError as e:
if e.errno == errno.EEXIST:
return tempfile.mkdtemp(dir=_TEST_MONITORED_TMP_DIR)
......@@ -6,8 +6,6 @@ set -e
export TEMP_DIR=`mktemp --tmpdir -d tracker-test-XXXX`
# We need to use the actual home directory for some tests because
......@@ -18,13 +16,6 @@ export REAL_HOME=`echo ~`
# in the filesystem
eval `dbus-launch --sh-syntax`
trap "/bin/kill $DBUS_SESSION_BUS_PID; exit" INT ERR
echo "Running $@"
dbus-run-session $@
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment