1 import ./make-test-python.nix ({ pkgs, ...} : {
3 meta = with pkgs.lib.maintainers; {
12 { imports = [ ./common/x11.nix ];
18 # Important to get the systemd service running for root
19 environment.variables.XDG_RUNTIME_DIR = "/run/user/0";
21 environment.variables.TEST_SYSTEM_VARIABLE = "system variable";
25 machine.wait_for_unit("multi-user.target")
27 # checks that the EDITOR environment variable is set
28 machine.succeed('test $(basename "$EDITOR") = emacseditor')
30 # waits for the emacs service to be ready
31 machine.wait_until_succeeds(
32 "systemctl --user status emacs.service | grep 'Active: active'"
35 # connects to the daemon
36 machine.succeed("emacsclient --no-wait --frame-parameters='((display . \"'\"$DISPLAY\"'\"))' --create-frame $EDITOR >&2")
38 # checks that Emacs shows the edited filename
39 machine.wait_for_text("emacseditor")
41 # makes sure environment variables are accessible from Emacs
43 "emacsclient --eval '(getenv \"TEST_SYSTEM_VARIABLE\")' | grep -q 'system variable'"
46 machine.screenshot("emacsclient")