Skip to content

Commit

Permalink
test: improve testing composition
Browse files Browse the repository at this point in the history
  • Loading branch information
WhiredPlanck committed Oct 28, 2023
1 parent d77449c commit c77a83d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/windows-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 2 additions & 5 deletions test/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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}
Expand All @@ -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")

0 comments on commit c77a83d

Please sign in to comment.