on xenial help sign in
Add some debug, see if i can find out why it fails to pass on CI
c0e1f1cAlbert Astals
tests/autopilot/unity8/shell/emulators/dash.py+9
@@ -18,6 +18,7 @@
18#
18#
19
19
20import logging
20import logging
21+import time
21
22
22from unity8.shell import emulators
23from unity8.shell import emulators
23
24
@@ -67,7 +68,9 @@ class Dash(emulators.UnityEmulatorBase):
67
68
68 """
69 """
69 scope_loader = self._get_scope_loader(scope_id)
70 scope_loader = self._get_scope_loader(scope_id)
71+ print "open_scope", scope_id, scope_loader
70 if scope_loader.isCurrent:
72 if scope_loader.isCurrent:
73+ print "scope_loader.isCurrent"
71 logger.info('The scope is already open.')
74 logger.info('The scope is already open.')
72 return self._get_scope_from_loader(scope_loader)
75 return self._get_scope_from_loader(scope_loader)
73 else:
76 else:
@@ -82,6 +85,12 @@ class Dash(emulators.UnityEmulatorBase):
82 'No scope found with id {0}'.format(scope_id))
85 'No scope found with id {0}'.format(scope_id))
83
86
84 def _get_scope_from_loader(self, loader):
87 def _get_scope_from_loader(self, loader):
88+ print "_get_scope_from_loader", loader, loader.isCurrent, loader.isLoaded, loader.get_children()
89+ i = 0
90+ time.sleep(1)
91+ while len(loader.get_children()) < 1 and i < 5:
92+ time.sleep(1)
93+ i = i + 1
85 return loader.get_children()[0]
94 return loader.get_children()[0]
86
95
87 def _open_scope_scrolling(self, scope_loader):
96 def _open_scope_scrolling(self, scope_loader):