aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Burgess IV <gbiv@google.com>2024-04-12 13:15:38 -0600
committerChromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com>2024-04-15 17:32:16 +0000
commitf8e584c226ae80b91180c1779afd1fdf537efce7 (patch)
treeef37e0d9899d6e5ef68d3f3d54006c3b1c8a5c5c
parent5910e9f15c2e2f8699e54fc04277ff09d03d016a (diff)
downloadtoolchain-utils-f8e584c226ae80b91180c1779afd1fdf537efce7.tar.gz
llvm_tools: add a file to contain llvm testing information
This will be the new home for the LLVM_NEXT SHA (and associated revision). BUG=b:333462347 TEST=Unittests Change-Id: Ic03420e5c201a826c3cebdb79f900cceb91e6dc3 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/5450239 Reviewed-by: Jordan Abrahams-Whitehead <ajordanr@google.com> Tested-by: George Burgess <gbiv@chromium.org> Commit-Queue: George Burgess <gbiv@chromium.org>
-rw-r--r--llvm_tools/llvm_next.py30
-rwxr-xr-xllvm_tools/llvm_next_test.py24
2 files changed, 54 insertions, 0 deletions
diff --git a/llvm_tools/llvm_next.py b/llvm_tools/llvm_next.py
new file mode 100644
index 00000000..1c075e50
--- /dev/null
+++ b/llvm_tools/llvm_next.py
@@ -0,0 +1,30 @@
+# Copyright 2024 The ChromiumOS Authors
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+"""Contains useful constants for testing LLVM."""
+
+from typing import Iterable
+
+import cros_cls
+
+
+LLVM_NEXT_HASH = "28a8f1b901389c1e478407440f7ccf2d41c71b64"
+LLVM_NEXT_REV = 516547
+
+# NOTE: Always specify patch-sets for CLs. We don't want uploads by untrusted
+# users to turn into bot invocations w/ untrusted input.
+
+# A list of CLs that constitute the current llvm-next roll.
+# This is taken as the set of CLs that will be landed simultaneously in order
+# to make llvm-next go live.
+#
+# Generally speaking, for simple rolls, this should just contain a link to the
+# Manifest update CL.
+LLVM_NEXT_TESTING_CLS: Iterable[cros_cls.ChangeListURL] = ()
+
+# The CL used to disable -Werror, and report the results.
+DISABLE_WERROR_CL = cros_cls.ChangeListURL(
+ cl_id=2599698,
+ patch_set=5,
+)
diff --git a/llvm_tools/llvm_next_test.py b/llvm_tools/llvm_next_test.py
new file mode 100755
index 00000000..a4e6a395
--- /dev/null
+++ b/llvm_tools/llvm_next_test.py
@@ -0,0 +1,24 @@
+#!/usr/bin/env python3
+# Copyright 2024 The ChromiumOS Authors
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+"""Tests for llvm_next."""
+
+import unittest
+
+import llvm_next
+
+
+class Test(unittest.TestCase):
+ """Tests for llvm_next."""
+
+ def test_all_cls_have_patchesets(self):
+ cls = [llvm_next.DISABLE_WERROR_CL]
+ cls += llvm_next.LLVM_NEXT_TESTING_CLS
+ for cl in cls:
+ self.assertIsNotNone(cl.patch_set, f"CL {cl} needs a patch-set")
+
+
+if __name__ == "__main__":
+ unittest.main()