Merge pull request #79659 from worldofpeace/cleanup-python-test-lib

testing: fix runInMachineWithX/runInMachine
This commit is contained in:
worldofpeace 2020-02-14 12:38:57 -05:00 committed by GitHub
commit 95e41ecd8f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 7 deletions

View File

@ -218,12 +218,12 @@ in rec {
'';
testScript = ''
startAll;
$client->waitForUnit("multi-user.target");
start_all()
client.wait_for_unit("multi-user.target")
${preBuild}
$client->succeed("env -i ${bash}/bin/bash ${buildrunner} /tmp/xchg/saved-env >&2");
client.succeed("env -i ${bash}/bin/bash ${buildrunner} /tmp/xchg/saved-env >&2")
${postBuild}
$client->succeed("sync"); # flush all data before pulling the plug
client.succeed("sync") # flush all data before pulling the plug
'';
vmRunCommand = writeText "vm-run" ''
@ -263,9 +263,12 @@ in rec {
{ ... }:
{
inherit require;
imports = [
../tests/common/auto.nix
];
virtualisation.memorySize = 1024;
services.xserver.enable = true;
services.xserver.displayManager.auto.enable = true;
test-support.displayManager.auto.enable = true;
services.xserver.displayManager.defaultSession = "none+icewm";
services.xserver.windowManager.icewm.enable = true;
};
@ -274,7 +277,7 @@ in rec {
machine = client;
preBuild =
''
$client->waitForX;
client.wait_for_x()
'';
} // args);

View File

@ -250,9 +250,12 @@ in rec {
{ ... }:
{
inherit require;
imports = [
../tests/common/auto.nix
];
virtualisation.memorySize = 1024;
services.xserver.enable = true;
services.xserver.displayManager.auto.enable = true;
test-support.displayManager.auto.enable = true;
services.xserver.displayManager.defaultSession = "none+icewm";
services.xserver.windowManager.icewm.enable = true;
};