From 2a16c9626097754b44e91c30d3780d097fd7dd42 Mon Sep 17 00:00:00 2001 From: Mihai Fufezan Date: Sun, 29 Mar 2026 17:14:51 +0300 Subject: nix/tests: print gtests logs --- nix/tests/default.nix | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/nix/tests/default.nix b/nix/tests/default.nix index 25c4077b..c1737992 100644 --- a/nix/tests/default.nix +++ b/nix/tests/default.nix @@ -81,11 +81,19 @@ in exit_status, _out = machine.execute("su - alice -c 'hyprland_gtests 2>&1 | tee /tmp/gtestslog; exit ''${PIPESTATUS[0]}'") machine.execute(f'echo {exit_status} > /tmp/exit_status_gtests') + # Print logs for visibility in CI + _, out = machine.execute("cat /tmp/gtestslog") + print(f"gtests log:\n{out}") + # Run hyprtester testing framework/suite print("Running hyprtester") exit_status, _out = machine.execute("su - alice -c 'hyprtester -b ${hyprland}/bin/Hyprland -c /etc/test.conf -p ${hyprland}/lib/hyprtestplugin.so 2>&1 | tee /tmp/testerlog; exit ''${PIPESTATUS[0]}'") print(f"Hyprtester exited with {exit_status}") + # Print logs for visibility in CI + _, out = machine.execute("cat /tmp/testerlog") + print(f"Hyprtester log:\n{out}") + # Copy logs to host machine.execute('cp "$(find /tmp/hypr -name *.log | head -1)" /tmp/hyprlog') machine.execute(f'echo {exit_status} > /tmp/exit_status') @@ -94,10 +102,6 @@ in machine.copy_from_vm("/tmp/hyprlog") machine.copy_from_vm("/tmp/exit_status") - # Print logs for visibility in CI - _, out = machine.execute("cat /tmp/testerlog") - print(f"Hyprtester log:\n{out}") - # Finally - shutdown machine.shutdown() ''; -- cgit v1.2.3