diff options
author | Maxim Cournoyer <maxim.cournoyer@gmail.com> | 2023-06-14 08:06:21 -0400 |
---|---|---|
committer | Maxim Cournoyer <maxim.cournoyer@gmail.com> | 2023-06-14 11:05:30 -0400 |
commit | 4e60cbe5bbcf425442952de0e8eb6410e9304d1d (patch) | |
tree | 9b4dee1d2cf8e077d68e6b9bcd35d544ef74ba31 /gnu/packages/patches | |
parent | 6bbfcc359a111c257d4a9ea788027baddf4e7d64 (diff) | |
download | guix-patches-4e60cbe5bbcf425442952de0e8eb6410e9304d1d.tar guix-patches-4e60cbe5bbcf425442952de0e8eb6410e9304d1d.tar.gz |
gnu: ibus-anthy: Prepare for tests.
* gnu/packages/patches/ibus-anthy-fix-tests.patch: New patch.
* gnu/packages/ibus.scm (ibus-anthy): Register it.
* gnu/packages/ibus.scm (ibus-anthy) [source]: Apply patch.
[arguments]: Clarify #:tests? comment. Add a fix-check,
do-not-override-GI_TYPELIB_PATH and prepare-for-tests phases.
[native-inputs]: Add procps, python-pycotap, util-linux and
xorg-server-for-tests.
Diffstat (limited to 'gnu/packages/patches')
-rw-r--r-- | gnu/packages/patches/ibus-anthy-fix-tests.patch | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/gnu/packages/patches/ibus-anthy-fix-tests.patch b/gnu/packages/patches/ibus-anthy-fix-tests.patch new file mode 100644 index 0000000000..6934358980 --- /dev/null +++ b/gnu/packages/patches/ibus-anthy-fix-tests.patch @@ -0,0 +1,49 @@ +Submitted upstream: https://github.com/ibus/ibus-anthy/pull/35 + +diff --git a/tests/test-build.sh b/tests/test-build.sh +index e83b78f..a0efe32 100755 +--- a/tests/test-build.sh ++++ b/tests/test-build.sh +@@ -63,26 +63,27 @@ parse_args() + done; + } + ++maybe_install_pycotap() { ++ # Check if pycotap is already available. ++ python3 -m pycotap >/dev/null && return 0 ++ ++ # Red Hat specific hint. ++ if test -f /etc/redhat-release ; then ++ if ! rpm -q --quiet python3-pycotap; then ++ echo "Please install python3-pycotap" ++ exit -1 ++ fi ++ fi; ++} ++ + init_environment() + { + if test x$FORCE_TEST != x ; then + RUN_ARGS="$RUN_ARGS --force"; + fi; +- HAS_TAP=0; +- if test -f /etc/redhat-release ; then +- rpm -q --quiet python3-pycotap +- if test $? -ne 0 ; then +- echo "Not found python3-pycotap"; +- exit -1; +- fi; +- HAS_TAP=1; +- fi; +- TAP_DIR=`python -m site --user-site`/pycotap; +- if test $HAS_TAP -ne 1 && \ +- test x"$TAP_DIR" != x && test ! -d "$TAP_DIR" ; then +- echo "pip install pycotap --user"; +- pip install pycotap --user; +- fi; ++ ++ maybe_install_pycotap ++ + if test ! -f $BUILDDIR/../data/$ANTHY_SCHEMA_FILE ; then + echo "Not found $BUILDDIR/../data/$ANTHY_SCHEMA_FILE"; + exit -1; |