ibus: add installed tests
This commit is contained in:
parent
973c2fcf3d
commit
f6afb29ee1
|
@ -88,6 +88,7 @@ in
|
||||||
glib-networking = callInstalledTest ./glib-networking.nix {};
|
glib-networking = callInstalledTest ./glib-networking.nix {};
|
||||||
gnome-photos = callInstalledTest ./gnome-photos.nix {};
|
gnome-photos = callInstalledTest ./gnome-photos.nix {};
|
||||||
graphene = callInstalledTest ./graphene.nix {};
|
graphene = callInstalledTest ./graphene.nix {};
|
||||||
|
ibus = callInstalledTest ./ibus.nix {};
|
||||||
libgdata = callInstalledTest ./libgdata.nix {};
|
libgdata = callInstalledTest ./libgdata.nix {};
|
||||||
libxmlb = callInstalledTest ./libxmlb.nix {};
|
libxmlb = callInstalledTest ./libxmlb.nix {};
|
||||||
ostree = callInstalledTest ./ostree.nix {};
|
ostree = callInstalledTest ./ostree.nix {};
|
||||||
|
|
|
@ -0,0 +1,20 @@
|
||||||
|
{ pkgs, makeInstalledTest, ... }:
|
||||||
|
|
||||||
|
makeInstalledTest {
|
||||||
|
tested = pkgs.ibus;
|
||||||
|
|
||||||
|
testConfig = {
|
||||||
|
i18n.inputMethod.enabled = "ibus";
|
||||||
|
};
|
||||||
|
|
||||||
|
preTestScript = ''
|
||||||
|
# ibus has ibus-desktop-testing-runner but it tries to manage desktop session so we just spawn ibus-daemon ourselves
|
||||||
|
machine.succeed("ibus-daemon --daemonize --verbose")
|
||||||
|
'';
|
||||||
|
|
||||||
|
withX11 = true;
|
||||||
|
|
||||||
|
# TODO: ibus-daemon is currently crashing or something
|
||||||
|
# maybe make ibus systemd service that auto-restarts?
|
||||||
|
meta.broken = true;
|
||||||
|
}
|
|
@ -30,6 +30,7 @@
|
||||||
, wayland ? null
|
, wayland ? null
|
||||||
, buildPackages
|
, buildPackages
|
||||||
, runtimeShell
|
, runtimeShell
|
||||||
|
, nixosTests
|
||||||
}:
|
}:
|
||||||
|
|
||||||
assert withWayland -> wayland != null && libxkbcommon != null;
|
assert withWayland -> wayland != null && libxkbcommon != null;
|
||||||
|
@ -67,7 +68,7 @@ stdenv.mkDerivation rec {
|
||||||
})
|
})
|
||||||
];
|
];
|
||||||
|
|
||||||
outputs = [ "out" "dev" ];
|
outputs = [ "out" "dev" "installedTests" ];
|
||||||
|
|
||||||
postPatch = ''
|
postPatch = ''
|
||||||
echo \#!${runtimeShell} > data/dconf/make-dconf-override-db.sh
|
echo \#!${runtimeShell} > data/dconf/make-dconf-override-db.sh
|
||||||
|
@ -84,11 +85,17 @@ stdenv.mkDerivation rec {
|
||||||
(enableFeature enablePython2Library "python-library")
|
(enableFeature enablePython2Library "python-library")
|
||||||
(enableFeature enablePython2Library "python2") # XXX: python2 library does not work anyway
|
(enableFeature enablePython2Library "python2") # XXX: python2 library does not work anyway
|
||||||
(enableFeature enableUI "ui")
|
(enableFeature enableUI "ui")
|
||||||
|
"--enable-install-tests"
|
||||||
"--with-unicode-emoji-dir=${unicode-emoji}/share/unicode/emoji"
|
"--with-unicode-emoji-dir=${unicode-emoji}/share/unicode/emoji"
|
||||||
"--with-emoji-annotation-dir=${cldr-emoji-annotation}/share/unicode/cldr/common/annotations"
|
"--with-emoji-annotation-dir=${cldr-emoji-annotation}/share/unicode/cldr/common/annotations"
|
||||||
"--with-ucd-dir=${unicode-character-database}/share/unicode"
|
"--with-ucd-dir=${unicode-character-database}/share/unicode"
|
||||||
];
|
];
|
||||||
|
|
||||||
|
makeFlags = [
|
||||||
|
"test_execsdir=${placeholder ''installedTests''}/libexec/installed-tests/ibus"
|
||||||
|
"test_sourcesdir=${placeholder ''installedTests''}/share/installed-tests/ibus"
|
||||||
|
];
|
||||||
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
autoreconfHook
|
autoreconfHook
|
||||||
gtk-doc
|
gtk-doc
|
||||||
|
@ -128,6 +135,25 @@ stdenv.mkDerivation rec {
|
||||||
$out/bin/ibus version
|
$out/bin/ibus version
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
postInstall = ''
|
||||||
|
# It has some hardcoded FHS paths and also we do not use it
|
||||||
|
# since we set up the environment in NixOS tests anyway.
|
||||||
|
moveToOutput "bin/ibus-desktop-testing-runner" "$installedTests"
|
||||||
|
'';
|
||||||
|
|
||||||
|
postFixup = ''
|
||||||
|
# set necessary environment also for tests
|
||||||
|
for f in $installedTests/libexec/installed-tests/ibus/*; do
|
||||||
|
wrapGApp $f
|
||||||
|
done
|
||||||
|
'';
|
||||||
|
|
||||||
|
passthru = {
|
||||||
|
tests = {
|
||||||
|
installed-tests = nixosTests.installed-tests.ibus;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
homepage = "https://github.com/ibus/ibus";
|
homepage = "https://github.com/ibus/ibus";
|
||||||
description = "Intelligent Input Bus, input method framework";
|
description = "Intelligent Input Bus, input method framework";
|
||||||
|
|
Loading…
Reference in New Issue