From f561320b8e8dc67f9b6e2d24d5cbf4ba8e27b11e Mon Sep 17 00:00:00 2001 From: paumr Date: Tue, 31 Oct 2023 01:06:08 +0100 Subject: nixos/tests/archi: init smoke tests for Archi --- nixos/tests/all-tests.nix | 1 + nixos/tests/archi.nix | 31 +++++++++++++++++++++++++++++++ pkgs/tools/misc/archi/default.nix | 4 ++++ 3 files changed, 36 insertions(+) create mode 100644 nixos/tests/archi.nix diff --git a/nixos/tests/all-tests.nix b/nixos/tests/all-tests.nix index fdd95a9b4f9..6c127efa4ce 100644 --- a/nixos/tests/all-tests.nix +++ b/nixos/tests/all-tests.nix @@ -124,6 +124,7 @@ in { apfs = runTest ./apfs.nix; appliance-repart-image = runTest ./appliance-repart-image.nix; apparmor = handleTest ./apparmor.nix {}; + archi = handleTest ./archi.nix {}; atd = handleTest ./atd.nix {}; atop = handleTest ./atop.nix {}; atuin = handleTest ./atuin.nix {}; diff --git a/nixos/tests/archi.nix b/nixos/tests/archi.nix new file mode 100644 index 00000000000..59f2e940c00 --- /dev/null +++ b/nixos/tests/archi.nix @@ -0,0 +1,31 @@ +import ./make-test-python.nix ({ lib, ... }: { + name = "archi"; + meta.maintainers = with lib.maintainers; [ paumr ]; + + nodes.machine = { pkgs, ... }: { + imports = [ + ./common/x11.nix + ]; + + environment.systemPackages = with pkgs; [ archi ]; + }; + + enableOCR = true; + + testScript = '' + machine.wait_for_x() + + with subtest("createEmptyModel via CLI"): + machine.succeed("Archi -application com.archimatetool.commandline.app -consoleLog -nosplash --createEmptyModel --saveModel smoke.archimate") + machine.copy_from_vm("smoke.archimate", "") + + with subtest("UI smoketest"): + machine.succeed("DISPLAY=:0 Archi --createEmptyModel >&2 &") + machine.wait_for_window("Archi") + + # wait till main UI is open + machine.wait_for_text("Welcome to Archi") + + machine.screenshot("welcome-screen") + ''; +}) diff --git a/pkgs/tools/misc/archi/default.nix b/pkgs/tools/misc/archi/default.nix index cf9055c78c6..525c34e9a05 100644 --- a/pkgs/tools/misc/archi/default.nix +++ b/pkgs/tools/misc/archi/default.nix @@ -7,6 +7,8 @@ , webkitgtk , wrapGAppsHook , _7zz +, archi +, nixosTests }: stdenv.mkDerivation rec { @@ -64,6 +66,8 @@ stdenv.mkDerivation rec { mv Archi.app "$out/Applications/" ''; + passthru.tests = { inherit (nixosTests) archi; }; + meta = with lib; { description = "ArchiMate modelling toolkit"; longDescription = '' -- cgit 1.4.1 From 00d475e53c981fdd4ccad6947333f48cdf8c2560 Mon Sep 17 00:00:00 2001 From: paumr Date: Fri, 3 Nov 2023 14:32:58 +0100 Subject: archi: removed unnecessary input --- pkgs/tools/misc/archi/default.nix | 1 - 1 file changed, 1 deletion(-) diff --git a/pkgs/tools/misc/archi/default.nix b/pkgs/tools/misc/archi/default.nix index 525c34e9a05..793e06fb3d0 100644 --- a/pkgs/tools/misc/archi/default.nix +++ b/pkgs/tools/misc/archi/default.nix @@ -7,7 +7,6 @@ , webkitgtk , wrapGAppsHook , _7zz -, archi , nixosTests }: -- cgit 1.4.1