Skip to content

Commit e13be09

Browse files
author
john rusnak
committed
Fix to download screenshots regardless of sucess/failure
1 parent f598199 commit e13be09

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

testdroid/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -606,7 +606,7 @@ def download_test_screenshots(self, project_id, test_run_id):
606606

607607
logger.info("");
608608
for device_run in device_runs['data']:
609-
if device_run['state'] == "SUCCEEDED":
609+
if device_run['state'] in ["SUCCEEDED", "FAILED", "ABORTED", "WARNING", "TIMEOUT"]:
610610
directory = "%s-%s/%d-%s/screenshots" % (test_run['id'], test_run['displayName'], device_run['id'], device_run['device']['displayName'])
611611
screenshots = self.get_device_run_screenshots_list(project_id, test_run_id, device_run['id'])
612612
no_screenshots = True
@@ -638,7 +638,7 @@ def download_test_screenshots(self, project_id, test_run_id):
638638
if no_screenshots:
639639
logger.info("Device %s has no screenshots - skipping" % device_run['device']['displayName'])
640640
else:
641-
logger.info("Device %s has failed or has not finished - skipping" % device_run['device']['displayName'])
641+
logger.info("Device %s has errored or has not finished - skipping" % device_run['device']['displayName'])
642642

643643
def get_parser(self):
644644
class MyParser(OptionParser):

0 commit comments

Comments
 (0)