[llvm] [orc-rt] Make check-rt-process-info.test test more generic. (PR #225314)
Lang Hames via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 22 00:03:10 PDT 2026
https://github.com/lhames created https://github.com/llvm/llvm-project/pull/225314
Add %host-arch and %host-os substitutions to orc-rt-lit's config, and use them to make the regression test platform agnostic.
>From a6e8bdabbd6dbe62ff22e80f70114271cf86f5a0 Mon Sep 17 00:00:00 2001
From: Lang Hames <lhames at gmail.com>
Date: Tue, 22 Sep 2026 16:57:13 +1000
Subject: [PATCH] [orc-rt] Make check-rt-process-info.test test more generic.
Add %host-arch and %host-os substitutions to orc-rt-lit's config, and
use them to make the regression test platform agnostic.
---
orc-rt/test/regression/darwin/check-rt-process-info.test | 6 ------
orc-rt/test/regression/lit.cfg.py | 7 +++++++
2 files changed, 7 insertions(+), 6 deletions(-)
delete mode 100644 orc-rt/test/regression/darwin/check-rt-process-info.test
diff --git a/orc-rt/test/regression/darwin/check-rt-process-info.test b/orc-rt/test/regression/darwin/check-rt-process-info.test
deleted file mode 100644
index 8df2c09477c89..0000000000000
--- a/orc-rt/test/regression/darwin/check-rt-process-info.test
+++ /dev/null
@@ -1,6 +0,0 @@
-# RUN: orc-rt-process-info-check --print-triple --print-cpu-features --print-page-size \
-# RUN: | FileCheck %s -DARCH=%target-arch -DVERSION=%macos-product-version
-
-# CHECK: [[ARCH]]-apple-macosx[[VERSION]]
-# CHECK-NEXT: {{4096|16384}}
-# CHECK-NEXT: {{^\+[a-z0-9_.]+(,\+[a-z0-9_.]+)*$}}
diff --git a/orc-rt/test/regression/lit.cfg.py b/orc-rt/test/regression/lit.cfg.py
index 64210c4262c84..3f28ecae5f2f3 100644
--- a/orc-rt/test/regression/lit.cfg.py
+++ b/orc-rt/test/regression/lit.cfg.py
@@ -94,3 +94,10 @@ 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]))
+
+# Add host OS and arch substitutions for host-detection tests.
+config.substitutions.append(("%host-arch", platform.machine()))
+if platform.system() == "Darwin":
+ config.substitutions.append(("%host-os", "macosx"))
+else:
+ config.substitutions.append(("%host-os", platform.system().lower()))
More information about the llvm-commits
mailing list