[llvm] [orc-rt] Generalize testcases for different target archs (PR #222629)

Lang Hames via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 10 05:48:05 PDT 2026


https://github.com/lhames updated https://github.com/llvm/llvm-project/pull/222629

>From ec974370ca7cdde7e05ee32a825bf1626c6834d1 Mon Sep 17 00:00:00 2001
From: Lang Hames <lhames at apple.com>
Date: Thu, 10 Sep 2026 22:30:06 +1000
Subject: [PATCH 1/2] [orc-rt] Generalize testcases for different target archs

Drop the hard-coded archs from the check-rt-process-info testcases.
Instead, check against an arch value derived from the build's target
triple.
---
 orc-rt/test/regression/darwin/check-rt-process-info.test | 6 +++---
 orc-rt/test/regression/linux/check-rt-process-info.test  | 5 +++--
 orc-rt/test/regression/lit.cfg.py                        | 5 +++++
 3 files changed, 11 insertions(+), 5 deletions(-)

diff --git a/orc-rt/test/regression/darwin/check-rt-process-info.test b/orc-rt/test/regression/darwin/check-rt-process-info.test
index 1950df9ec5f93..8df2c09477c89 100644
--- a/orc-rt/test/regression/darwin/check-rt-process-info.test
+++ b/orc-rt/test/regression/darwin/check-rt-process-info.test
@@ -1,6 +1,6 @@
 # RUN: orc-rt-process-info-check --print-triple --print-cpu-features --print-page-size  \
-# RUN:   | FileCheck %s -DVERSION=%macos-product-version
+# RUN:   | FileCheck %s -DARCH=%target-arch -DVERSION=%macos-product-version
 
-# CHECK: {{arm64e?}}-apple-macosx[[VERSION]]
+# CHECK: [[ARCH]]-apple-macosx[[VERSION]]
 # CHECK-NEXT: {{4096|16384}}
-# CHECK-NEXT: {{(\+[a-z0-9_.]+,)*\+neon(,\+[a-z0-9_.]+)*}}
+# CHECK-NEXT: {{^\+[a-z0-9_.]+(,\+[a-z0-9_.]+)*$}}
diff --git a/orc-rt/test/regression/linux/check-rt-process-info.test b/orc-rt/test/regression/linux/check-rt-process-info.test
index 04bf20a94aa8d..160be336d40cf 100644
--- a/orc-rt/test/regression/linux/check-rt-process-info.test
+++ b/orc-rt/test/regression/linux/check-rt-process-info.test
@@ -1,4 +1,5 @@
-# RUN: orc-rt-process-info-check --print-triple --print-page-size | FileCheck %s
+# RUN: orc-rt-process-info-check --print-triple --print-page-size \
+# RUN:   | FileCheck %s -DARCH=%target-arch
 
-# CHECK: -linux
+# CHECK: {{^}}[[ARCH]]-{{.*}}-linux
 # CHECK-NEXT: {{4096|16384}}
diff --git a/orc-rt/test/regression/lit.cfg.py b/orc-rt/test/regression/lit.cfg.py
index fa99beabb1fb1..423a3e0b2fc6d 100644
--- a/orc-rt/test/regression/lit.cfg.py
+++ b/orc-rt/test/regression/lit.cfg.py
@@ -90,3 +90,8 @@ def add_logging_features():
 if platform.system() == "Darwin":
     config.substitutions.append(("%macos-product-version", platform.mac_ver()[0]))
 config.substitutions.append(("%target_triple", config.target_triple))
+
+# The architecture the runtime was built for, so tests can check the triple it
+# reports against an independent source.
+config.substitutions.append(
+    ("%target-arch", config.target_triple.split("-")[0]))

>From 5ff7eab79c7027a676d7f71de5d6b5a5feb0f242 Mon Sep 17 00:00:00 2001
From: Lang Hames <lhames at apple.com>
Date: Thu, 10 Sep 2026 22:47:00 +1000
Subject: [PATCH 2/2] silence pthyon linter

---
 orc-rt/test/regression/lit.cfg.py | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/orc-rt/test/regression/lit.cfg.py b/orc-rt/test/regression/lit.cfg.py
index 423a3e0b2fc6d..64210c4262c84 100644
--- a/orc-rt/test/regression/lit.cfg.py
+++ b/orc-rt/test/regression/lit.cfg.py
@@ -93,5 +93,4 @@ def add_logging_features():
 
 # The architecture the runtime was built for, so tests can check the triple it
 # reports against an independent source.
-config.substitutions.append(
-    ("%target-arch", config.target_triple.split("-")[0]))
+config.substitutions.append(("%target-arch", config.target_triple.split("-")[0]))



More information about the llvm-commits mailing list