[llvm] [Github][TestingTools] Add workflow to build llvm-testing-tools (PR #188891)

Aiden Grossman via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 7 18:57:43 PDT 2026


https://github.com/boomanaiden154 updated https://github.com/llvm/llvm-project/pull/188891

>From ab5ad1a95daeb80b4d408245354d9ac29ce0673b Mon Sep 17 00:00:00 2001
From: Aiden Grossman <aidengrossman at google.com>
Date: Fri, 27 Mar 2026 01:44:27 +0000
Subject: [PATCH 1/7] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20ch?=
 =?UTF-8?q?anges=20to=20main=20this=20commit=20is=20based=20on?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Created using spr 1.3.7

[skip ci]
---
 llvm/utils/llvm-testing-tools/README.md       |  6 ++++++
 llvm/utils/llvm-testing-tools/pyproject.toml  | 21 +++++++++++++++++++
 .../src/llvm_testing_tools/__init__.py        |  0
 .../src/llvm_testing_tools/wrapper.py         | 16 ++++++++++++++
 4 files changed, 43 insertions(+)
 create mode 100644 llvm/utils/llvm-testing-tools/README.md
 create mode 100644 llvm/utils/llvm-testing-tools/pyproject.toml
 create mode 100644 llvm/utils/llvm-testing-tools/src/llvm_testing_tools/__init__.py
 create mode 100644 llvm/utils/llvm-testing-tools/src/llvm_testing_tools/wrapper.py

diff --git a/llvm/utils/llvm-testing-tools/README.md b/llvm/utils/llvm-testing-tools/README.md
new file mode 100644
index 0000000000000..64bebdc3f3116
--- /dev/null
+++ b/llvm/utils/llvm-testing-tools/README.md
@@ -0,0 +1,6 @@
+# LLVM Testing Utilities
+
+This folder contains the setup for the `llvm-testing-utilities` python package.
+This package provides some utilities like `FileCheck` and `split-file` through
+PyPI with the aim being to support testing requirements for runtimes builds
+without them needing to utilize a bootstrapping build.
\ No newline at end of file
diff --git a/llvm/utils/llvm-testing-tools/pyproject.toml b/llvm/utils/llvm-testing-tools/pyproject.toml
new file mode 100644
index 0000000000000..19f3da0b95aa1
--- /dev/null
+++ b/llvm/utils/llvm-testing-tools/pyproject.toml
@@ -0,0 +1,21 @@
+[build-system]
+requires = ["setuptools>=61.0", "wheel"]
+build-backend = "setuptools.build_meta"
+
+[project]
+name = "llvm_testing_tools"
+description = "LLVM Testing Tools"
+readme = "README.md"
+requires-python = ">=3.8"
+version = "23.0.0"
+license = "Apache-2.0 WITH LLVM-exception"
+
+[tool.setuptools.packages.find]
+where = ["src"]
+
+[tool.setuptools.package-data]
+llvm_testing_tools = ["binaries/*"]
+
+[project.scripts]
+split-file = "llvm_testing_tools.wrapper:run_test_tool"
+FileCheck = "llvm_testing_tools.wrapper:run_test_tool"
diff --git a/llvm/utils/llvm-testing-tools/src/llvm_testing_tools/__init__.py b/llvm/utils/llvm-testing-tools/src/llvm_testing_tools/__init__.py
new file mode 100644
index 0000000000000..e69de29bb2d1d
diff --git a/llvm/utils/llvm-testing-tools/src/llvm_testing_tools/wrapper.py b/llvm/utils/llvm-testing-tools/src/llvm_testing_tools/wrapper.py
new file mode 100644
index 0000000000000..d49bcc515f3f7
--- /dev/null
+++ b/llvm/utils/llvm-testing-tools/src/llvm_testing_tools/wrapper.py
@@ -0,0 +1,16 @@
+# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+# See https://llvm.org/LICENSE.txt for license information.
+# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+"""Wraps the binaries contained in the package."""
+
+import importlib.resources
+import os
+import subprocess
+import sys
+
+
+def run_test_tool():
+    base_path = importlib.resources.files("llvm_testing_tools").joinpath("binaries")
+    binary_path = os.path.join(str(base_path), os.path.basename(sys.argv[0]))
+    result = subprocess.run([binary_path] + sys.argv[1:], stdin=sys.stdin)
+    sys.exit(result.returncode)

>From d1e50fceb8dbf75edde7ac53db9030ff342d1c42 Mon Sep 17 00:00:00 2001
From: Aiden Grossman <aidengrossman at google.com>
Date: Fri, 27 Mar 2026 01:48:41 +0000
Subject: [PATCH 2/7] fix

Created using spr 1.3.7
---
 .github/workflows/release-llvm-testing-tools.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.github/workflows/release-llvm-testing-tools.yml b/.github/workflows/release-llvm-testing-tools.yml
index 85cf332def2a6..e15abded551b2 100644
--- a/.github/workflows/release-llvm-testing-tools.yml
+++ b/.github/workflows/release-llvm-testing-tools.yml
@@ -29,7 +29,7 @@ jobs:
           ninja split-file FileCheck
       - name: Build Package
         run: |
-          cd ../llvm/utils/llvm-testing-tools
+          cd llvm/utils/llvm-testing-tools
           mkdir ./src/binaries
           cp ../../../build/bin/FileCheck ./src/binaries/FileCheck
           cp ../../../build/bin/split-file ./src/binaries/split-file

>From 84d54867da89c5d76114965b72e2a60b29d3744a Mon Sep 17 00:00:00 2001
From: Aiden Grossman <aidengrossman at google.com>
Date: Fri, 27 Mar 2026 01:52:52 +0000
Subject: [PATCH 3/7] fix

Created using spr 1.3.7
---
 .github/workflows/release-llvm-testing-tools.yml | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/.github/workflows/release-llvm-testing-tools.yml b/.github/workflows/release-llvm-testing-tools.yml
index e15abded551b2..6594ef5dc95b0 100644
--- a/.github/workflows/release-llvm-testing-tools.yml
+++ b/.github/workflows/release-llvm-testing-tools.yml
@@ -29,6 +29,8 @@ jobs:
           ninja split-file FileCheck
       - name: Build Package
         run: |
+          apt-get update
+          apt-get install -y python3-build
           cd llvm/utils/llvm-testing-tools
           mkdir ./src/binaries
           cp ../../../build/bin/FileCheck ./src/binaries/FileCheck

>From cfad6e1b2ccce17f32e4ae5dc8505e6c7110f7ce Mon Sep 17 00:00:00 2001
From: Aiden Grossman <aidengrossman at google.com>
Date: Fri, 27 Mar 2026 01:56:10 +0000
Subject: [PATCH 4/7] fix

Created using spr 1.3.7
---
 .github/workflows/release-llvm-testing-tools.yml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/.github/workflows/release-llvm-testing-tools.yml b/.github/workflows/release-llvm-testing-tools.yml
index 6594ef5dc95b0..306e2149f8066 100644
--- a/.github/workflows/release-llvm-testing-tools.yml
+++ b/.github/workflows/release-llvm-testing-tools.yml
@@ -29,8 +29,8 @@ jobs:
           ninja split-file FileCheck
       - name: Build Package
         run: |
-          apt-get update
-          apt-get install -y python3-build
+          sudo apt-get update
+          sudo apt-get install -y python3-build
           cd llvm/utils/llvm-testing-tools
           mkdir ./src/binaries
           cp ../../../build/bin/FileCheck ./src/binaries/FileCheck

>From 863ee8cedc5100a6b1cb58aec63bd9f4218c7b09 Mon Sep 17 00:00:00 2001
From: Aiden Grossman <aidengrossman at google.com>
Date: Fri, 27 Mar 2026 02:02:00 +0000
Subject: [PATCH 5/7] fix

Created using spr 1.3.7
---
 .github/workflows/release-llvm-testing-tools.yml | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/.github/workflows/release-llvm-testing-tools.yml b/.github/workflows/release-llvm-testing-tools.yml
index 306e2149f8066..8e6841750bdb2 100644
--- a/.github/workflows/release-llvm-testing-tools.yml
+++ b/.github/workflows/release-llvm-testing-tools.yml
@@ -32,7 +32,7 @@ jobs:
           sudo apt-get update
           sudo apt-get install -y python3-build
           cd llvm/utils/llvm-testing-tools
-          mkdir ./src/binaries
-          cp ../../../build/bin/FileCheck ./src/binaries/FileCheck
-          cp ../../../build/bin/split-file ./src/binaries/split-file
+          mkdir ./src/llvm_testing_tools/binaries
+          cp ../../../build/bin/FileCheck ./src/llvm_testing_tools/binaries/FileCheck
+          cp ../../../build/bin/split-file ./src/llvm_testing_tools/binaries/split-file
           python3 -m build

>From 13379efa1e6a59277c91e7a9534b3f175e00f33d Mon Sep 17 00:00:00 2001
From: Aiden Grossman <aidengrossman at google.com>
Date: Fri, 27 Mar 2026 02:11:03 +0000
Subject: [PATCH 6/7] upload

Created using spr 1.3.7
---
 .github/workflows/release-llvm-testing-tools.yml | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/.github/workflows/release-llvm-testing-tools.yml b/.github/workflows/release-llvm-testing-tools.yml
index 8e6841750bdb2..23b6443ac8a71 100644
--- a/.github/workflows/release-llvm-testing-tools.yml
+++ b/.github/workflows/release-llvm-testing-tools.yml
@@ -31,8 +31,13 @@ jobs:
         run: |
           sudo apt-get update
           sudo apt-get install -y python3-build
-          cd llvm/utils/llvm-testing-tools
+          cd ./llvm/utils/llvm-testing-tools
           mkdir ./src/llvm_testing_tools/binaries
           cp ../../../build/bin/FileCheck ./src/llvm_testing_tools/binaries/FileCheck
           cp ../../../build/bin/split-file ./src/llvm_testing_tools/binaries/split-file
           python3 -m build
+      - name: Upload Packages
+        uses: actions/upload-artifact at bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
+        with:
+          name: packages
+          path: ./llvm/utils/llvm-testing-tools/dist/*

>From 8a788d5173f0d34a2f03ee868e89eb2b3b7c6196 Mon Sep 17 00:00:00 2001
From: Aiden Grossman <aidengrossman at google.com>
Date: Fri, 27 Mar 2026 16:13:28 +0000
Subject: [PATCH 7/7] fix

Created using spr 1.3.7
---
 .github/workflows/release-llvm-testing-tools.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.github/workflows/release-llvm-testing-tools.yml b/.github/workflows/release-llvm-testing-tools.yml
index 23b6443ac8a71..7c285bc05fdd7 100644
--- a/.github/workflows/release-llvm-testing-tools.yml
+++ b/.github/workflows/release-llvm-testing-tools.yml
@@ -1,4 +1,4 @@
-name: Release mlgo-utils
+name: Release llvm-testing-tools
 
 permissions:
   contents: read



More information about the llvm-commits mailing list