https://git.reactos.org/?p=reactos.git;a=commitdiff;h=2d8c2cd8dcc9199d6072a…
commit 2d8c2cd8dcc9199d6072a43560d70db4002863f5
Author: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org>
AuthorDate: Wed Jul 31 13:07:38 2024 +0200
Commit: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org>
CommitDate: Wed Jul 31 13:46:00 2024 +0200
[SETUPLIB][ROSTESTS] Move setuplib unittests to rostests directory.
Addendum to commit 6289183dcd ; fixes our MSVC_x64 builder.
---
base/setup/lib/CMakeLists.txt | 6 ------
modules/rostests/CMakeLists.txt | 1 +
modules/rostests/unittests/CMakeLists.txt | 1 +
.../rostests/unittests/setuplib}/CMakeLists.txt | 11 ++++++-----
.../rostests/unittests/setuplib}/IsValidInstallDirectory.c | 0
.../rostests/unittests/setuplib}/precomp.h | 3 +--
.../rostests/unittests/setuplib}/testlist.c | 0
7 files changed, 9 insertions(+), 13 deletions(-)
diff --git a/base/setup/lib/CMakeLists.txt b/base/setup/lib/CMakeLists.txt
index acd7cd5e01a..cc79ec83ef8 100644
--- a/base/setup/lib/CMakeLists.txt
+++ b/base/setup/lib/CMakeLists.txt
@@ -33,9 +33,3 @@ list(APPEND SOURCE
add_library(setuplib ${SOURCE})
add_pch(setuplib precomp.h SOURCE)
add_dependencies(setuplib xdk) # psdk
-
-
-## Unit-tests
-if(ENABLE_ROSTESTS)
- add_subdirectory(unittests)
-endif()
diff --git a/modules/rostests/CMakeLists.txt b/modules/rostests/CMakeLists.txt
index a5066959372..47b8be3aece 100644
--- a/modules/rostests/CMakeLists.txt
+++ b/modules/rostests/CMakeLists.txt
@@ -17,6 +17,7 @@ endif()
#add_subdirectory(regtests)
add_subdirectory(rosautotest)
add_subdirectory(tests)
+add_subdirectory(unittests)
add_subdirectory(win32)
add_subdirectory(winetests)
diff --git a/modules/rostests/unittests/CMakeLists.txt
b/modules/rostests/unittests/CMakeLists.txt
new file mode 100644
index 00000000000..4578836648e
--- /dev/null
+++ b/modules/rostests/unittests/CMakeLists.txt
@@ -0,0 +1 @@
+add_subdirectory(setuplib)
diff --git a/base/setup/lib/unittests/CMakeLists.txt
b/modules/rostests/unittests/setuplib/CMakeLists.txt
similarity index 56%
rename from base/setup/lib/unittests/CMakeLists.txt
rename to modules/rostests/unittests/setuplib/CMakeLists.txt
index 199e31e2dd1..de454898e67 100644
--- a/base/setup/lib/unittests/CMakeLists.txt
+++ b/modules/rostests/unittests/setuplib/CMakeLists.txt
@@ -1,17 +1,18 @@
PROJECT(setuplib_unittest)
-include_directories(${REACTOS_SOURCE_DIR}/modules/rostests/apitests/include)
+include_directories(
+ ${REACTOS_SOURCE_DIR}/modules/rostests/apitests/include
+ ${REACTOS_SOURCE_DIR}/base/setup/lib)
-list(APPEND TEST_SOURCE
+list(APPEND SOURCE
IsValidInstallDirectory.c
testlist.c
precomp.h)
-add_executable(setuplib_unittest ${TEST_SOURCE})
-
+add_executable(setuplib_unittest ${SOURCE})
target_link_libraries(setuplib_unittest setuplib ${PSEH_LIB})
set_module_type(setuplib_unittest win32cui)
add_importlibs(setuplib_unittest msvcrt kernel32 ntdll)
-#add_pch(setuplib_unittest precomp.h TEST_SOURCE)
+#add_pch(setuplib_unittest precomp.h SOURCE)
add_rostests_file(TARGET setuplib_unittest)
diff --git a/base/setup/lib/unittests/IsValidInstallDirectory.c
b/modules/rostests/unittests/setuplib/IsValidInstallDirectory.c
similarity index 100%
rename from base/setup/lib/unittests/IsValidInstallDirectory.c
rename to modules/rostests/unittests/setuplib/IsValidInstallDirectory.c
diff --git a/base/setup/lib/unittests/precomp.h
b/modules/rostests/unittests/setuplib/precomp.h
similarity index 91%
rename from base/setup/lib/unittests/precomp.h
rename to modules/rostests/unittests/setuplib/precomp.h
index 8cb8823d5ec..4de1c3296e7 100644
--- a/base/setup/lib/unittests/precomp.h
+++ b/modules/rostests/unittests/setuplib/precomp.h
@@ -19,11 +19,10 @@
#include <windef.h>
#include <winbase.h>
-//#include <strsafe.h>
#define NTOS_MODE_USER
#include <ndk/rtlfuncs.h>
-#include <../setuplib.h>
+#include <setuplib.h>
/* EOF */
diff --git a/base/setup/lib/unittests/testlist.c
b/modules/rostests/unittests/setuplib/testlist.c
similarity index 100%
rename from base/setup/lib/unittests/testlist.c
rename to modules/rostests/unittests/setuplib/testlist.c