diff options
author | Jan Dalheimer <jan@dalheimer.de> | 2014-01-05 23:24:05 +0100 |
---|---|---|
committer | Jan Dalheimer <jan@dalheimer.de> | 2014-01-05 23:24:05 +0100 |
commit | 6961525faadf5d16fd1323af848ef88b7e1f26d4 (patch) | |
tree | 38bb0659d536bf42d7dfe07886a936d8bce78b5e /tests/CMakeLists.txt | |
parent | becaebd60d3c268dd9f95561afbe74bb8cd5f1e1 (diff) | |
download | MultiMC-6961525faadf5d16fd1323af848ef88b7e1f26d4.tar MultiMC-6961525faadf5d16fd1323af848ef88b7e1f26d4.tar.gz MultiMC-6961525faadf5d16fd1323af848ef88b7e1f26d4.tar.lz MultiMC-6961525faadf5d16fd1323af848ef88b7e1f26d4.tar.xz MultiMC-6961525faadf5d16fd1323af848ef88b7e1f26d4.zip |
Unbreak and reactivate the some UpdateChecker tests
Diffstat (limited to 'tests/CMakeLists.txt')
-rw-r--r-- | tests/CMakeLists.txt | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 2d851404..cc7d1a11 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -84,9 +84,18 @@ if(MultiMC_CODE_COVERAGE) add_custom_target(MultiMC_RUN_TESTS DEPENDS MultiMC_GENERATE_COVERAGE_HTML) endif(MultiMC_CODE_COVERAGE) +set(MultiMC_TEST_DATA_PATH "${CMAKE_CURRENT_BINARY_DIR}/data") +if(UNIX) + # on unix we get the third / from the filename + set(MultiMC_TEST_DATA_PATH "file://${MultiMC_TEST_DATA_PATH}") +else() + # we don't on windows, so we have to add it ourselves + set(MultiMC_TEST_DATA_PATH "file:///${MultiMC_TEST_DATA_PATH}") +endif() +file(GLOB data_files "data/*") +foreach(data_file ${data_files}) + get_filename_component(filename ${data_file} NAME) + configure_file(${data_file} ${CMAKE_CURRENT_BINARY_DIR}/data/${filename} @ONLY) +endforeach() -add_custom_target(MultiMC_Test_Data - ALL - COMMAND ${CMAKE_COMMAND} -E remove_directory ${CMAKE_CURRENT_BINARY_DIR}/data - COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR}/data ${CMAKE_CURRENT_BINARY_DIR}/data -) +configure_file(test_config.h.in test_config.h @ONLY) |