aboutsummaryrefslogtreecommitdiff
path: root/nixpkgs/nixos/tests/installed-tests
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/nixos/tests/installed-tests')
-rw-r--r--nixpkgs/nixos/tests/installed-tests/default.nix6
-rw-r--r--nixpkgs/nixos/tests/installed-tests/flatpak.nix9
-rw-r--r--nixpkgs/nixos/tests/installed-tests/ibus.nix14
-rw-r--r--nixpkgs/nixos/tests/installed-tests/ostree.nix11
4 files changed, 14 insertions, 26 deletions
diff --git a/nixpkgs/nixos/tests/installed-tests/default.nix b/nixpkgs/nixos/tests/installed-tests/default.nix
index b6bdfea2277..889a00d4b56 100644
--- a/nixpkgs/nixos/tests/installed-tests/default.nix
+++ b/nixpkgs/nixos/tests/installed-tests/default.nix
@@ -50,6 +50,12 @@ let
environment.systemPackages = with pkgs; [ gnome-desktop-testing ];
+ # The installed tests need to be added to the test VM’s closure.
+ # Otherwise, their dependencies might not actually be registered
+ # as valid paths in the VM’s Nix store database,
+ # and `nix-store --query` commands run as part of the tests
+ # (for example when building Flatpak runtimes) will fail.
+ environment.variables.TESTED_PACKAGE_INSTALLED_TESTS = "${tested.installedTests}/share";
};
testScript =
diff --git a/nixpkgs/nixos/tests/installed-tests/flatpak.nix b/nixpkgs/nixos/tests/installed-tests/flatpak.nix
index 091c9932662..8aeeaca90f6 100644
--- a/nixpkgs/nixos/tests/installed-tests/flatpak.nix
+++ b/nixpkgs/nixos/tests/installed-tests/flatpak.nix
@@ -5,14 +5,11 @@ makeInstalledTest {
withX11 = true;
testConfig = {
- services.xserver.desktopManager.gnome3.enable = true; # TODO: figure out minimal environment where the tests work
- # common/x11.nix enables the auto display manager (lightdm)
- services.xserver.displayManager.gdm.enable = false;
- services.gnome3.core-utilities.enable = false;
+ xdg.portal.enable = true;
services.flatpak.enable = true;
- environment.systemPackages = with pkgs; [ gnupg ostree python2 ];
+ environment.systemPackages = with pkgs; [ gnupg ostree python3 ];
virtualisation.memorySize = 2047;
- virtualisation.diskSize = 1024;
+ virtualisation.diskSize = 3072;
};
testRunnerFlags = "--timeout 3600";
diff --git a/nixpkgs/nixos/tests/installed-tests/ibus.nix b/nixpkgs/nixos/tests/installed-tests/ibus.nix
index af54b612b50..a4bc2a7d7de 100644
--- a/nixpkgs/nixos/tests/installed-tests/ibus.nix
+++ b/nixpkgs/nixos/tests/installed-tests/ibus.nix
@@ -5,16 +5,12 @@ makeInstalledTest {
testConfig = {
i18n.inputMethod.enabled = "ibus";
+ systemd.user.services.ibus-daemon = {
+ serviceConfig.ExecStart = "${pkgs.ibus}/bin/ibus-daemon --xim --verbose";
+ wantedBy = [ "graphical-session.target" ];
+ partOf = [ "graphical-session.target" ];
+ };
};
- 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;
}
diff --git a/nixpkgs/nixos/tests/installed-tests/ostree.nix b/nixpkgs/nixos/tests/installed-tests/ostree.nix
index eef7cace54c..90e09ad4ddf 100644
--- a/nixpkgs/nixos/tests/installed-tests/ostree.nix
+++ b/nixpkgs/nixos/tests/installed-tests/ostree.nix
@@ -3,21 +3,10 @@
makeInstalledTest {
tested = pkgs.ostree;
- # TODO: Wrap/patch the tests directly in the package
testConfig = {
environment.systemPackages = with pkgs; [
- (python3.withPackages (p: with p; [ pyyaml ]))
gnupg
ostree
];
-
- # for GJS tests
- environment.variables.GI_TYPELIB_PATH = lib.makeSearchPath "lib/girepository-1.0" (with pkgs; [
- gtk3
- pango.out
- ostree
- gdk-pixbuf
- atk
- ]);
};
}