From 21cc3a9d53d3ab1f3de5b900ad7bb4969326994d Mon Sep 17 00:00:00 2001 From: Gavin Mak Date: Fri, 24 Mar 2023 01:17:31 +0000 Subject: [PATCH] run_tests: Always check black and check it last https://gerrit-review.googlesource.com/c/git-repo/+/363474/24..25 meant to improve run_tests UX by letting users rerun it quickly, but it also removed CQ enforcement of formatting since CQ passes args to run_tests. Run pytest first so devs don't have format first and always check black formatting so it's enforced in CQ. Bug: b/267675342 Change-Id: I09544f110a6eb71b0c6c640787e10b04991a804e Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/365727 Tested-by: Gavin Mak Reviewed-by: Mike Frysinger Commit-Queue: Gavin Mak --- run_tests | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/run_tests b/run_tests index e76f9d8c..69ba2769 100755 --- a/run_tests +++ b/run_tests @@ -31,8 +31,8 @@ def run_black(): def main(argv): """The main entry.""" - black_ret = 0 if argv else run_black() pytest_ret = pytest.main(argv) + black_ret = run_black() return 0 if not black_ret and not pytest_ret else 1