Code coverage tests fail on binman due to dist-packages being dropped from
the python path on Ubuntu 16.04. Add them in so that we can find the
elffile module, which is required by binman.
Signed-off-by: Simon Glass <sjg@chromium.org>
from __future__ import print_function
+from distutils.sysconfig import get_python_lib
import glob
import multiprocessing
import os
+import site
import sys
import traceback
import unittest
sys.path.insert(0, os.path.join(our_path,
'../../build-sandbox_spl/scripts/dtc/pylibfdt'))
+# When running under python-coverage on Ubuntu 16.04, the dist-packages
+# directories are dropped from the python path. Add them in so that we can find
+# the elffile module. We could use site.getsitepackages() here but unfortunately
+# that is not available in a virtualenv.
+sys.path.append(get_python_lib())
+
import cmdline
import command
use_concurrent = True