aboutsummaryrefslogtreecommitdiff
path: root/.ci/compute_projects_test.py
diff options
context:
space:
mode:
Diffstat (limited to '.ci/compute_projects_test.py')
-rw-r--r--.ci/compute_projects_test.py62
1 files changed, 61 insertions, 1 deletions
diff --git a/.ci/compute_projects_test.py b/.ci/compute_projects_test.py
index 1bbcd8a..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"], "")
@@ -308,6 +308,66 @@ class TestComputeProjects(unittest.TestCase):
self.assertEqual(env_variables["runtimes_check_targets"], "check-libc")
self.assertEqual(env_variables["runtimes_check_targets_needs_reconfig"], "")
+ def test_premerge_workflow(self):
+ env_variables = compute_projects.get_env_variables(
+ [".github/workflows/premerge.yaml"], "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",
+ )
+
+ def test_other_github_workflow(self):
+ env_variables = compute_projects.get_env_variables(
+ [".github/workflows/docs.yml"], "Linux"
+ )
+ self.assertEqual(env_variables["projects_to_build"], "")
+ self.assertEqual(env_variables["project_check_targets"], "")
+ self.assertEqual(env_variables["runtimes_to_build"], "")
+ 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()