[clang] [clang-repl] Skip tests for non-linux and non-darwin platforms from #152562 (PR #153005)
Abhinav Kumar via cfe-commits
cfe-commits at lists.llvm.org
Mon Aug 11 08:04:28 PDT 2025
https://github.com/kr-2003 updated https://github.com/llvm/llvm-project/pull/153005
>From 0b6b59b9252aa4b02563054041930bf195f105a2 Mon Sep 17 00:00:00 2001
From: kr-2003 <kumar.kr.abhinav at gmail.com>
Date: Mon, 11 Aug 2025 18:58:42 +0530
Subject: [PATCH 1/3] skip tests for non-linux and non-darwin
---
.../Interpreter/OutOfProcessInterpreterTests.cpp | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/clang/unittests/Interpreter/OutOfProcessInterpreterTests.cpp b/clang/unittests/Interpreter/OutOfProcessInterpreterTests.cpp
index 4d5ef5c70d135..1e261e786c2e8 100644
--- a/clang/unittests/Interpreter/OutOfProcessInterpreterTests.cpp
+++ b/clang/unittests/Interpreter/OutOfProcessInterpreterTests.cpp
@@ -134,6 +134,14 @@ TEST_F(InterpreterTestBase, SanityWithRemoteExecution) {
if (!HostSupportsJIT())
GTEST_SKIP();
+ llvm::Triple SystemTriple(llvm::sys::getProcessTriple());
+
+ // FIXME: In the future, support more platforms beyond linux-x86_64 and macOS.
+ if (!SystemTriple.isOSDarwin() && !SystemTriple.isOSLinux()) {
+ GTEST_SKIP()
+ << "Out-of-process interpreter only supports linux-x86_64 and macos";
+ }
+
std::unique_ptr<Interpreter> Interp = createInterpreterWithRemoteExecution();
using PTU = PartialTranslationUnit;
>From 952fef6fb396acc857a6d110c813c037fb46971e Mon Sep 17 00:00:00 2001
From: kr-2003 <kumar.kr.abhinav at gmail.com>
Date: Mon, 11 Aug 2025 18:58:42 +0530
Subject: [PATCH 2/3] Skip tests for non-linux and non-darwin from llvm#152562
---
.../Interpreter/OutOfProcessInterpreterTests.cpp | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/clang/unittests/Interpreter/OutOfProcessInterpreterTests.cpp b/clang/unittests/Interpreter/OutOfProcessInterpreterTests.cpp
index 4d5ef5c70d135..1e261e786c2e8 100644
--- a/clang/unittests/Interpreter/OutOfProcessInterpreterTests.cpp
+++ b/clang/unittests/Interpreter/OutOfProcessInterpreterTests.cpp
@@ -134,6 +134,14 @@ TEST_F(InterpreterTestBase, SanityWithRemoteExecution) {
if (!HostSupportsJIT())
GTEST_SKIP();
+ llvm::Triple SystemTriple(llvm::sys::getProcessTriple());
+
+ // FIXME: In the future, support more platforms beyond linux-x86_64 and macOS.
+ if (!SystemTriple.isOSDarwin() && !SystemTriple.isOSLinux()) {
+ GTEST_SKIP()
+ << "Out-of-process interpreter only supports linux-x86_64 and macos";
+ }
+
std::unique_ptr<Interpreter> Interp = createInterpreterWithRemoteExecution();
using PTU = PartialTranslationUnit;
>From 2c7e88f7933584a3574a79e4f6c7491d2bf94000 Mon Sep 17 00:00:00 2001
From: kr-2003 <kumar.kr.abhinav at gmail.com>
Date: Mon, 11 Aug 2025 20:34:10 +0530
Subject: [PATCH 3/3] Skip tests for non-linux and non-darwin from llvm#152562
---
clang/unittests/Interpreter/OutOfProcessInterpreterTests.cpp | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/clang/unittests/Interpreter/OutOfProcessInterpreterTests.cpp b/clang/unittests/Interpreter/OutOfProcessInterpreterTests.cpp
index 1e261e786c2e8..9f30998b0deb1 100644
--- a/clang/unittests/Interpreter/OutOfProcessInterpreterTests.cpp
+++ b/clang/unittests/Interpreter/OutOfProcessInterpreterTests.cpp
@@ -137,7 +137,10 @@ TEST_F(InterpreterTestBase, SanityWithRemoteExecution) {
llvm::Triple SystemTriple(llvm::sys::getProcessTriple());
// FIXME: In the future, support more platforms beyond linux-x86_64 and macOS.
- if (!SystemTriple.isOSDarwin() && !SystemTriple.isOSLinux()) {
+ if (!(SystemTriple.isOSDarwin() &&
+ SystemTriple.getArch() == llvm::Triple::Darwin) &&
+ !(SystemTriple.isOSLinux() &&
+ SystemTriple.getArch() == llvm::Triple::x86_64)) {
GTEST_SKIP()
<< "Out-of-process interpreter only supports linux-x86_64 and macos";
}
More information about the cfe-commits
mailing list