spiegel-keyman/linux/debian/tests
Eberhard Beilharz 69513108e3
test(linux): add regression tests for cli tools to autopkgtests
This change adds tests that execute km-package-install,
km-package-list-installed, and km-package-uninstall and verifies the
results. We have two sets of tests, for both gnome-shell and
ibus-proper environments.

Test-bot: skip
2025-10-14 17:54:36 +02:00
..
data test(linux): add regression tests for cli tools to autopkgtests 2025-10-14 17:54:36 +02:00
control test(linux): add regression tests for cli tools to autopkgtests 2025-10-14 17:54:36 +02:00
README.md test(linux): add regression tests for cli tools to autopkgtests 2025-10-14 17:54:36 +02:00
test-build chore(core): remove km_core_keyboard_load API 2024-12-04 13:38:07 +07:00
test-cli.inc.sh test(linux): add regression tests for cli tools to autopkgtests 2025-10-14 17:54:36 +02:00
test-gnome-cli test(linux): add regression tests for cli tools to autopkgtests 2025-10-14 17:54:36 +02:00
test-ibus-cli test(linux): add regression tests for cli tools to autopkgtests 2025-10-14 17:54:36 +02:00

autopkgtest

This directory contains tests for the packages.

See https://packaging.ubuntu.com/html/auto-pkg-test.html and https://salsa.debian.org/ci-team/autopkgtest/blob/master/doc/README.package-tests.rst

NOTE: Runtime test names are only allowed to contain decimal digits, lowercase ASCII letters, plus or minus signs, dots or slashes.

Manually run the tests

  • build source and binary packages (see packaging.md)

  • install dependencies

    sudo apt install autopkgtest qemu-system qemu-utils autodep8
    
  • create environment. Several different options are available, see README.running-tests

    For example:

    autopkgtest-buildvm-ubuntu-cloud -v --release=noble
    
  • Run tests

    autopkgtest --apt-upgrade --no-built-binaries *.deb keyman_*.dsc -- qemu autopkgtest-noble-amd64.img
    

Developing tests

While developing tests, it is possible to run the tests directly from the source tree:

cd linux
autopkgtest --apt-upgrade --no-built-binaries ../artifacts/*.deb . -- qemu /path/to/autopkgtest-noble-amd64.img

This requires packages to be available in ${KEYMAN_ROOT}/artifacts. These can be built from source with:

cd linux
rm -rf debian/patches/ keyman-config/keyman_config/.pc
scripts/deb-packaging.sh source
DIST=noble
cd ..
docker run -v $(pwd):/source -i -t -w /source --platform=amd64 \
  --env INPUT_DIST=$DIST --env INPUT_SOURCE_DIR=. \
  --env INPUT_SOURCEPACKAGE=$(ls keyman_*.dsc | sort | tail -1) \
  sillsdev/$DIST

New packages have to be built for changes outside of linux/debian. Changes in files in linux/debian are automatically considered when running autopkgtest.