summaryrefslogtreecommitdiffstats
path: root/mmc_updater/src/tests/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'mmc_updater/src/tests/CMakeLists.txt')
-rw-r--r--mmc_updater/src/tests/CMakeLists.txt47
1 files changed, 22 insertions, 25 deletions
diff --git a/mmc_updater/src/tests/CMakeLists.txt b/mmc_updater/src/tests/CMakeLists.txt
index 5de9d096..79402245 100644
--- a/mmc_updater/src/tests/CMakeLists.txt
+++ b/mmc_updater/src/tests/CMakeLists.txt
@@ -5,21 +5,19 @@ if (APPLE)
set(HELPER_SHARED_SOURCES ../StlSymbolsLeopard.cpp)
endif()
-# Create helper binaries for unit tests
-add_executable(oldapp
- old_app.cpp
- ${HELPER_SHARED_SOURCES}
-)
-add_executable(newapp
- new_app.cpp
- ${HELPER_SHARED_SOURCES}
-)
+# # Create helper binaries for unit tests
+# add_executable(oldapp
+# old_app.cpp
+# ${HELPER_SHARED_SOURCES}
+# )
+# add_executable(newapp
+# new_app.cpp
+# ${HELPER_SHARED_SOURCES}
+# )
# Install data files required by unit tests
set(TEST_FILES
file_list.xml
- v2_file_list.xml
- test-update.rb
)
foreach(TEST_FILE ${TEST_FILES})
@@ -31,21 +29,20 @@ endforeach()
# Add unit test binaries
macro(ADD_UPDATER_TEST CLASS)
- set(TEST_TARGET updater_${CLASS})
- add_executable(${TEST_TARGET} ${CLASS}.cpp)
- target_link_libraries(${TEST_TARGET} updatershared)
- add_test(NAME ${TEST_TARGET} COMMAND ${TEST_TARGET})
- if (APPLE)
- set_target_properties(${TEST_TARGET} PROPERTIES LINK_FLAGS "-framework Security -framework Cocoa")
- endif()
+ set(TEST_TARGET updater_${CLASS})
+ unset(srcs)
+ list(APPEND srcs ${CLASS}.cpp)
+ if (WIN32)
+ list(APPEND srcs ${CMAKE_CURRENT_SOURCE_DIR}/test.rc)
+ endif()
+ add_executable(${TEST_TARGET} ${srcs})
+ target_link_libraries(${TEST_TARGET} updatershared)
+ add_test(NAME ${TEST_TARGET} COMMAND ${TEST_TARGET})
+ if (APPLE)
+ set_target_properties(${TEST_TARGET} PROPERTIES LINK_FLAGS "-framework Security -framework Cocoa")
+ endif()
endmacro()
-add_updater_test(TestUpdateScript)
+add_updater_test(TestParseScript)
add_updater_test(TestUpdaterOptions)
add_updater_test(TestFileUtils)
-
-# Add updater that that performs a complete update install
-# and checks the result
-find_program(RUBY_BIN ruby)
-add_test(updater_TestUpdateInstall ${RUBY_BIN} test-update.rb)
-