at 25.11-pre 907 B view raw
1import ./make-test-python.nix ( 2 { pkgs, ... }: 3 let 4 testUser = "alice"; 5 in 6 { 7 name = "opentabletdriver"; 8 meta = { 9 maintainers = with pkgs.lib.maintainers; [ thiagokokada ]; 10 }; 11 12 nodes.machine = 13 { pkgs, ... }: 14 { 15 imports = [ 16 ./common/user-account.nix 17 ./common/x11.nix 18 ]; 19 test-support.displayManager.auto.user = testUser; 20 hardware.opentabletdriver.enable = true; 21 }; 22 23 testScript = '' 24 machine.start() 25 machine.wait_for_x() 26 27 machine.wait_for_unit('graphical.target') 28 machine.wait_for_unit("opentabletdriver.service", "${testUser}") 29 30 machine.succeed("cat /etc/udev/rules.d/70-opentabletdriver.rules") 31 # Will fail if service is not running 32 # Needs to run as the same user that started the service 33 machine.succeed("su - ${testUser} -c 'otd detect'") 34 ''; 35 } 36)