diff --git a/.travis.yml b/.travis.yml index a5a0309f..b6c9ac3c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -69,9 +69,9 @@ before_script: script: - make all - - ./tests - - ./api-tests - - ./gui_tests + - ./loot_api_internals_tests + - ./loot_api_tests + - ./loot_gui_tests after_success: - cd $TRAVIS_BUILD_DIR diff --git a/CMakeLists.txt b/CMakeLists.txt index 935a991b..2e8e5e2c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -436,9 +436,9 @@ ENDIF () ############################## # Build tests. -add_executable (tests ${LOOT_API_SRC} ${LOOT_API_HEADERS} ${LOOT_TESTS_SRC} ${LOOT_TESTS_HEADERS}) -add_dependencies (tests libespm libgit2 libloadorder pseudosem yaml-cpp GTest testing-metadata testing-plugins) -target_link_libraries(tests ${Boost_LIBRARIES} ${LIBGIT2_LIBRARIES} ${LIBLOADORDER_LIBRARIES} ${LOOT_LIBS} ${YAML_CPP_LIBRARIES} ${GTEST_LIBRARIES} ${LIBLOADORDER_LIBRARIES}) +add_executable (loot_api_internals_tests ${LOOT_API_SRC} ${LOOT_API_HEADERS} ${LOOT_TESTS_SRC} ${LOOT_TESTS_HEADERS}) +add_dependencies (loot_api_internals_tests libespm libgit2 libloadorder pseudosem yaml-cpp GTest testing-metadata testing-plugins) +target_link_libraries(loot_api_internals_tests ${Boost_LIBRARIES} ${LIBGIT2_LIBRARIES} ${LIBLOADORDER_LIBRARIES} ${LOOT_LIBS} ${YAML_CPP_LIBRARIES} ${GTEST_LIBRARIES} ${LIBLOADORDER_LIBRARIES}) # Build API. add_library (loot_api ${LOOT_API_SRC} ${LOOT_API_HEADERS}) @@ -446,9 +446,9 @@ add_dependencies (loot_api libespm libgit2 libloadorder pseudosem yaml-cpp) target_link_libraries(loot_api ${Boost_LIBRARIES} ${LIBGIT2_LIBRARIES} ${LIBLOADORDER_LIBRARIES} ${LOOT_LIBS} ${YAML_CPP_LIBRARIES}) # Build API tests. -add_executable (api-tests ${LOOT_API_TESTS_SRC} ${LOOT_API_TESTS_HEADERS}) -add_dependencies (api-tests loot_api GTest testing-metadata testing-plugins) -target_link_libraries(api-tests loot_api ${GTEST_LIBRARIES}) +add_executable (loot_api_tests ${LOOT_API_TESTS_SRC} ${LOOT_API_TESTS_HEADERS}) +add_dependencies (loot_api_tests loot_api GTest testing-metadata testing-plugins) +target_link_libraries(loot_api_tests loot_api ${GTEST_LIBRARIES}) # Build application. add_executable (LOOT ${LOOT_GUI_SRC} ${LOOT_GUI_HEADERS}) @@ -456,9 +456,9 @@ add_dependencies (LOOT cef loot_api) target_link_libraries(LOOT ${CEF_LIBRARIES} loot_api ${LOOT_GUI_LIBS}) # Build application tests. -add_executable (gui_tests ${LOOT_GUI_TESTS_SRC} ${LOOT_GUI_TESTS_HEADERS}) -add_dependencies (gui_tests loot_api GTest testing-metadata testing-plugins) -target_link_libraries(gui_tests loot_api ${GTEST_LIBRARIES}) +add_executable (loot_gui_tests ${LOOT_GUI_TESTS_SRC} ${LOOT_GUI_TESTS_HEADERS}) +add_dependencies (loot_gui_tests loot_api GTest testing-metadata testing-plugins) +target_link_libraries(loot_gui_tests loot_api ${GTEST_LIBRARIES}) ############################## # Set Target-Specific Flags @@ -475,7 +475,7 @@ ENDIF () IF (CMAKE_SYSTEM_NAME MATCHES "Windows") - set_target_properties (tests PROPERTIES COMPILE_DEFINITIONS "${COMPILE_DEFINITIONS} LOOT_STATIC") + set_target_properties (loot_api_internals_tests PROPERTIES COMPILE_DEFINITIONS "${COMPILE_DEFINITIONS} LOOT_STATIC") IF (BUILD_SHARED_LIBS) set_target_properties (loot_api PROPERTIES COMPILE_DEFINITIONS "${COMPILE_DEFINITIONS} LOOT_EXPORT") ELSE () @@ -526,22 +526,22 @@ add_custom_command(TARGET LOOT POST_BUILD # Copy testing metadata ExternalProject_Get_Property(testing-metadata SOURCE_DIR) -add_custom_command(TARGET tests POST_BUILD +add_custom_command(TARGET loot_api_internals_tests POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy_directory ${SOURCE_DIR} - "$/testing-metadata") -add_custom_command(TARGET api-tests POST_BUILD + "$/testing-metadata") +add_custom_command(TARGET loot_api_tests POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy_directory ${SOURCE_DIR} - "$/testing-metadata") + "$/testing-metadata") # Copy testing plugins ExternalProject_Get_Property(testing-plugins SOURCE_DIR) -add_custom_command(TARGET tests POST_BUILD +add_custom_command(TARGET loot_api_internals_tests POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy_directory ${SOURCE_DIR} - $) -add_custom_command(TARGET api-tests POST_BUILD + $) +add_custom_command(TARGET loot_api_tests POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy_directory ${SOURCE_DIR} - $) + $) diff --git a/appveyor.yml b/appveyor.yml index f715907e..63d2673b 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -53,8 +53,8 @@ build_script: if ($env:PLATFORM -eq 'Win32') { msbuild "c:\projects\loot\build\LOOT.sln" /verbosity:minimal /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" } else { - msbuild "c:\projects\loot\build\tests.vcxproj" /verbosity:minimal /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" - msbuild "c:\projects\loot\build\api-tests.vcxproj" /verbosity:minimal /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" + msbuild "c:\projects\loot\build\loot_api_internals_tests.vcxproj" /verbosity:minimal /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" + msbuild "c:\projects\loot\build\loot_api_tests.vcxproj" /verbosity:minimal /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" } test_script: @@ -64,11 +64,11 @@ test_script: npm test } - cd %APPVEYOR_BUILD_FOLDER%\build\%CONFIGURATION% - - tests.exe --gtest_output=xml:tests.xml - - api-tests.exe --gtest_output=xml:api-tests.xml + - loot_api_internals_tests.exe --gtest_output=xml:loot_api_internals_tests.xml + - loot_api_tests.exe --gtest_output=xml:loot_api_tests.xml - ps: | if ($env:PLATFORM -eq 'Win32') { - ./gui_tests.exe --gtest_output=xml:gui_tests.xml + ./loot_gui_tests.exe --gtest_output=xml:loot_gui_tests.xml } after_test: @@ -164,9 +164,9 @@ on_success: - ps: scripts\appveyor\update_masterlist_branches.ps1 on_finish: - - ps: (New-Object System.Net.WebClient).UploadFile("https://ci.appveyor.com/api/testresults/junit/$($env:APPVEYOR_JOB_ID)", "$($env:APPVEYOR_BUILD_FOLDER)\build\$($env:CONFIGURATION)\tests.xml") - - ps: (New-Object System.Net.WebClient).UploadFile("https://ci.appveyor.com/api/testresults/junit/$($env:APPVEYOR_JOB_ID)", "$($env:APPVEYOR_BUILD_FOLDER)\build\$($env:CONFIGURATION)\api-tests.xml") + - ps: (New-Object System.Net.WebClient).UploadFile("https://ci.appveyor.com/api/testresults/junit/$($env:APPVEYOR_JOB_ID)", "$($env:APPVEYOR_BUILD_FOLDER)\build\$($env:CONFIGURATION)\loot_api_internals_tests.xml") + - ps: (New-Object System.Net.WebClient).UploadFile("https://ci.appveyor.com/api/testresults/junit/$($env:APPVEYOR_JOB_ID)", "$($env:APPVEYOR_BUILD_FOLDER)\build\$($env:CONFIGURATION)\loot_api_tests.xml") - ps: | if ($env:PLATFORM -eq 'Win32') { - (New-Object System.Net.WebClient).UploadFile("https://ci.appveyor.com/api/testresults/junit/$($env:APPVEYOR_JOB_ID)", "$($env:APPVEYOR_BUILD_FOLDER)\build\$($env:CONFIGURATION)\gui_tests.xml") + (New-Object System.Net.WebClient).UploadFile("https://ci.appveyor.com/api/testresults/junit/$($env:APPVEYOR_JOB_ID)", "$($env:APPVEYOR_BUILD_FOLDER)\build\$($env:CONFIGURATION)\loot_gui_tests.xml") }