diff --git a/.github/workflows/windows-build.yml b/.github/workflows/windows-build.yml index c35aca7c09..b5e2071f88 100644 --- a/.github/workflows/windows-build.yml +++ b/.github/workflows/windows-build.yml @@ -171,7 +171,7 @@ jobs: -DBUILD_SHARED_LIBS:BOOL=ON cmake --build build cmake --install build - cd build && cp ./lib/librime.dll ./test + cd build ctest --output-on-failure - name: Create distributable diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 1029fe4857..0f4952b84b 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -1,5 +1,4 @@ aux_source_directory(. rime_test_src) -set(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/test) add_executable(rime_test ${rime_test_src}) target_link_libraries(rime_test ${rime_library} @@ -10,7 +9,5 @@ if(BUILD_SHARED_LIBS) target_compile_definitions(rime_test PRIVATE RIME_IMPORTS) endif(BUILD_SHARED_LIBS) -file(GLOB test_data_files ${PROJECT_SOURCE_DIR}/data/test/*.yaml) -file(COPY ${test_data_files} DESTINATION ${EXECUTABLE_OUTPUT_PATH}) - -add_test(rime_test rime_test) +add_test(NAME rime_test COMMAND rime_test + WORKING_DIRECTORY "${PROJECT_SOURCE_DIR}/data/test")