Commit graph

90 commits

Author SHA1 Message Date
Darcy Wong
b566bcfaf4 fix(common): Set test9469 to Keyman 14 for build warnings 2025-10-30 15:39:19 +07:00
Darcy Wong
3872f57cbf fix(common): Update references to test9469 keyboard 2025-10-30 13:03:09 +07:00
Darcy Wong
66b5aeb614 chore(common): Move test9469 keyboard to common/test/keyboards/ 2025-10-30 11:56:07 +07:00
Darcy Wong
9b426a432a fix(common): Add keyboard description 2025-10-28 15:58:59 +07:00
Darcy Wong
66bf1c5f73 fix(common): Move source files to source/ 2025-10-28 14:11:17 +07:00
Darcy Wong
2e9dfec30c fix(common): Revert kpj changes 2025-10-28 13:33:22 +07:00
Darcy Wong
5bf5a5941f chore(common): Move platformtest to common/test/keyboards 2025-10-28 07:18:49 +07:00
Marc Durdin
f394245636 maint(common): consolidate builder scripts
Clarifies the confusing builder.inc.sh / build-utils.sh distinction by
giving the scripts more appropriate names. Most build scripts should use
builder-full.inc.sh; some helper scripts can use builder-basic.inc.sh.
Documented in resources/build/README.md.

Renames:
* resources/build/builder.inc.sh to resources/build/builder-full.inc.sh
* resources/build/build-utils.sh to resources/build/builder-basic.inc.sh

Other changes:
* Moves Android-specific functions out of builder-basic.inc.sh and into
  android/build.sh.
* Renames functions in builder-basic.inc.sh

More functions may be moved from builder-basic.inc.sh into utils.inc.sh
or other scripts in the future.

Fixes: #14065
Build-bot: build all
Test-bot: skip
2025-08-02 08:11:24 +10:00
Marc Durdin
65158a0526 maint(common): rename shellHelperFunctions.sh to utils.inc.sh
Adds documentation for various functions, removes unused functions (a
couple of simple, very lightly used functions were unDRYed; these could
go back the other way across all shell scripts if necessary). TODO items
noted for follow-up refactoring.

