[REACTOS]: Add a "testdata" subdirectory in %SystemRoot%\bin\ where you can put all...
authorHermès Bélusca-Maïto <hermes.belusca-maito@reactos.org>
Sun, 26 Apr 2015 17:47:55 +0000 (17:47 +0000)
committerHermès Bélusca-Maïto <hermes.belusca-maito@reactos.org>
Sun, 26 Apr 2015 17:47:55 +0000 (17:47 +0000)
svn path=/trunk/; revision=67442

reactos/cmake/CMakeMacros.cmake
rostests/CMakeLists.txt
rostests/apitests/msvcrt/CmdLineUtil/CMakeLists.txt
rostests/testdata/README.txt [new file with mode: 0644]

index 8a03329..a59bb26 100644 (file)
@@ -171,7 +171,7 @@ macro(dir_to_num dir var)
         set(${var} 6)
     elseif(${dir} STREQUAL reactos/bin)
         set(${var} 7)
-    elseif(${dir} STREQUAL reactos/bin/data)
+    elseif(${dir} STREQUAL reactos/bin/testdata)
         set(${var} 8)
     elseif(${dir} STREQUAL reactos/media)
         set(${var} 9)
index bec60c4..cba0ccc 100644 (file)
@@ -12,4 +12,13 @@ add_subdirectory(tests)
 #add_subdirectory(win32)
 add_subdirectory(winetests)
 
+
+## Extra files needed for the various tests can be added into the "testdata" subdirectory.
+if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/testdata/)
+    file(GLOB_RECURSE TESTDATA_FILES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}/testdata/ ${CMAKE_CURRENT_SOURCE_DIR}/testdata/*)
+    foreach(item ${TESTDATA_FILES})
+        add_cd_file(FILE ${CMAKE_CURRENT_SOURCE_DIR}/testdata/${item} DESTINATION reactos/bin/testdata NAME_ON_CD ${item} FOR regtest)
+    endforeach(item)
+endif()
+
 end_module_group()
index ebe8f30..88b541e 100644 (file)
@@ -2,4 +2,4 @@
 add_executable(CmdLineUtil CmdLineUtil.c)
 set_module_type(CmdLineUtil win32gui UNICODE)
 add_importlibs(CmdLineUtil msvcrt kernel32 ntdll)
-add_cd_file(TARGET CmdLineUtil DESTINATION reactos/bin/data FOR all)
+add_cd_file(TARGET CmdLineUtil DESTINATION reactos/bin/testdata FOR all)
diff --git a/rostests/testdata/README.txt b/rostests/testdata/README.txt
new file mode 100644 (file)
index 0000000..2daef05
--- /dev/null
@@ -0,0 +1,2 @@
+This directory contains all the extra files needed for the various tests to run.
+They are copied into the subdirectory %SystemRoot%\bin\testdata.