on xenial help sign in
Re-include libusermetrics into the fold.
d28e017Christopher Lee
tests/autopilot/unity8/__init__.py+5
@@ -43,6 +43,11 @@ def get_lib_path():
43 return lib_path
43 return lib_path
44
44
45
45
46+def get_default_extra_mock_libraries():
47+ mocks_path = get_mocks_library_path()
48+ return os.path.join(mocks_path, 'libusermetrics')
49+
50+
46def get_mocks_library_path():
51def get_mocks_library_path():
47 if running_installed_tests():
52 if running_installed_tests():
48 mock_path = "qml/mocks/"
53 mock_path = "qml/mocks/"
tests/autopilot/unity8/shell/__init__.py+5−2
@@ -23,7 +23,7 @@ from functools import wraps
23import logging
23import logging
24import os.path
24import os.path
25
25
26−from unity8 import get_mocks_library_path
26+from unity8 import get_mocks_library_path, get_default_extra_mock_libraries
27
27
28
28
29logger = logging.getLogger(__name__)
29logger = logging.getLogger(__name__)
@@ -35,7 +35,10 @@ def with_lightdm_mock(mock_type):
35 @wraps(fn)
35 @wraps(fn)
36 def wrapper(*args, **kwargs):
36 def wrapper(*args, **kwargs):
37 logger.info("Setting up LightDM mock type '%s'", mock_type)
37 logger.info("Setting up LightDM mock type '%s'", mock_type)
38+ new_ld_library_path = "%s:%s" % (
39+ get_default_extra_mock_libraries(),
38− new_ld_library_path = _get_ld_library_path(mock_type)
40+ _get_ld_library_path(mock_type)
41+ )
39 logger.info("New library path: %s", new_ld_library_path)
42 logger.info("New library path: %s", new_ld_library_path)
40 tests_self = args[0]
43 tests_self = args[0]
41 tests_self.patch_environment(
44 tests_self.patch_environment(