Skip to content

Commit 2149d6d

Browse files
[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: #150251
1 parent 08e7c17 commit 2149d6d

File tree

2 files changed

+27
-1
lines changed

2 files changed

+27
-1
lines changed

.ci/compute_projects.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,7 @@
155155
("*", "docs"): "docs",
156156
("llvm", "utils", "gn"): "gn",
157157
(".github", "workflows", "premerge.yaml"): ".ci",
158+
("third-party",): ".ci",
158159
}
159160

160161
# Projects that should not run any tests. These need to be metaprojects.

.ci/compute_projects_test.py

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ def test_flang(self):
203203

204204
def test_invalid_subproject(self):
205205
env_variables = compute_projects.get_env_variables(
206-
["third-party/benchmark/CMakeLists.txt"], "Linux"
206+
["llvm-libgcc/CMakeLists.txt"], "Linux"
207207
)
208208
self.assertEqual(env_variables["projects_to_build"], "")
209209
self.assertEqual(env_variables["project_check_targets"], "")
@@ -343,6 +343,31 @@ def test_other_github_workflow(self):
343343
self.assertEqual(env_variables["runtimes_check_targets"], "")
344344
self.assertEqual(env_variables["runtimes_check_targets_needs_reconfig"], "")
345345

346+
def test_third_party_benchmark(self):
347+
env_variables = compute_projects.get_env_variables(
348+
["third-party/benchmark/CMakeLists.txt"], "Linux"
349+
)
350+
self.assertEqual(
351+
env_variables["projects_to_build"],
352+
"bolt;clang;clang-tools-extra;flang;libclc;lld;lldb;llvm;mlir;polly",
353+
)
354+
self.assertEqual(
355+
env_variables["project_check_targets"],
356+
"check-bolt check-clang check-clang-cir check-clang-tools check-flang check-lld check-lldb check-llvm check-mlir check-polly",
357+
)
358+
self.assertEqual(
359+
env_variables["runtimes_to_build"],
360+
"compiler-rt;libc;libcxx;libcxxabi;libunwind",
361+
)
362+
self.assertEqual(
363+
env_variables["runtimes_check_targets"],
364+
"check-compiler-rt check-libc",
365+
)
366+
self.assertEqual(
367+
env_variables["runtimes_check_targets_needs_reconfig"],
368+
"check-cxx check-cxxabi check-unwind",
369+
)
370+
346371

347372
if __name__ == "__main__":
348373
unittest.main()

0 commit comments

Comments
 (0)