diff options
author | Aiden Grossman <aidengrossman@google.com> | 2025-07-24 06:34:33 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-07-24 06:34:33 -0700 |
commit | 2149d6d1c9a1ad62761dc007ec6c6dedf6eb2fc0 (patch) | |
tree | 7f0c45f74cd8079139c76919b4def9818dc613d2 | |
parent | 08e7c17c7aa923f057d3769457eaa267da37bb96 (diff) | |
download | llvm-2149d6d1c9a1ad62761dc007ec6c6dedf6eb2fc0.zip llvm-2149d6d1c9a1ad62761dc007ec6c6dedf6eb2fc0.tar.gz llvm-2149d6d1c9a1ad62761dc007ec6c6dedf6eb2fc0.tar.bz2 |
[CI] Run All Tests When Changing third-party
This patch ensures that we run all the tests when someone touches
third-party. Some of the projects (like SipHash and Benchmark) do not
get used by every project and we could get away with testing less.
However, it takes quite a bit of effort to tease out what actually does
depend on which library, it is liable to becoming out of date, and it
adds complexity. Just testing all the projects is simple. Given the
commit frequency to third-party is pretty low (a couple commits per
month), we should have no capacity problems here.
Fixes #149154
Reviewers: dschuff, gburgessiv, Keenuts, lnihlen, dpaoliello, cmtice
Reviewed By: dpaoliello
Pull Request: https://github.com/llvm/llvm-project/pull/150251
-rw-r--r-- | .ci/compute_projects.py | 1 | ||||
-rw-r--r-- | .ci/compute_projects_test.py | 27 |
2 files changed, 27 insertions, 1 deletions
diff --git a/.ci/compute_projects.py b/.ci/compute_projects.py index be3d8f4..2dc5629 100644 --- a/.ci/compute_projects.py +++ b/.ci/compute_projects.py @@ -155,6 +155,7 @@ META_PROJECTS = { ("*", "docs"): "docs", ("llvm", "utils", "gn"): "gn", (".github", "workflows", "premerge.yaml"): ".ci", + ("third-party",): ".ci", } # Projects that should not run any tests. These need to be metaprojects. diff --git a/.ci/compute_projects_test.py b/.ci/compute_projects_test.py index b401fb2..11c4aea9 100644 --- a/.ci/compute_projects_test.py +++ b/.ci/compute_projects_test.py @@ -203,7 +203,7 @@ class TestComputeProjects(unittest.TestCase): def test_invalid_subproject(self): env_variables = compute_projects.get_env_variables( - ["third-party/benchmark/CMakeLists.txt"], "Linux" + ["llvm-libgcc/CMakeLists.txt"], "Linux" ) self.assertEqual(env_variables["projects_to_build"], "") self.assertEqual(env_variables["project_check_targets"], "") @@ -343,6 +343,31 @@ class TestComputeProjects(unittest.TestCase): self.assertEqual(env_variables["runtimes_check_targets"], "") self.assertEqual(env_variables["runtimes_check_targets_needs_reconfig"], "") + def test_third_party_benchmark(self): + env_variables = compute_projects.get_env_variables( + ["third-party/benchmark/CMakeLists.txt"], "Linux" + ) + self.assertEqual( + env_variables["projects_to_build"], + "bolt;clang;clang-tools-extra;flang;libclc;lld;lldb;llvm;mlir;polly", + ) + self.assertEqual( + env_variables["project_check_targets"], + "check-bolt check-clang check-clang-cir check-clang-tools check-flang check-lld check-lldb check-llvm check-mlir check-polly", + ) + self.assertEqual( + env_variables["runtimes_to_build"], + "compiler-rt;libc;libcxx;libcxxabi;libunwind", + ) + self.assertEqual( + env_variables["runtimes_check_targets"], + "check-compiler-rt check-libc", + ) + self.assertEqual( + env_variables["runtimes_check_targets_needs_reconfig"], + "check-cxx check-cxxabi check-unwind", + ) + if __name__ == "__main__": unittest.main() |