1 import ./make-test-python.nix ({ pkgs, lib, ... }: {
4 meta.maintainers = lib.teams.deepin.members;
6 nodes.machine = { ... }: {
8 ./common/user-account.nix
11 virtualisation.memorySize = 2048;
13 services.xserver.enable = true;
15 services.xserver.displayManager = {
16 lightdm.enable = true;
23 services.xserver.desktopManager.deepin.enable = true;
26 testScript = { nodes, ... }:
28 user = nodes.machine.users.users.alice;
31 with subtest("Wait for login"):
33 machine.wait_for_file("${user.home}/.Xauthority")
34 machine.succeed("xauth merge ${user.home}/.Xauthority")
36 with subtest("Check that logging in has given the user ownership of devices"):
37 machine.succeed("getfacl -p /dev/snd/timer | grep -q ${user.name}")
39 with subtest("Check if Deepin session components actually start"):
40 machine.wait_until_succeeds("pgrep -f dde-session-daemon")
41 machine.wait_for_window("dde-session-daemon")
42 machine.wait_until_succeeds("pgrep -f dde-desktop")
43 machine.wait_for_window("dde-desktop")
45 with subtest("Open deepin-terminal"):
46 machine.succeed("su - ${user.name} -c 'DISPLAY=:0 deepin-terminal >&2 &'")
47 machine.wait_for_window("deepin-terminal")
49 machine.screenshot("screen")