Commit 8897c22a authored by Sam Thursfield's avatar Sam Thursfield

functional-tests: Skip extractor video tests if no h264 codec is found

These aren't shipped by default in many distros due to possible patent
issues, so let's not hard-depend on them.

We need some new video tests which use a patent-free codec.
parent 3ccc1643
......@@ -42,14 +42,25 @@ extractor_tests = \
$(srcdir)/test-extraction-data/images/test-image-2.expected.json \
$(srcdir)/test-extraction-data/images/comment-extension-block.expected.json \
$(srcdir)/test-extraction-data/images/roi.expected.json \
$(srcdir)/test-extraction-data/video/184505.expected.json \
$(srcdir)/test-extraction-data/video/video-1.expected.json \
$(srcdir)/test-extraction-data/video/video-2.expected.json \
$(srcdir)/test-extraction-data/playlists/playlist-test-1.expected.json \
$(srcdir)/test-extraction-data/office/office-doc.expected.json \
$(srcdir)/test-extraction-data/office/powerpoint.expected.json \
$(srcdir)/test-extraction-data/office/pdf-doc.expected.json
# These depend on having a H264 codec available, so are disabled by default.
#
# $(srcdir)/test-extraction-data/video/184505.expected.json \
# $(srcdir)/test-extraction-data/video/video-1.expected.json \
# $(srcdir)/test-extraction-data/video/video-2.expected.json
tests = \
300-miner-basic-ops.py \
301-miner-resource-removal.py \
310-fts-basic.py \
311-fts-file-operations.py \
312-fts-stopwords.py \
410-extractor-decorator.py
TEST_RUNNER = $(top_srcdir)/tests/functional-tests/test-runner.sh
functional-test: ${tests}
......
#!/bin/sh
# Detect if we will be able to decode the .mp4 files in test-extraction-data/video
gst-inspect-1.0 -t decoder | grep h264 --quiet
......@@ -36,15 +36,27 @@ extractor_tests = [
'images/test-image-2.expected.json',
'images/comment-extension-block.expected.json',
'images/roi.expected.json',
'video/184505.expected.json',
'video/video-1.expected.json',
'video/video-2.expected.json',
'playlists/playlist-test-1.expected.json',
'office/office-doc.expected.json',
'office/powerpoint.expected.json',
'office/pdf-doc.expected.json',
]
detect_h264_codec = join_paths(meson.current_source_dir(), 'detect-h264-codec.sh')
detect_h264_codec_result = run_command(detect_h264_codec)
if detect_h264_codec_result.returncode() == 0
extractor_tests += [
'video/184505.expected.json',
'video/video-1.expected.json',
'video/video-2.expected.json',
]
else
# FIXME: it would be nicer to visibly mark the tests as 'skipped', but the Meson
# test runner doesn't support this at the moment.
warning('No GStreamer h264 codec was detected. Some extractor tests will be disabled.')
endif
config_json_full_path = join_paths(meson.current_build_dir(), 'configuration.json')
dconf_profile_full_path = join_paths(meson.current_source_dir(), 'trackertest')
tracker_extractors_dir = join_paths(meson.current_build_dir(), '..', '..', 'src', 'tracker-extract')
......
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