浏览代码

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 <gavinmak@google.com>
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
Gavin Mak 1 年之前
父节点
当前提交
7b4fb3d22d
共有 1 个文件被更改,包括 3 次插入2 次删除
  1. 3 2
      tests/recipes_test.py

+ 3 - 2
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')