Merge pull request #264480 from paumr/archi_test_init

authored by

Artturi and committed by
GitHub
28d9d26f 0b6c6001

+35
+1
nixos/tests/all-tests.nix
··· 124 apfs = runTest ./apfs.nix; 125 appliance-repart-image = runTest ./appliance-repart-image.nix; 126 apparmor = handleTest ./apparmor.nix {}; 127 atd = handleTest ./atd.nix {}; 128 atop = handleTest ./atop.nix {}; 129 atuin = handleTest ./atuin.nix {};
··· 124 apfs = runTest ./apfs.nix; 125 appliance-repart-image = runTest ./appliance-repart-image.nix; 126 apparmor = handleTest ./apparmor.nix {}; 127 + archi = handleTest ./archi.nix {}; 128 atd = handleTest ./atd.nix {}; 129 atop = handleTest ./atop.nix {}; 130 atuin = handleTest ./atuin.nix {};
+31
nixos/tests/archi.nix
···
··· 1 + import ./make-test-python.nix ({ lib, ... }: { 2 + name = "archi"; 3 + meta.maintainers = with lib.maintainers; [ paumr ]; 4 + 5 + nodes.machine = { pkgs, ... }: { 6 + imports = [ 7 + ./common/x11.nix 8 + ]; 9 + 10 + environment.systemPackages = with pkgs; [ archi ]; 11 + }; 12 + 13 + enableOCR = true; 14 + 15 + testScript = '' 16 + machine.wait_for_x() 17 + 18 + with subtest("createEmptyModel via CLI"): 19 + machine.succeed("Archi -application com.archimatetool.commandline.app -consoleLog -nosplash --createEmptyModel --saveModel smoke.archimate") 20 + machine.copy_from_vm("smoke.archimate", "") 21 + 22 + with subtest("UI smoketest"): 23 + machine.succeed("DISPLAY=:0 Archi --createEmptyModel >&2 &") 24 + machine.wait_for_window("Archi") 25 + 26 + # wait till main UI is open 27 + machine.wait_for_text("Welcome to Archi") 28 + 29 + machine.screenshot("welcome-screen") 30 + ''; 31 + })
+3
pkgs/tools/misc/archi/default.nix
··· 7 , webkitgtk 8 , wrapGAppsHook 9 , _7zz 10 }: 11 12 stdenv.mkDerivation rec { ··· 63 mkdir -p "$out/Applications" 64 mv Archi.app "$out/Applications/" 65 ''; 66 67 meta = with lib; { 68 description = "ArchiMate modelling toolkit";
··· 7 , webkitgtk 8 , wrapGAppsHook 9 , _7zz 10 + , nixosTests 11 }: 12 13 stdenv.mkDerivation rec { ··· 64 mkdir -p "$out/Applications" 65 mv Archi.app "$out/Applications/" 66 ''; 67 + 68 + passthru.tests = { inherit (nixosTests) archi; }; 69 70 meta = with lib; { 71 description = "ArchiMate modelling toolkit";