Skip to content

change(windows): add unit testing to keyman32 build#15244

Merged
mcdurdin merged 1 commit intomasterfrom
change/windows/add-unit-tests-to-keyman32-build
Nov 28, 2025
Merged

change(windows): add unit testing to keyman32 build#15244
mcdurdin merged 1 commit intomasterfrom
change/windows/add-unit-tests-to-keyman32-build

Conversation

@mcdurdin
Copy link
Copy Markdown
Member

@mcdurdin mcdurdin commented Nov 27, 2025

Rename keyman-engine-tests.vcxproj to keyman32.tests.vcxproj, move up a folder, rename other files to match test filename conventions, update vcxproj for vs2022, and build and run this from build.sh:test.

Also remove keyman-engine.vcxproj, instead integrating the static lib version of keyman32 into keyman32.vcxproj. One day in the future, we could split back the other way, and have the DLL be essentially a link action from the .lib, but that's higher complexity to setup.

Add a configuration step to install NuGet packages for Google Test specifically for keyman32.tests.vcxproj. If we add Google Test to other msbuild projects, we could move the packages/ up to top level of the repo in the future (similar to node_modules) to reduce number of configuration downloads.

Build-bot: skip build:windows,developer
Test-bot: skip

Tests are running:

09:26:34       Running main() from gtest_main.cpp with memory leak detection
09:26:34       [==========] Running 7 tests from 3 test cases.
09:26:34       [----------] Global test environment set-up.
09:26:34       [----------] 5 tests from AppContext
09:26:34       [ RUN      ] AppContext.Get_Max_buff
09:26:34       [       OK ] AppContext.Get_Max_buff (0 ms)
09:26:34       [ RUN      ] AppContext.Get_small_buff
09:26:34       [       OK ] AppContext.Get_small_buff (0 ms)
09:26:34       [ RUN      ] AppContext.Get_split_surrogate
09:26:34       [       OK ] AppContext.Get_split_surrogate (0 ms)
09:26:34       [ RUN      ] AppContext.BufMax_LastChar
09:26:34       [       OK ] AppContext.BufMax_LastChar (0 ms)
09:26:34       [ RUN      ] AppContext.AppContext_Delete
09:26:34       [       OK ] AppContext.AppContext_Delete (0 ms)
09:26:34       [----------] 5 tests from AppContext (0 ms total)
09:26:34       
09:26:34       [----------] 1 test from KEYBOARDOPTIONS
09:26:34       [ RUN      ] KEYBOARDOPTIONS.SetupCoreEnvironment
09:26:34       [       OK ] KEYBOARDOPTIONS.SetupCoreEnvironment (31 ms)
09:26:34       [----------] 1 test from KEYBOARDOPTIONS (31 ms total)
09:26:34       
09:26:34       [----------] 1 test from KMPROCESSACTIONS
09:26:34       [ RUN      ] KMPROCESSACTIONS.processUnicodeChartest
09:26:34       [       OK ] KMPROCESSACTIONS.processUnicodeChartest (0 ms)
09:26:34       [----------] 1 test from KMPROCESSACTIONS (0 ms total)
09:26:34       
09:26:34       [----------] Global test environment tear-down
09:26:34       [==========] 7 tests from 3 test cases ran. (31 ms total)
09:26:34       [  PASSED  ] 7 tests.
09:26:34       [windows/src/engine/keyman32] ## test:x86 completed successfully

Rename keyman-engine-tests.vcxproj to keyman32.tests.vcxproj, move up a
folder, rename other files to match test filename conventions, update
vcxproj for vs2022, and build and run this from build.sh:test.

Also remove keyman-engine.vcxproj, instead integrating the static lib
version of keyman32 into keyman32.vcxproj. One day in the future, we
could split back the other way, and have the DLL be essentially a link
action from the .lib, but that's higher complexity to setup.

Add a configuration step to install NuGet packages for Google Test
specifically for keyman32.tests.vcxproj. If we add Google Test to other
msbuild projects, we could move the packages/ up to top level of the
repo in the future (similar to node_modules) to reduce number of
configuration downloads.

Build-bot: skip build:windows,developer
Test-bot: skip
@github-project-automation github-project-automation bot moved this to Todo in Keyman Nov 27, 2025
@github-actions github-actions bot added windows/ windows/engine/ resources/ change Minor change in functionality, but not new labels Nov 27, 2025
@mcdurdin mcdurdin requested a review from rc-swag November 27, 2025 08:17
@keymanapp-test-bot
Copy link
Copy Markdown

keymanapp-test-bot bot commented Nov 27, 2025

User Test Results

Test specification and instructions

User tests are not required

Test Artifacts

  • Developer
    • Keyman Developer - build : all tests passed (no artifacts on BuildLevel "build")
    • Compiler Regression Tests - build : all tests passed (no artifacts on BuildLevel "build")
    • Keyman Developer (old PRs) - build : all tests passed (no artifacts on BuildLevel "build")
    • kmcomp.zip - build : all tests passed (no artifacts on BuildLevel "build")
    • kmcomp.zip (old PRs) - build : all tests passed (no artifacts on BuildLevel "build")
  • Keyboards
    • Test Keyboards - build : all tests passed (no artifacts on BuildLevel "build")
  • Windows
    • Keyman for Windows - build : all tests passed (no artifacts on BuildLevel "build")
    • FirstVoices Keyboards for Windows - build : all tests passed (no artifacts on BuildLevel "build")
    • FirstVoices Keyboards for Windows (old PRs) - build : all tests passed (no artifacts on BuildLevel "build")
    • Keyman for Windows (old PRs) - build : all tests passed (no artifacts on BuildLevel "build")
    • Text Editor (32 bit) - build : all tests passed (no artifacts on BuildLevel "build")
    • Text Editor (64 bit) - build : all tests passed (no artifacts on BuildLevel "build")

@keymanapp-test-bot keymanapp-test-bot bot added this to the A19S17 milestone Nov 27, 2025
Copy link
Copy Markdown
Contributor

@rc-swag rc-swag left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM
this is going to be fun merging into epic/win-arm

@mcdurdin
Copy link
Copy Markdown
Member Author

this is going to be fun merging into epic/win-arm

Yeah, this was actually giving me pause on doing this, but I reckon I'll manage when I do the epic-master-merge next week

@mcdurdin mcdurdin merged commit 0949484 into master Nov 28, 2025
13 checks passed
@mcdurdin mcdurdin deleted the change/windows/add-unit-tests-to-keyman32-build branch November 28, 2025 09:48
@github-project-automation github-project-automation bot moved this from Todo to Done in Keyman Nov 28, 2025
@keyman-server
Copy link
Copy Markdown
Collaborator

Changes in this pull request will be available for download in Keyman version 19.0.167-alpha

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

change Minor change in functionality, but not new resources/ windows/engine/ windows/

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

3 participants