diff --git a/docs/linux/README.md b/docs/linux/README.md index 8ee91fbe81e..fe29b0d623a 100644 --- a/docs/linux/README.md +++ b/docs/linux/README.md @@ -102,6 +102,9 @@ sudo apt install -y lcov libdatetime-perl gcovr pip3 install coverage ``` +**Note:** You want lcov > 1.16, so you might have to download and install +a newer version e.g. from . + #### Creating and displaying code coverage reports All three projects (ibus-keyman, keyman-config, and keyman-system-service) diff --git a/linux/keyman-config/build.sh b/linux/keyman-config/build.sh index 35608c69eb7..9c0588f796b 100755 --- a/linux/keyman-config/build.sh +++ b/linux/keyman-config/build.sh @@ -46,7 +46,7 @@ execute_with_temp_schema() { TEMP_DATA_DIR=$(mktemp -d) SCHEMA_DIR="${TEMP_DATA_DIR}/glib-2.0/schemas" export XDG_DATA_DIRS="${TEMP_DATA_DIR}":${XDG_DATA_DIRS-} - export GSETTINGS_SCHEMA_DIR="${SCHEMA_DIR}" + export GSETTINGS_SCHEMA_DIR="${SCHEMA_DIR}:/usr/share/glib-2.0/schemas/:${GSETTINGS_SCHEMA_DIR-}" mkdir -p "${SCHEMA_DIR}" cp resources/com.keyman.gschema.xml "${SCHEMA_DIR}"/ glib-compile-schemas "${SCHEMA_DIR}" diff --git a/linux/keyman-config/run-tests.sh b/linux/keyman-config/run-tests.sh index de81ec7f738..de99c55e8f2 100755 --- a/linux/keyman-config/run-tests.sh +++ b/linux/keyman-config/run-tests.sh @@ -16,10 +16,13 @@ if [ -n "$TEAMCITY_VERSION" ]; then if ! pip3 list --format=columns | grep -q teamcity-messages; then pip3 install teamcity-messages fi - python3 -m teamcity.unittestpy discover -s tests -p test_*.py + test_module=teamcity.unittestpy else - # shellcheck disable=SC2086 - python3 ${coverage:-} -m unittest discover -v -s tests -p test_*.py + test_module=unittest + extra_opts=-v fi +# shellcheck disable=SC2086 +python3 ${coverage:-} -m ${test_module:-} discover ${extra_opts:-} -s tests -p test_*.py + rm -rf "$XDG_CONFIG_HOME"