[libc] fix strtointmax tests
authorMichael Jones <michaelrj@google.com>
Wed, 25 Jan 2023 00:08:41 +0000 (16:08 -0800)
committerMichael Jones <michaelrj@google.com>
Wed, 25 Jan 2023 21:58:47 +0000 (13:58 -0800)
The strtointmax tests weren't running because they depend on the same
shared logic as strtol tests and the target for that was being defined
after the inttypes targets, causing them to be skipped. This patch moves
the inttypes test directory later in the order so that the shared tests
are defined before inttypes tests try to use them.

Reviewed By: sivachandra, lntue

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

libc/test/src/CMakeLists.txt
libc/test/src/inttypes/CMakeLists.txt

index 6a9ab8f..e47a245 100644 (file)
@@ -30,10 +30,10 @@ add_subdirectory(__support)
 add_subdirectory(ctype)
 add_subdirectory(errno)
 add_subdirectory(fenv)
-add_subdirectory(inttypes)
 add_subdirectory(math)
 add_subdirectory(string)
 add_subdirectory(stdlib)
+add_subdirectory(inttypes)
 add_subdirectory(stdio)
 
 if(${LIBC_TARGET_OS} STREQUAL "linux")
index 1507941..7fee729 100644 (file)
@@ -8,7 +8,7 @@ add_libc_unittest(
     strtoimax_test.cpp
   DEPENDS
     libc.src.inttypes.strtoimax
-    libc.test.stdlib.strtol_test_support
+    libc.test.src.stdlib.strtol_test_support
 )
 
 add_libc_unittest(
@@ -19,7 +19,7 @@ add_libc_unittest(
     strtoumax_test.cpp
   DEPENDS
     libc.src.inttypes.strtoumax
-    libc.test.stdlib.strtol_test_support
+    libc.test.src.stdlib.strtol_test_support
 )
 
 add_libc_unittest(