From 83f9664efbc04fa0b66780c23aabc85557aa85f0 Mon Sep 17 00:00:00 2001 From: Keith Burzinski Date: Mon, 1 Jul 2024 21:06:33 -0500 Subject: [PATCH] [CI] Run all tests when a base test changes (#7010) --- script/list-components.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/script/list-components.py b/script/list-components.py index 4eccdbf96c..559919bb8a 100755 --- a/script/list-components.py +++ b/script/list-components.py @@ -140,7 +140,10 @@ def get_components(files: list[str], get_dependencies: bool = False): def main(): parser = argparse.ArgumentParser() parser.add_argument( - "-c", "--changed", action="store_true", help="Only run on changed files" + "-c", + "--changed", + action="store_true", + help="List all components required for testing based on changes", ) parser.add_argument( "-b", "--branch", help="Branch to compare changed files against" @@ -158,7 +161,9 @@ def main(): changed = changed_files(args.branch) else: changed = changed_files() - files = [f for f in files if f in changed] + # If any base test file(s) changed, there's no need to filter out components + if not any("tests/test_build_components" in file for file in changed): + files = [f for f in files if f in changed] for c in get_components(files, args.changed): print(c)