Fixes: #14275
Relates-to: #14269
Build-bot: build all
Test-bot: skip
2025-08-02 06:58:40 +10:00
Darcy Wong
838861d9b6
Update common/test/keyboards/build.sh
Co-authored-by: Marc Durdin <marc@durdin.net>
2025-06-09 21:26:58 -05:00
Darcy Wong
f02553df0b fix(common): Use zip.inc.sh for common test keyboards 2025-06-09 09:43:10 -05:00
Eberhard Beilharz
4d81589f48
maint(common): use unique names for Keyman version variables
Previously the builder scripts defined a readonly `VERSION` environment
variable for the Keyman version. That caused problems when another
(external) script tried to define a `VERSION` variable. We encountered
this problem when trying to move the TC build steps of a configuration
into a single script (#13399) when we tried to source `~/.nvm/nvm.sh`.

This change uses a Keyman specific prefix for the version variables and
renames `VERSION` → `KEYMAN_VERSION` etc. Unfortunately these variables
are used in a lot of places, so this turned out to be a bit of a yak
shave.

Test-bot: skip
2025-05-07 18:46:51 +02:00
Marc Durdin
e1d8abcb5a chore(common): rebuild keyboard fixture with kmcomp 2025-03-22 06:08:16 +07:00
Eberhard Beilharz
930de0f04f
test(common): add baseline test for resetting context 2025-03-21 18:15:46 +01:00
Marc Durdin
03001bd971 chore(common): add unit test for nul and context() in context part of rule
The compiler and Core appear to be working correctly in this situation;
this test verifies Core's behaviour.

Fixes: #13299
2025-03-04 11:22:35 +01:00
Marc Durdin
2b9b8eb419 chore(core): add unit tests to validate nul with index and context
Add 4 test keyboards to validate `nul` and `if` used in conjunction with
`index` and `context` and corresponding references in core unit tests.

Add a script to rebuild baseline keyboards using a copy of kmcomp.exe
16.0.138; this is setup and tested only on Windows (YMMV on WINE, etc).

Add the 4 additional baseline test keyboards to kmcmplib unit tests for
build consistency between kmcomp 16 and kmcmplib 18 (all pass).

Note: two of the new Core tests currently fail. This is expected, see
issue #13304.

Fixes: #13303
2025-02-21 13:06:29 +07:00
Marc Durdin
cd8121ef65 chore(common): builder scripts now use /resources/build/builder.inc.sh
Note: there is a bit of potential confusion about the difference between
/resources/builder.inc.sh (the full implementation for builder scripts),
and /resources/build/builder.inc.sh (the source script that builder
scripts should always use).

This allows us to make assumptions that will always be true for builder
scripts that may not be true for other scripts, such as setting base
folder.
2024-05-02 15:54:31 +07:00
Marc Durdin
0f390d47cc chore(common): maintenance on build scripts - cd
Fixes #11324.

* Always `cd "$THIS_SCRIPT_PATH"`
* Remove unnecessary `cd` from all build.sh
* Remove unnecessary `set -eu` from all build.sh (and `# set -x`)
* Replace old build-utils.sh incantation in a few build.sh scripts
2024-05-02 15:54:29 +07:00
Marc Durdin
457275e46f fix(developer): ensure fatal errors report message or made non-fatal
Fixes #10678.

Some messages have been reduced to ERROR instead of FATAL, as they are
not internal compiler errors.

Where fatal messages are raised, the message will now be reported
through correctly to Sentry.
2024-02-20 11:10:39 +07:00
rc-swag
2f737981f7 fix(core): add expected_context to keyboard unit tests
The unit tests needed to be updated to handle the cases
where the context is invalidated by a keystroke. However, they
still need to be able to verify the final string the application
should recieve. To do this a expected context token has been added
to the unit test format.
2023-12-15 11:20:08 +10:00
rc-swag
8e20fcf6b2 fix(core): missed checking in baseline.kpj 2023-12-14 14:20:05 +10:00
rc-swag
437f938368 fix(core): fix baseline test cases k_000 and k_0008
Test k_000___null_keyboard has been updated as the [RALT K_B] should
cause the context to be reset.

Test k_008___vkey_input__ctrl_alt_2_ has been updated as the [LCTRL LALT
K_B] does not match a keyboard rule the context is deemed invalid and should be
reset.

It could be a consideration to modify the text_store object to better
reflect the state of a applications context however this would mean
we would need two expected results one for the application and one
for the context
2023-12-14 12:25:32 +10:00
rc-swag
4a511bde1e fix(core): clear core context on invalidate cache 2023-12-12 23:49:04 +10:00
Eberhard Beilharz
f56033f537 chore(web): Add TAB output to test keyboard 2023-11-23 18:02:36 +01:00
Eberhard Beilharz
ef8b9888c8 chore(web): Update touch layout 2023-11-23 17:22:24 +01:00
Eberhard Beilharz
fb7c19fee4
chore(core): Add test keyboard for text selection tests
Part of #9073.
2023-11-23 10:51:59 +01:00
Eberhard Beilharz
46cdd07e22
fix(linux): Fix baseline tests
Change the test to use characters in the context that don't appear in
the keyboard.
2023-11-08 12:13:56 +07:00
Eberhard Beilharz
fde460ecea chore(core): Recompile keyboard with kmcomp 2023-11-07 05:02:30 +01:00
Eberhard Beilharz
eb64ca4d01
chore(core): Fix test keyboard 2023-11-07 08:29:45 +07:00
Eberhard Beilharz
09843634bb
chore(web): Address code review comments 2023-11-06 17:28:25 +07:00
Eberhard Beilharz
4851c547a9
chore(core): Enhance core test 2023-11-06 15:57:07 +07:00
Eberhard Beilharz
2e71ec9e70
chore(web): Add failing test for deadkey bug
Also adds a similar testcase to the baseline keyboard tests.
2023-11-06 13:28:49 +07:00
Eberhard Beilharz
fa0b3e839e
refactor(core): Remove obsolete comments
Since things are working in both cases it seems that the problem got
fixed and the comments are obsolete.
2023-11-06 12:20:56 +07:00
Marc Durdin
236b1ebc54 fix(developer): enable and update unit tests
Several unit tests were not running as they were not referenced in
developer/src/test/auto/Makefile. This meant that some tests were
outdated:

* two keyboard fixtures needed recompiling with kmcomp in order to match
* some interfaces had changed slightly, necessitating updates to
  corresponding unit tests.
2023-10-31 13:50:34 +07:00
Marc Durdin
a093507a4c chore(developer): remove .keyboard_info sources
Fixes #9551.

Removes various .keyboard_info files from test fixtures and also removes
generation of .keyboard_info source files from kmconvert, alongside now-
redundant tests (cvt.dpr).
2023-09-25 12:19:26 +07:00
Marc Durdin
7f3d7ce17d chore: fixup targets for build_index 2023-09-16 15:46:37 +07:00
Marc Durdin
f140b5e18d chore: convert keyboards build.sh to builder script 2023-09-16 15:41:07 +07:00
Marc Durdin
454448bc63 chore: use kmc instead of kmcomp to build test keyboards 2023-09-16 15:24:46 +07:00
Marc Durdin
3a2540b077 feat(developer): remove kmcomp
Removes kmcomp.dpr, related source, compilekeymanweb.pas, and related
unit tests.

Cleans up a couple of bits and pieces around kmc in order to help tests
to pass, and updates some tests that had legacy code in them
(particularly missing &TARGETS stores).
2023-09-09 17:47:15 +02:00
Marc Durdin
d1d6dc5d99 refactor(developer): compiler interface part 1 for wasm
This starts the refactor of the .kmn compiler interfaces for WASM,
moving more file writes into typescript and out of the compiler. Adds a
cleaner binding and structures for passing compile metadata back to
typescript for additional build steps (e.g. kvk, js builds).

Will rebase the Typescript-based KMW compiler onto this so it can start
to benefit from the refactoring.

* Fixes a minor issue with loading a .kvks file with an empty flags set.
* Adds a writeFileSync method to the compiler callback interfaces.
* Adds an e2e compiler test to verify that .kmx and .kvk are both
  correctly compiled.
2023-05-23 15:26:28 +07:00
Eberhard Beilharz
a7630a0265
fix(linux): Fix linux tests 2023-05-05 10:55:45 +02:00
Darcy Wong
a3e685d12a chore(common): Rename folder 2023-04-25 09:51:03 +07:00
Darcy Wong
64c6bfbbe9 chore(common): Ignore build/ folders 2023-04-25 09:10:30 +07:00
Darcy Wong
3d221381fe chore(common): Skip issue folder 2023-04-25 07:33:41 +07:00
Darcy Wong
91c9cbf61d chore(common): Skip issue folder 2023-04-25 07:18:23 +07:00
Darcy Wong
aa218d4896 chore(common): cd to $THIS_DIR 2023-04-25 07:09:28 +07:00
Darcy Wong
92670f4100 chore(common): Fix issue number 2023-04-24 15:30:41 +07:00
Darcy Wong
f216673f54 chore(common): Update path 2023-04-24 15:09:00 +07:00
Darcy Wong
23f1e79d2f chore(common): Move the_99 test keyboard to issue folder 2023-04-24 15:06:53 +07:00
Marc Durdin
3468a36100 chore(common): add baseline.kpj
This makes it possible to run the common/test/keyboards build.sh and
makes all the baseline keyboards available as a build artifact (but
currently only in .kmx, not .kmp; this may come as a future update.)
2023-03-28 06:50:00 +07:00