Skip to content

Commit

Permalink
fix: ignore logcat_paths for skipped
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaoweii committed Feb 21, 2024
1 parent c2644ce commit 8990d3e
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions integrationtest/devicefarm/automate_device_farm.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,20 +142,21 @@ def download_artifacts(jobs_response, save_path):
type=artifact_type,
arn=test['arn']
)['artifacts']
is_valid_test = True
for artifact in artifacts:
path_to = os.path.join(save_path, job_name)
os.makedirs(path_to, exist_ok=True)
filename = artifact['type'] + "_" + artifact['name'] + "." + artifact['extension']
if str(filename).endswith(".logcat") or str(filename).endswith(".zip"):
artifact_save_path = os.path.join(path_to, filename)
if is_valid_test and str(filename).endswith(".logcat"):
logcat_paths.append(artifact_save_path)
print("Downloading " + artifact_save_path)
with open(artifact_save_path, 'wb') as fn, \
requests.get(artifact['url'], allow_redirects=True) as request:
fn.write(request.content)
if str(filename).endswith(".zip"):
result = unzip_and_copy(artifact_save_path)
if result and str(filename).endswith(".logcat"):
logcat_paths.append(artifact_save_path)
is_valid_test = unzip_and_copy(artifact_save_path)

return logcat_paths

Expand Down

0 comments on commit 8990d3e

Please sign in to comment.