From: Donghoon Shin Date: Tue, 18 Jul 2017 01:02:29 +0000 (+0900) Subject: Update _screenshot_wayland for latest enlightenment_info X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d10654c8b01d5c1bb9482963666f816026fdb20c;p=tools%2Flitmus.git Update _screenshot_wayland for latest enlightenment_info --- diff --git a/litmus/device/device.py b/litmus/device/device.py index 400f84d..49b9bdc 100644 --- a/litmus/device/device.py +++ b/litmus/device/device.py @@ -411,13 +411,13 @@ class device(object): """docstring for _screenshot_wayland""" # Find all viewable window id p_winid = '.*(0x[a-zA-Z0-9]{8})\s+\d+\s+\d+\s+\d+' \ - '\s+\d+\s+(\d+)\s+(\d+).*\sViewable.*' + '\s+\d+\s+(\d+)\s+(\d+).*[0]{1}\s+\d+\s+[NV]{1}.*' winids = find_all_pattern(p_winid, self.run_cmd('enlightenment_info -topvwins', timeout=20)) if winids: # Dump windows - outs = self.run_cmd('enlightenment_info -dump_topvwins', + outs = self.run_cmd('cd /tmp; enlightenment_info -dump_topvwins', timeout=20) dirn = find_pattern('directory:\s(.*)', outs, @@ -429,14 +429,15 @@ class device(object): # If dump does not exist then remove winid from list winids = [winid for winid in winids - if os.path.exists(os.path.join(tmpdir, winid[0]+'.png'))] + if os.path.exists(os.path.join(tmpdir, + winid[0]+'_0.png'))] # Base image bg = Image.new('RGB', (self._screen_width, self._screen_height)) # Merge images for winid in reversed(winids): try: - fg = Image.open(os.path.join(tmpdir, winid[0]+'.png')) + fg = Image.open(os.path.join(tmpdir, winid[0]+'_0.png')) bg.paste(fg, (int(winid[1]), int(winid[2])), fg) except FileNotFoundError: pass