Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run ctest to run the test program #731

Merged
merged 1 commit into from Oct 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/workflows/windows-build.yml
Expand Up @@ -183,7 +183,8 @@ jobs:
-DBUILD_SHARED_LIBS:BOOL=ON
cmake --build build
cmake --install build
cd build/test && cp ../lib/librime.dll . && ./rime_test
cd build && cp ./lib/librime.dll ./test
ctest --output-on-failure

- name: Create distributable
run: |
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Expand Up @@ -101,7 +101,7 @@ uninstall-debug:
cmake --build $(build) --target remove

test: release
(cd $(build)/test; ./rime_test)
(cd $(build); ctest --output-on-failure)

test-debug: debug
(cd $(build)/test; ./rime_test)
(cd $(build); ctest --output-on-failure)
5 changes: 2 additions & 3 deletions build-clang.bat
Expand Up @@ -147,8 +147,7 @@ if %build_librime% == 1 (
)

if "%build_test%" == "ON" (
copy /y dist\lib\rime.dll build\test
pushd build\test
.\rime_test.exe || exit
pushd build
ctest --output-on-failure
popd
)
9 changes: 2 additions & 7 deletions build.bat
Expand Up @@ -285,13 +285,8 @@ cmake --build %build_dir% --config %build_config% --target install
if errorlevel 1 goto error

if "%build_test%" == "ON" (
copy /y dist\lib\rime.dll build\test
pushd build\test
if %CMAKE_GENERATOR% == Ninja (
.\rime_test.exe
) else (
.\Release\rime_test.exe
)
pushd %build_dir%
ctest --output-on-failure
popd
)

Expand Down