about summary refs log tree commit diff
path: root/nixos
diff options
context:
space:
mode:
authorJan Tojnar <jtojnar@gmail.com>2018-02-13 17:52:49 +0100
committerJan Tojnar <jtojnar@gmail.com>2018-05-15 14:18:44 +0200
commit1c043637140514df1205830e2ac860e57ef7a23a (patch)
tree4ad49c3f16cf6f2c37cf9ccb394e985d29323ded /nixos
parentec80c5e4c48df8264e5e230bb81eb55e045382dc (diff)
nixos/flatpak: add test
Diffstat (limited to 'nixos')
-rw-r--r--nixos/release.nix1
-rw-r--r--nixos/tests/flatpak.nix23
2 files changed, 24 insertions, 0 deletions
diff --git a/nixos/release.nix b/nixos/release.nix
index ae70b535a5e2f..8151d1bac5ed8 100644
--- a/nixos/release.nix
+++ b/nixos/release.nix
@@ -284,6 +284,7 @@ in rec {
   tests.env = callTest tests/env.nix {};
   tests.ferm = callTest tests/ferm.nix {};
   tests.firefox = callTest tests/firefox.nix {};
+  tests.flatpak = callTest tests/flatpak.nix {};
   tests.firewall = callTest tests/firewall.nix {};
   tests.fwupd = callTest tests/fwupd.nix {};
   #tests.gitlab = callTest tests/gitlab.nix {};
diff --git a/nixos/tests/flatpak.nix b/nixos/tests/flatpak.nix
new file mode 100644
index 0000000000000..d1c7cf843147e
--- /dev/null
+++ b/nixos/tests/flatpak.nix
@@ -0,0 +1,23 @@
+# run installed tests
+import ./make-test.nix ({ pkgs, ... }:
+
+{
+  name = "flatpak";
+  meta = {
+    maintainers = pkgs.flatpak.meta.maintainers;
+  };
+
+  machine = { config, pkgs, ... }: {
+    imports = [ ./common/x11.nix ];
+    services.xserver.desktopManager.gnome3.enable = true; # TODO: figure out minimal environment where the tests work
+    services.flatpak.enable = true;
+    environment.systemPackages = with pkgs; [ gnupg gnome-desktop-testing ostree python2 ];
+    virtualisation.memorySize = 2047;
+    virtualisation.diskSize = 1024;
+  };
+
+  testScript = ''
+    $machine->waitForX();
+    $machine->succeed("gnome-desktop-testing-runner -d '${pkgs.flatpak.installedTests}/share' --timeout 3600");
+  '';
+})