From: Hermès Bélusca-Maïto Date: Sun, 26 Apr 2015 17:47:55 +0000 (+0000) Subject: [REACTOS]: Add a "testdata" subdirectory in %SystemRoot%\bin\ where you can put all... X-Git-Tag: backups/colins-printing-for-freedom@73041~174 X-Git-Url: https://git.reactos.org/?p=reactos.git;a=commitdiff_plain;h=b4ebdb1ae99e5abc3659c20a41a177e73667610a [REACTOS]: Add a "testdata" subdirectory in %SystemRoot%\bin\ where you can put all needed extra files for the tests. In addition, all the files present in your rostests\testdata local directory of your working copy are also copied into %SystemRoot%\bin\testdata . svn path=/trunk/; revision=67442 --- diff --git a/reactos/cmake/CMakeMacros.cmake b/reactos/cmake/CMakeMacros.cmake index 8a0332921db..a59bb266460 100644 --- a/reactos/cmake/CMakeMacros.cmake +++ b/reactos/cmake/CMakeMacros.cmake @@ -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) diff --git a/rostests/CMakeLists.txt b/rostests/CMakeLists.txt index bec60c432ca..cba0cccad91 100644 --- a/rostests/CMakeLists.txt +++ b/rostests/CMakeLists.txt @@ -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() diff --git a/rostests/apitests/msvcrt/CmdLineUtil/CMakeLists.txt b/rostests/apitests/msvcrt/CmdLineUtil/CMakeLists.txt index ebe8f301a9b..88b541e2e6e 100644 --- a/rostests/apitests/msvcrt/CmdLineUtil/CMakeLists.txt +++ b/rostests/apitests/msvcrt/CmdLineUtil/CMakeLists.txt @@ -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 index 00000000000..2daef05d999 --- /dev/null +++ b/rostests/testdata/README.txt @@ -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.