mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-10 03:23:29 +03:00
parent
2af95991ab
commit
6d1946030c
2 changed files with 52 additions and 54 deletions
|
@ -1292,7 +1292,7 @@ in {
|
||||||
xmonad = handleTest ./xmonad.nix {};
|
xmonad = handleTest ./xmonad.nix {};
|
||||||
xmonad-xdg-autostart = handleTest ./xmonad-xdg-autostart.nix {};
|
xmonad-xdg-autostart = handleTest ./xmonad-xdg-autostart.nix {};
|
||||||
xpadneo = handleTest ./xpadneo.nix {};
|
xpadneo = handleTest ./xpadneo.nix {};
|
||||||
xrdp = handleTest ./xrdp.nix {};
|
xrdp = runTest ./xrdp.nix;
|
||||||
xrdp-with-audio-pulseaudio = runTest ./xrdp-with-audio-pulseaudio.nix;
|
xrdp-with-audio-pulseaudio = runTest ./xrdp-with-audio-pulseaudio.nix;
|
||||||
xscreensaver = handleTest ./xscreensaver.nix {};
|
xscreensaver = handleTest ./xscreensaver.nix {};
|
||||||
xss-lock = runTest ./xss-lock.nix;
|
xss-lock = runTest ./xss-lock.nix;
|
||||||
|
|
|
@ -1,60 +1,58 @@
|
||||||
import ./make-test-python.nix (
|
{ pkgs, ... }:
|
||||||
{ pkgs, ... }:
|
{
|
||||||
{
|
name = "xrdp";
|
||||||
name = "xrdp";
|
meta = with pkgs.lib.maintainers; {
|
||||||
meta = with pkgs.lib.maintainers; {
|
maintainers = [ ];
|
||||||
maintainers = [ ];
|
};
|
||||||
};
|
|
||||||
|
|
||||||
nodes = {
|
nodes = {
|
||||||
server =
|
server =
|
||||||
{ pkgs, ... }:
|
{ pkgs, ... }:
|
||||||
{
|
{
|
||||||
imports = [ ./common/user-account.nix ];
|
imports = [ ./common/user-account.nix ];
|
||||||
services.xrdp.enable = true;
|
services.xrdp.enable = true;
|
||||||
services.xrdp.defaultWindowManager = "${pkgs.xterm}/bin/xterm";
|
services.xrdp.defaultWindowManager = "${pkgs.xterm}/bin/xterm";
|
||||||
networking.firewall.allowedTCPPorts = [ 3389 ];
|
networking.firewall.allowedTCPPorts = [ 3389 ];
|
||||||
};
|
};
|
||||||
|
|
||||||
client =
|
client =
|
||||||
{ pkgs, ... }:
|
{ pkgs, ... }:
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./common/x11.nix
|
./common/x11.nix
|
||||||
./common/user-account.nix
|
./common/user-account.nix
|
||||||
];
|
];
|
||||||
test-support.displayManager.auto.user = "alice";
|
test-support.displayManager.auto.user = "alice";
|
||||||
environment.systemPackages = [ pkgs.freerdp ];
|
environment.systemPackages = [ pkgs.freerdp ];
|
||||||
services.xrdp.enable = true;
|
services.xrdp.enable = true;
|
||||||
services.xrdp.defaultWindowManager = "${pkgs.icewm}/bin/icewm";
|
services.xrdp.defaultWindowManager = "${pkgs.icewm}/bin/icewm";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
testScript =
|
testScript =
|
||||||
{ nodes, ... }:
|
{ nodes, ... }:
|
||||||
let
|
let
|
||||||
user = nodes.client.config.users.users.alice;
|
user = nodes.client.users.users.alice;
|
||||||
in
|
in
|
||||||
''
|
''
|
||||||
start_all()
|
start_all()
|
||||||
|
|
||||||
client.wait_for_x()
|
client.wait_for_x()
|
||||||
client.wait_for_file("${user.home}/.Xauthority")
|
client.wait_for_file("${user.home}/.Xauthority")
|
||||||
client.succeed("xauth merge ${user.home}/.Xauthority")
|
client.succeed("xauth merge ${user.home}/.Xauthority")
|
||||||
|
|
||||||
client.sleep(5)
|
client.sleep(5)
|
||||||
|
|
||||||
client.execute("xterm >&2 &")
|
client.execute("xterm >&2 &")
|
||||||
client.sleep(1)
|
client.sleep(1)
|
||||||
client.send_chars("xfreerdp /cert-tofu /w:640 /h:480 /v:127.0.0.1 /u:${user.name} /p:${user.password}\n")
|
client.send_chars("xfreerdp /cert-tofu /w:640 /h:480 /v:127.0.0.1 /u:${user.name} /p:${user.password}\n")
|
||||||
client.sleep(5)
|
client.sleep(5)
|
||||||
client.screenshot("localrdp")
|
client.screenshot("localrdp")
|
||||||
|
|
||||||
client.execute("xterm >&2 &")
|
client.execute("xterm >&2 &")
|
||||||
client.sleep(1)
|
client.sleep(1)
|
||||||
client.send_chars("xfreerdp /cert-tofu /w:640 /h:480 /v:server /u:${user.name} /p:${user.password}\n")
|
client.send_chars("xfreerdp /cert-tofu /w:640 /h:480 /v:server /u:${user.name} /p:${user.password}\n")
|
||||||
client.sleep(5)
|
client.sleep(5)
|
||||||
client.screenshot("remoterdp")
|
client.screenshot("remoterdp")
|
||||||
'';
|
'';
|
||||||
}
|
}
|
||||||
)
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue