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 !46
parents 95034552 861f539e
Pipeline #65610 passed with stage
in 1 minute and 35 seconds
......@@ -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'
artifacts:
when: always
......
......@@ -161,6 +161,7 @@ class MinerCrawlTest (CommonTrackerMinerTest):
self.assertEquals (3, self.tracker.count_instances ("nfo:TextDocument"))
@ut.skip("https://gitlab.gnome.org/GNOME/tracker-miners/issues/56")
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))
@ut.skip("https://gitlab.gnome.org/GNOME/tracker-miners/issues/57")
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: https://gitlab.gnome.org/GNOME/tracker-miners/issues/55")
sys.exit(77)
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: https://gitlab.gnome.org/GNOME/tracker-miners/issues/55")
sys.exit(77)
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):
try:
os.makedirs(_TEST_MONITORED_TMP_DIR)
except OSError as e:
if e.errno == errno.EEXIST:
pass
else:
raise
return tempfile.mkdtemp(dir=_TEST_MONITORED_TMP_DIR)
......
......@@ -6,8 +6,6 @@ set -e
SCRIPT=$1
DBUS_SESSION_BUS_PID=
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
HOME=$TEMP_DIR
eval `dbus-launch --sh-syntax`
trap "/bin/kill $DBUS_SESSION_BUS_PID; exit" INT ERR
echo "Running $@"
$@
kill $DBUS_SESSION_BUS_PID
dbus-run-session $@
rm -R $TEMP_DIR
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