on xenial help sign in
Make with_lightdm_mock decorator more strict about trying to patch for non-existant mocks.
d341616Thomi Richards
tests/autopilot/unity8/shell/tests/helpers.py+4
@@ -30,6 +30,10 @@ def with_lightdm_mock(mock_type):
30 "qml/mocks/LightDM/",
30 "qml/mocks/LightDM/",
31 mock_type
31 mock_type
32 )
32 )
33+ if not os.path.exists(new_ld_library_path):
34+ raise RuntimeError(
35+ "LightDM mock '%s' does not exist." % mock_type
36+ )
33
37
34 logger.info("New library path: %s", new_ld_library_path)
38 logger.info("New library path: %s", new_ld_library_path)
35 args[0].patch_environment('LD_LIBRARY_PATH', new_ld_library_path)
39 args[0].patch_environment('LD_LIBRARY_PATH', new_ld_library_path)