From 1011a0ea2eaad33d4810a200f87f9a2b91cebe91 Mon Sep 17 00:00:00 2001 From: Scott Beddall <45376673+scbedd@users.noreply.github.com> Date: Fri, 2 Jun 2023 15:16:12 -0700 Subject: [PATCH] adjust assets reporting to align to feedback presented by samvaity (#6282) --- .../python/assets-automation/generate_assets_report.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/eng/scripts/python/assets-automation/generate_assets_report.py b/eng/scripts/python/assets-automation/generate_assets_report.py index c21ddea5e70..5885e036ce2 100644 --- a/eng/scripts/python/assets-automation/generate_assets_report.py +++ b/eng/scripts/python/assets-automation/generate_assets_report.py @@ -356,14 +356,14 @@ def evaluate_java_package(package_path: str) -> int: possible_test_directory = resolve_java_test_directory(package_path) possible_assets_location = os.path.join(os.path.dirname(package_path),'assets.json') + if os.path.exists(possible_assets_location): + return 2 + if not possible_test_directory: - return 0 + return -1 test_files = glob.glob(os.path.join(possible_test_directory, "**", "*.java"), recursive=True) - if os.path.exists(possible_assets_location): - return 2 - # we only will search the test_files if there are actual session-records present session_glob = os.path.join(possible_test_directory, "**", "session-records") session_records = glob.glob(session_glob, recursive=True)