@@ -160,6 +160,7 @@ class UnityTestCase(AutopilotTestCase):
160160
161161 if self._lightdm_mock_type is None:
162162 self.patch_lightdm_mock()
163+ self._setup_extra_mock_environment_patch()
163164
164165 app_proxy = self.launch_test_application(
165166 binary_path,
@@ -180,7 +181,10 @@ class UnityTestCase(AutopilotTestCase):
180181 def patch_lightdm_mock(self, mock_type='single'):
181182 self._lightdm_mock_type = mock_type
182183 logger.info("Setting up LightDM mock type '%s'", mock_type)
183− new_ld_library_path = self._get_lightdm_mock_path(mock_type)
184+ new_ld_library_path = "%s:%s" % (
185+ get_default_extra_mock_libraries(),
186+ self._get_lightdm_mock_path(mock_type)
187+ )
184188 logger.info("New library path: %s", new_ld_library_path)
185189
186190 self.patch_environment('LD_LIBRARY_PATH', new_ld_library_path)
@@ -198,6 +202,10 @@ class UnityTestCase(AutopilotTestCase):
198202 )
199203 return lightdm_mock_path
200204
205+ def _setup_extra_mock_environment_patch(self):
206+ mocks_library_path = get_mocks_library_path()
207+ self.patch_environment('QML2_IMPORT_PATH', mocks_library_path)
208+
201209 def _set_proxy(self, proxy):
202210 """Keep a copy of the proxy object, so we can use it to get common
203211 parts of the shell later on.