Commit 59467d56 authored by Sam Thursfield's avatar Sam Thursfield

functional-tests: Give clearer error when running the extractor failed

These tests will fail if the extractor is disabled at build time.
Let's make this fact obvious.
parent 193f559f
Pipeline #30776 passed with stage
in 6 minutes and 27 seconds
......@@ -21,6 +21,7 @@
from common.utils import configuration as cfg
from common.utils.helpers import log
import errno
import json
import os
import re
......@@ -42,7 +43,13 @@ def get_tracker_extract_jsonld_output(filename, mime_type=None):
log ('Running: %s' % ' '.join(command))
p = subprocess.Popen (command, env=env, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
p = subprocess.Popen (command, env=env, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
except OSError as e:
if e.errno == errno.ENOENT:
raise RuntimeError("Did not find tracker-extract binary. Is the 'extract' option disabled?")
raise RuntimeError("Error running tracker-extract: %s" % (e))
stdout, stderr = p.communicate()
if p.returncode != 0:
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