diff options
author | Sam Thursfield <sam@afuera.me.uk> | 2017-06-08 17:03:41 +0100 |
---|---|---|
committer | Sam Thursfield <sam@afuera.me.uk> | 2017-06-08 17:44:19 +0100 |
commit | 809b56767fccd5680136485c6fbbc895e83dd886 (patch) | |
tree | e60c05396c0f343ec19ba17e55599b74dfa4e1b2 /tests | |
parent | 5b997a905f5d514e214080a9df4f158870444609 (diff) | |
download | tracker-809b56767fccd5680136485c6fbbc895e83dd886.tar.gz |
Remove Maemo/Meego leftovers
This removes various code paths that we believe to be unused.
* The userguides miner has been removed altogether.
* The application miner no longer parses MeeGo-style .desktop files
* The TRACKER_DISABLE_MEEGOTOUCH_LOCALE environment flag is gone
(it already did nothing)
* Character set detection with libmeegotouch is removed, only enca
or libicu are supported
* Meego-specific flags are gone from .desktop files
* Functional tests have lost their vestigal Scratchbox and Aegis support
There are 5 ontologies referencing Maemo, 4 of which are largely unused.
These have been kept around in case anyone is using them outside
Tracker.
https://bugzilla.gnome.org/show_bug.cgi?id=783555
Diffstat (limited to 'tests')
22 files changed, 8 insertions, 274 deletions
diff --git a/tests/functional-tests/400-extractor-metadata.py b/tests/functional-tests/400-extractor-metadata.py index 140b5d527..fc1604eb2 100755 --- a/tests/functional-tests/400-extractor-metadata.py +++ b/tests/functional-tests/400-extractor-metadata.py @@ -137,10 +137,6 @@ class ExtractionTestCase (ut.TestCase): def __assert_extraction_ok (self, result): self.__check_section ("Metadata", result) - if (cfg.haveMaemo and self.configParser.has_section ("Meego")): - self.__check_section ("Meego", result) - - def __check_section (self, section, result): error_missing_prop = "Property '%s' hasn't been extracted from file \n'%s'\n (requested on '%s' [%s])" error_wrong_value = "on property '%s' from file %s\n (requested on: '%s' [%s])" diff --git a/tests/functional-tests/Makefile.am b/tests/functional-tests/Makefile.am index 8dd84552f..c3dd296c7 100644 --- a/tests/functional-tests/Makefile.am +++ b/tests/functional-tests/Makefile.am @@ -18,12 +18,6 @@ config_SCRIPTS = \ $(slow_tests) \ $(standard_tests) -if HAVE_MAEMO -config_SCRIPTS += \ - tests.xml \ - tracker-tests.aegis -endif - standard_tests = \ 01-insertion.py \ 02-sparql-bugs.py @@ -61,18 +55,6 @@ slow_tests = \ 12-transactions.py \ 13-threaded-store.py -tests.xml: - @if test -h /targets/links/scratchbox.config ; then \ - export SBOX_REDIRECT_IGNORE=/usr/bin/python ; \ - fi; - $(top_srcdir)/tests/functional-tests/create-tests-xml.py $(standard_tests) > tests.xml - -tracker-tests.aegis: - @if test -h /targets/links/scratchbox.config ; then \ - export SBOX_REDIRECT_IGNORE=/usr/bin/python ; \ - fi; - $(top_srcdir)/tests/functional-tests/create-tests-aegis.py $(standard_tests) > tracker-tests.aegis - 10-sqlite-misused.py: ttl/gen-test-data.stamp 11-sqlite-misused-batch.py: ttl/gen-test-data.stamp 13-busy-store.py: ttl/gen-test-data.stamp @@ -95,12 +77,5 @@ functional-test-slow: ${slow_tests} EXTRA_DIST = \ $(config_SCRIPTS) \ $(config_DATA) \ - create-tests-xml.py \ test-runner.sh \ meson.build - -if HAVE_MAEMO -CLEANFILES = \ - tests.xml \ - tracker-tests.aegis -endif diff --git a/tests/functional-tests/common/utils/configuration.py.in b/tests/functional-tests/common/utils/configuration.py.in index af7bf8cd9..2ccaecebf 100644 --- a/tests/functional-tests/common/utils/configuration.py.in +++ b/tests/functional-tests/common/utils/configuration.py.in @@ -78,8 +78,7 @@ RAW_BINDIR = "@bindir@" EXEC_PREFIX = os.path.normpath (expandvars (RAW_EXEC_DIR)) DATADIR = os.path.normpath (expandvars (RAW_DATA_DIR)) BINDIR = os.path.normpath (expandvars (RAW_BINDIR)) - -haveMaemo = ("@HAVE_MAEMO_TRUE@" == "") + haveUpstart = ("@HAVE_UPSTART_TRUE@" == "") disableJournal = ("@DISABLE_JOURNAL_TRUE@" == "") diff --git a/tests/functional-tests/common/utils/system.py b/tests/functional-tests/common/utils/system.py index 093b468ec..177f551e9 100644 --- a/tests/functional-tests/common/utils/system.py +++ b/tests/functional-tests/common/utils/system.py @@ -19,8 +19,7 @@ import helpers TEST_ENV_DIRS = { "XDG_DATA_HOME" : os.path.join (cfg.TEST_TMP_DIR, "data"), "XDG_CACHE_HOME": os.path.join (cfg.TEST_TMP_DIR, "cache")} -TEST_ENV_VARS = { "TRACKER_DISABLE_MEEGOTOUCH_LOCALE": "", - "LC_COLLATE": "en_GB.utf8", +TEST_ENV_VARS = { "LC_COLLATE": "en_GB.utf8", "DCONF_PROFILE": os.path.join (cfg.DATADIR, "tracker-tests", "trackertest") } diff --git a/tests/functional-tests/create-tests-aegis.py b/tests/functional-tests/create-tests-aegis.py deleted file mode 100755 index 57a5e5e58..000000000 --- a/tests/functional-tests/create-tests-aegis.py +++ /dev/null @@ -1,63 +0,0 @@ -#!/usr/bin/python -import os -import sys -import inspect -import imp - -from common.utils import configuration as cfg - -### This function comes from pydoc. Cool! -def importfile(path): - """Import a Python source file or compiled file given its path.""" - magic = imp.get_magic() - file = open(path, 'r') - if file.read(len(magic)) == magic: - kind = imp.PY_COMPILED - else: - kind = imp.PY_SOURCE - file.close() - filename = os.path.basename(path) - name, ext = os.path.splitext(filename) - file = open(path, 'r') - module = None - try: - module = imp.load_module(name, file, path, (ext, 'r', kind)) - except Exception, e: - print >> sys.stderr, "Ignoring %s (%s)" % (path, e) - #raise Exception () - file.close() - return module - - -HEADER = """ -<aegis>""" - -FOOTER = """ -</aegis>""" - -def print_aegis_perm_request (filename): - module = importfile (filename) - if not module: - return - - install_path = os.path.join (cfg.DATADIR, "tracker-tests", filename) - - print "\n <request>" - print ' <credential name="TrackerReadAccess" />' - print ' <credential name="TrackerWriteAccess" />' - print ' <credential name="tracker::tracker-extract-access" />' - print ' <credential name="tracker::tracker-miner-fs-access" />' - print ' <credential name="GRP::metadata-users" />' - print ' <credential name="UID::user" />' - print ' <credential name="GID::users" />' - print ' <for path="%s" />' % (install_path) - print " </request>" - -if __name__ == "__main__": - - if (len (sys.argv) < 2): - print >> sys.stderr, "pass .py tests as parameter" - sys.exit (-1) - print HEADER - map (print_aegis_perm_request, sys.argv[1:]) - print FOOTER diff --git a/tests/functional-tests/create-tests-xml.py b/tests/functional-tests/create-tests-xml.py deleted file mode 100755 index 5bbca2a53..000000000 --- a/tests/functional-tests/create-tests-xml.py +++ /dev/null @@ -1,109 +0,0 @@ -#!/usr/bin/python -import os -import sys -import inspect -import imp - -from common.utils import configuration as cfg - -### This function comes from pydoc. Cool! -def importfile(path): - """Import a Python source file or compiled file given its path.""" - magic = imp.get_magic() - file = open(path, 'r') - if file.read(len(magic)) == magic: - kind = imp.PY_COMPILED - else: - kind = imp.PY_SOURCE - file.close() - filename = os.path.basename(path) - name, ext = os.path.splitext(filename) - file = open(path, 'r') - module = None - try: - module = imp.load_module(name, file, path, (ext, 'r', kind)) - except Exception, e: - print >> sys.stderr, "Ignoring %s (%s)" % (path, e) - #raise Exception () - file.close() - return module - - -HEADER = """ -<testdefinition version="0.1"> - <suite name="tracker"> - <description>Functional tests for the brilliant tracker</description> """ - -TEST_CASE_TMPL = """ <case name="%s" timeout="180"> - <description>%s</description> - <step>%s</step> - </case>""" - -FOOTER = """ - </suite> -</testdefinition>""" - -if (cfg.haveUpstart): - PRE_STEPS = """ <pre_steps> - <step>initctl stop xsession/tracker-writeback</step> - <step>initctl stop xsession/tracker-miner</step> - <step>initctl start xsession/tracker-stop</step> - </pre_steps> - """ -else: - PRE_STEPS = """ <pre_steps> - <step>while tracker daemon -p |grep -q '^Found process ID '; do tracker daemon -t; sleep 1; done</step> - </pre_steps> - """ - -def __get_doc (obj): - if obj.__doc__: - return obj.__doc__.strip () - else: - return "FIXME description here" - -def print_as_xml (filename): - - module = importfile (filename) - if not module: - return - - print "\n <set name=\"%s\">" % (module.__name__) - print " <description>%s</description>" % (__get_doc (module)) - print PRE_STEPS - for name, obj in inspect.getmembers (module): - if name.startswith ("Common") or name.endswith ("Template"): - continue - - if (inspect.isclass (obj) - and obj.__module__ == filename[:-3]): - script = os.path.join (cfg.DATADIR, "tracker-tests", filename) - print TEST_CASE_TMPL % (name, - __get_doc (obj), - script + " " + name) - - print """ <environments> - <scratchbox>true</scratchbox> - <hardware>true</hardware> - </environments> - </set> - """ - # Remove the compiled .pyc from the disk (because it looks ugly) - # - # First time a module is loaded, __file__ is the .py - # once the file is compiled, __file__ is .pyc - if module.__file__.endswith (".py"): - unlink = module.__file__ + "c" - else: - unlink = module.__file__ - os.unlink (unlink) - - -if __name__ == "__main__": - - if (len (sys.argv) < 2): - print >> sys.stderr, "pass .py tests as parameter" - sys.exit (-1) - print HEADER - map (print_as_xml, sys.argv[1:]) - print FOOTER diff --git a/tests/functional-tests/test-extraction-data/README b/tests/functional-tests/test-extraction-data/README index 1a3e21596..cfbc0e175 100644 --- a/tests/functional-tests/test-extraction-data/README +++ b/tests/functional-tests/test-extraction-data/README @@ -7,8 +7,6 @@ The python test will traverse recursively this directory, loading the .expected ===================== It is a .ini (.desktop) formatted file with two mandatory sections: TestFile and Metadata. -Optionally there can be a "Meego" section, for metadata that should be checked only on that platform. -Adding more platforms is fairly trivial but requires to modify the python code. The TestFile section contains the * Filename (mandatory): relative path from the .expected of the file under test. diff --git a/tests/functional-tests/test-extraction-data/audio/Jazz_Audio_OPLs0.expected b/tests/functional-tests/test-extraction-data/audio/Jazz_Audio_OPLs0.expected index 4336b0eaa..22a53eb53 100644 --- a/tests/functional-tests/test-extraction-data/audio/Jazz_Audio_OPLs0.expected +++ b/tests/functional-tests/test-extraction-data/audio/Jazz_Audio_OPLs0.expected @@ -9,5 +9,3 @@ a=nmm:MusicPiece !a=nmm:Video !a=nfo:Image !a=nmm:Photo - -[Meego] diff --git a/tests/functional-tests/test-extraction-data/audio/audio-test-1.expected b/tests/functional-tests/test-extraction-data/audio/audio-test-1.expected index 87599620f..fda57c557 100644 --- a/tests/functional-tests/test-extraction-data/audio/audio-test-1.expected +++ b/tests/functional-tests/test-extraction-data/audio/audio-test-1.expected @@ -15,5 +15,3 @@ nfo_channels=1 nfo_duration=15 nfo_sampleRate=22050 nfo_averageBitrate=32000 - -[Meego] diff --git a/tests/functional-tests/test-extraction-data/audio/audio-test-2.expected b/tests/functional-tests/test-extraction-data/audio/audio-test-2.expected index 0ab85f9c4..4edc82465 100644 --- a/tests/functional-tests/test-extraction-data/audio/audio-test-2.expected +++ b/tests/functional-tests/test-extraction-data/audio/audio-test-2.expected @@ -14,6 +14,3 @@ nfo_codec=MPEG nfo_channels=2 nfo_sampleRate=44100 nfo_averageBitrate=256000 - -[Meego] -nfo_encodedBy=Nokia Music diff --git a/tests/functional-tests/test-extraction-data/images/comment-extension-block.expected b/tests/functional-tests/test-extraction-data/images/comment-extension-block.expected index 906022c9e..7251f7021 100644 --- a/tests/functional-tests/test-extraction-data/images/comment-extension-block.expected +++ b/tests/functional-tests/test-extraction-data/images/comment-extension-block.expected @@ -9,5 +9,3 @@ a=nmm:Photo nfo_width=600 nfo_height=450 nie_comment=GIF image format only supports comments in 7-bit ASCII encoding! - -[Meego] diff --git a/tests/functional-tests/test-extraction-data/images/test-image-1.expected b/tests/functional-tests/test-extraction-data/images/test-image-1.expected index 64a11a7a1..e4a08849c 100644 --- a/tests/functional-tests/test-extraction-data/images/test-image-1.expected +++ b/tests/functional-tests/test-extraction-data/images/test-image-1.expected @@ -16,5 +16,3 @@ nie_comment=This is a for tracker test slo_location_postalAddress=@URNUUID@ nfo_horizontalResolution=20 nfo_verticalResolution=20 - -[Meego] diff --git a/tests/functional-tests/test-extraction-data/images/test-image-2.expected b/tests/functional-tests/test-extraction-data/images/test-image-2.expected index 5264068b3..f4ab5b6f7 100644 --- a/tests/functional-tests/test-extraction-data/images/test-image-2.expected +++ b/tests/functional-tests/test-extraction-data/images/test-image-2.expected @@ -7,5 +7,3 @@ Comment=Basic png example a=nmm:Photo nfo_width=211 nfo_height=217 - -[Meego] diff --git a/tests/functional-tests/test-extraction-data/images/test-image-3.expected b/tests/functional-tests/test-extraction-data/images/test-image-3.expected index 7aab615a1..7121a4ccc 100644 --- a/tests/functional-tests/test-extraction-data/images/test-image-3.expected +++ b/tests/functional-tests/test-extraction-data/images/test-image-3.expected @@ -9,5 +9,3 @@ nfo_width=37 nfo_height=39 nie_title=/home/amit/Desktop/test-image-3.tif nfo_orientation=nfo:orientation-top-mirror - -[Meego] diff --git a/tests/functional-tests/test-extraction-data/office/pdf-doc.expected b/tests/functional-tests/test-extraction-data/office/pdf-doc.expected index 93de5b724..3580ec32f 100644 --- a/tests/functional-tests/test-extraction-data/office/pdf-doc.expected +++ b/tests/functional-tests/test-extraction-data/office/pdf-doc.expected @@ -3,7 +3,5 @@ Filename=pdf-doc.pdf Comment=PDF document from the office tools [Metadata] - -[Meego] a=nfo:PaginatedTextDocument nfo_pageCount=22 diff --git a/tests/functional-tests/test-extraction-data/video/184505.expected b/tests/functional-tests/test-extraction-data/video/184505.expected index c2a9839ed..d62395df5 100644 --- a/tests/functional-tests/test-extraction-data/video/184505.expected +++ b/tests/functional-tests/test-extraction-data/video/184505.expected @@ -6,7 +6,5 @@ Comment=Video without audio stream. Seems to be clasified as Audio. [Metadata] a=nmm:Video !a=nmm:Audio - -[Meego] nfo_height=480 nfo_width=864 diff --git a/tests/functional-tests/test-extraction-data/video/video-1.expected b/tests/functional-tests/test-extraction-data/video/video-1.expected index aaa28be77..59237d118 100644 --- a/tests/functional-tests/test-extraction-data/video/video-1.expected +++ b/tests/functional-tests/test-extraction-data/video/video-1.expected @@ -5,7 +5,5 @@ Comment=Just one standard mp4 a=nmm:Video nie_title=MPEG-4-x264.mp4 nfo_codec=MPEG-4 AAC audio - -[Meego] nfo_height=240 nfo_width=320 diff --git a/tests/functional-tests/test-extraction-data/video/video-2.expected b/tests/functional-tests/test-extraction-data/video/video-2.expected index a738c8571..ce8633514 100644 --- a/tests/functional-tests/test-extraction-data/video/video-2.expected +++ b/tests/functional-tests/test-extraction-data/video/video-2.expected @@ -5,7 +5,5 @@ Comment=Produces a Critical in Gstreamer freeing a component. [Metadata] a=nmm:Video - -[Meego] nfo_height=144 nfo_width=192 diff --git a/tests/functional-tests/test-runner.sh b/tests/functional-tests/test-runner.sh index b34aaae49..857b26c94 100755 --- a/tests/functional-tests/test-runner.sh +++ b/tests/functional-tests/test-runner.sh @@ -18,19 +18,13 @@ export REAL_HOME=`echo ~` # in the filesystem HOME=$TEMP_DIR -if test -h /targets/links/scratchbox.config ; then - export SBOX_REDIRECT_IGNORE=/usr/bin/python ; +eval `dbus-launch --sh-syntax` - meego-run $@ -else - eval `dbus-launch --sh-syntax` +trap "/bin/kill $DBUS_SESSION_BUS_PID; exit" INT - trap "/bin/kill $DBUS_SESSION_BUS_PID; exit" INT +echo "Running $@" +$@ - echo "Running $@" - $@ - - kill $DBUS_SESSION_BUS_PID -fi ; +kill $DBUS_SESSION_BUS_PID rm -R $TEMP_DIR diff --git a/tests/libtracker-extract/Makefile.am b/tests/libtracker-extract/Makefile.am index 3199a4148..932531f26 100644 --- a/tests/libtracker-extract/Makefile.am +++ b/tests/libtracker-extract/Makefile.am @@ -20,10 +20,6 @@ endif if HAVE_ENCA test_programs += tracker-encoding -else -if HAVE_MEEGOTOUCH -test_programs += tracker-encoding -endif endif AM_CPPFLAGS = \ diff --git a/tests/libtracker-extract/tracker-encoding-test.c b/tests/libtracker-extract/tracker-encoding-test.c index f6089bac1..ede671461 100644 --- a/tests/libtracker-extract/tracker-encoding-test.c +++ b/tests/libtracker-extract/tracker-encoding-test.c @@ -53,7 +53,7 @@ static void test_encoding_can_guess (void) { /* This just duplicates the function code... */ -#if defined (HAVE_ENCA) || defined (HAVE_MEEGOTOUCH) || defined (HAVE_LIBICU_CHARSET_DETECTION) +#if defined (HAVE_ENCA) || defined (HAVE_LIBICU_CHARSET_DETECTION) g_assert (tracker_encoding_can_guess ()); #else g_assert (!tracker_encoding_can_guess ()); diff --git a/tests/tracker-writeback/tests.xml b/tests/tracker-writeback/tests.xml deleted file mode 100644 index 37b3a8b92..000000000 --- a/tests/tracker-writeback/tests.xml +++ /dev/null @@ -1,28 +0,0 @@ -<?xml version="1.0" encoding="ISO-8859-1"?> -<testdefinition version="0.1"> - <suite name="tracker-tests" domain="tracker-store"> - <!-- At least one set per suite, name and description mandatory --> - <set name="testset1" description="Basic sparql tests" feature="sparql-insert"> - <pre_steps> - <!-- This doesn't seem to work --> - <step>. /tmp/session_bus_address.user</step> - <step>tracker-writeback &</step> - </pre_steps> - - <!-- At least one case per set, name mandatory, description mandatory, other optional --> - <case name="test_simple_insertion" type="Functional" level="Feature" - description="Insert and check results" requirement="01" subfeature=""> - <!-- dbus env variables defined here. This works. --> - <step expected_result="0">. /tmp/session_bus_address.user; python2.5 /usr/share/tracker-tests/01-writeback.py</step> - </case> - - - <!-- Environments optional - tells where the tests are run --> - <environments> - <scratchbox>true</scratchbox> - <hardware>true</hardware> - </environments> - - </set> - </suite> -</testdefinition> |