diff options
Diffstat (limited to 'nixos/tests/opentabletdriver.nix')
-rw-r--r-- | nixos/tests/opentabletdriver.nix | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/nixos/tests/opentabletdriver.nix b/nixos/tests/opentabletdriver.nix index 832d4c25a540..fe345a7bec73 100644 --- a/nixos/tests/opentabletdriver.nix +++ b/nixos/tests/opentabletdriver.nix @@ -1,4 +1,6 @@ -import ./make-test-python.nix ( { pkgs, ... }: { +import ./make-test-python.nix ( { pkgs, ... }: let + testUser = "alice"; +in { name = "opentabletdriver"; meta = { maintainers = with pkgs.lib.maintainers; [ thiagokokada ]; @@ -10,7 +12,7 @@ import ./make-test-python.nix ( { pkgs, ... }: { ./common/user-account.nix ./common/x11.nix ]; - test-support.displayManager.auto.user = "alice"; + test-support.displayManager.auto.user = testUser; hardware.opentabletdriver.enable = true; }; @@ -18,10 +20,11 @@ import ./make-test-python.nix ( { pkgs, ... }: { '' machine.start() machine.wait_for_x() - machine.wait_for_unit("opentabletdriver.service", "alice") + machine.wait_for_unit("opentabletdriver.service", "${testUser}") - machine.succeed("cat /etc/udev/rules.d/30-opentabletdriver.rules") + machine.succeed("cat /etc/udev/rules.d/99-opentabletdriver.rules") # Will fail if service is not running - machine.succeed("otd detect") + # Needs to run as the same user that started the service + machine.succeed("su - ${testUser} -c 'otd detect'") ''; }) |