[llvm] e6e69f3 - [cfi-verify tests]: Skip two x86-only tests if x86 is not enabled

Nico Weber via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 11 14:31:53 PDT 2023


Author: Nico Weber
Date: 2023-09-11T14:31:39-07:00
New Revision: e6e69f3bd4b848da8c34e4418812c25fc8749950

URL: https://github.com/llvm/llvm-project/commit/e6e69f3bd4b848da8c34e4418812c25fc8749950
DIFF: https://github.com/llvm/llvm-project/commit/e6e69f3bd4b848da8c34e4418812c25fc8749950.diff

LOG: [cfi-verify tests]: Skip two x86-only tests if x86 is not enabled

With this, check-llvm passes on an arm mac if x86 isn't in
LLVM_TARGETS_TO_BUILD.

This pattern to skip the tests if x86 isn't enabled is used
in every other test in this file.

Added: 
    

Modified: 
    llvm/unittests/tools/llvm-cfi-verify/FileAnalysis.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/unittests/tools/llvm-cfi-verify/FileAnalysis.cpp b/llvm/unittests/tools/llvm-cfi-verify/FileAnalysis.cpp
index aca9f393c7ec8c8..e46cbbd3455a4ec 100644
--- a/llvm/unittests/tools/llvm-cfi-verify/FileAnalysis.cpp
+++ b/llvm/unittests/tools/llvm-cfi-verify/FileAnalysis.cpp
@@ -707,6 +707,8 @@ TEST_F(BasicX86FileAnalysisTest, CFIProtectionComplexExample) {
 }
 
 TEST_F(BasicX86FileAnalysisTest, UndefSearchLengthOneTest) {
+  if (!SuccessfullyInitialised)
+    GTEST_SKIP();
   Analysis.parseSectionContents(
       {
           0x77, 0x0d,                   // 0x688118: ja 0x688127 [+12]
@@ -726,6 +728,8 @@ TEST_F(BasicX86FileAnalysisTest, UndefSearchLengthOneTest) {
 }
 
 TEST_F(BasicX86FileAnalysisTest, UndefSearchLengthOneTestFarAway) {
+  if (!SuccessfullyInitialised)
+    GTEST_SKIP();
   Analysis.parseSectionContents(
       {
           0x74, 0x73,                         // 0x7759eb: je 0x775a60


        


More information about the llvm-commits mailing list