From 72ce619a417554e9346778a18a16982083cd1bd2 Mon Sep 17 00:00:00 2001 From: "Bobby R. Bruce" Date: Tue, 26 Jul 2022 11:01:55 -0700 Subject: [PATCH] tests: Add exception print to downloader_check test This exception will help diagnose download errors when they occur by printing the specific Exception thrown by the resource downloader. Change-Id: Iab35f85fa305594076bf582228e89dae611ce8df Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/61631 Maintainer: Bobby Bruce Reviewed-by: Bobby Bruce Tested-by: kokoro --- tests/gem5/configs/download_check.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/gem5/configs/download_check.py b/tests/gem5/configs/download_check.py index 613a1c4d3b..decc62c2d7 100644 --- a/tests/gem5/configs/download_check.py +++ b/tests/gem5/configs/download_check.py @@ -86,8 +86,10 @@ for id in ids: download_path = os.path.join(args.download_directory, id) try: get_resource(resource_name=id, to_path=download_path) - except Exception: + except Exception as e: errors += f"Failure to download resource '{id}'.{os.linesep}" + errors += f"Exception message:{os.linesep}{str(e)}" + errors += f"{os.linesep}{os.linesep}" continue if md5(Path(download_path)) != resource_json["md5sum"]: