From 7b4fb3d22d57aae239e685ce6d323556bd75be1d Mon Sep 17 00:00:00 2001 From: Gavin Mak Date: Thu, 22 Feb 2024 18:48:33 +0000 Subject: [PATCH] Support recipes_test.py in non-git workspace Providing --package flag allows recipes.py to skip git calls it makes to find repo root. Bug: b/323243527 Change-Id: If507fbf15459d7ea73670df202e16c344f9467a8 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5263441 Commit-Queue: Gavin Mak Reviewed-by: Josip Sokcevic --- tests/recipes_test.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/recipes_test.py b/tests/recipes_test.py index 8e069f054..cfa1b018f 100755 --- a/tests/recipes_test.py +++ b/tests/recipes_test.py @@ -12,8 +12,9 @@ ROOT_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) def recipes_py(*args): - subprocess.check_call([os.path.join(ROOT_DIR, 'recipes', 'recipes.py')] + - list(args)) + recipes_cfg_path = os.path.join(ROOT_DIR, 'infra', 'config', 'recipes.cfg') + subprocess.check_call([os.path.join(ROOT_DIR, 'recipes', 'recipes.py'), + '--package', recipes_cfg_path] + list(args)) recipes_py('test', 'run')