From 8310436be083f8268bf8325bb2ffb65e9e178f6f Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Tue, 25 Mar 2025 12:50:36 -0400 Subject: run_tests: move test filtering to pytest markers Move the test disable logic even closer to the exact test that's disabled. This way people updating tests have a better chance of seeing they'll get reduced coverage in the CQ. Change-Id: I57c1a073a844019798b27e14d742fd32925d9ae8 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/462882 Tested-by: Mike Frysinger Reviewed-by: Gavin Mak Commit-Queue: Mike Frysinger --- run_tests | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) (limited to 'run_tests') diff --git a/run_tests b/run_tests index bdf383eb..20dad8da 100755 --- a/run_tests +++ b/run_tests @@ -36,20 +36,7 @@ def is_ci() -> bool: def run_pytest(argv: List[str]) -> int: """Returns the exit code from pytest.""" if is_ci(): - # TODO(b/266734831): Find out why smoke tests fail. - # TODO(b/266734831): Find out why each superproject test takes 8m+. - tests_to_skip = ( - "test_smoke_repo", - "test_smoke_git", - "test_superproject_get_superproject_invalid_branch", - "test_superproject_get_superproject_invalid_url", - ) - - print("WARNING: Skipping tests:", tests_to_skip) - argv = [ - "-k", - " and ".join(f"not {x}" for x in tests_to_skip), - ] + argv + argv = ["-m", "not skip_cq"] + argv return pytest.main(argv) -- cgit v1.2.3-54-g00ecf