Files
chromium_depot_tools/tests/recipes_test.py
Gavin Mak 7b4fb3d22d 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>
2024-02-22 18:48:33 +00:00

23 lines
646 B
Python
Executable File

#!/usr/bin/env vpython3
# Copyright (c) 2015 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Runs simulation tests and lint on the recipes."""
import os
import subprocess
ROOT_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
def recipes_py(*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')
recipes_py('lint')