[libc-commits] [libc] dbca7b4 - [libc] disable syscall test without fullbuild

Michael Jones via libc-commits libc-commits at lists.llvm.org
Fri Sep 30 15:57:18 PDT 2022


Author: Michael Jones
Date: 2022-09-30T15:57:10-07:00
New Revision: dbca7b4b2e6329fea90f9af7653fa0df977f0d77

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

LOG: [libc] disable syscall test without fullbuild

Our syscall implementation depends on a specific macro that's only
defined in our headers. If we're not using our headers, then the test
doesn't work. I've disabled the test in this case because there's no
point in testing the system libc's syscall implementation.

Differential Revision: https://reviews.llvm.org/D134994

Added: 
    

Modified: 
    libc/test/src/unistd/CMakeLists.txt

Removed: 
    


################################################################################
diff  --git a/libc/test/src/unistd/CMakeLists.txt b/libc/test/src/unistd/CMakeLists.txt
index 448116e140b2..d8f3138d253b 100644
--- a/libc/test/src/unistd/CMakeLists.txt
+++ b/libc/test/src/unistd/CMakeLists.txt
@@ -362,17 +362,19 @@ add_libc_unittest(
     libc.src.unistd.geteuid
 )
 
-add_libc_unittest(
-  syscall_test
-  SUITE
-    libc_unistd_unittests
-  SRCS
-    syscall_test.cpp
-  DEPENDS
-    libc.src.unistd.__llvm_libc_syscall
-    libc.include.errno
-    libc.include.unistd
-    libc.include.fcntl
-    libc.include.sys_syscall
-    libc.test.errno_setter_matcher
-)
+if(LLVM_LIBC_FULL_BUILD)
+  add_libc_unittest(
+    syscall_test
+    SUITE
+      libc_unistd_unittests
+    SRCS
+      syscall_test.cpp
+    DEPENDS
+      libc.src.unistd.__llvm_libc_syscall
+      libc.include.errno
+      libc.include.unistd
+      libc.include.fcntl
+      libc.include.sys_syscall
+      libc.test.errno_setter_matcher
+  )
+endif()


        


More information about the libc-commits mailing list