summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMihai Fufezan <mihai@fufexan.net>2026-03-29 17:14:51 +0300
committerMihai Fufezan <mihai@fufexan.net>2026-03-29 17:14:51 +0300
commit2a16c9626097754b44e91c30d3780d097fd7dd42 (patch)
tree8ee8d556e3fe812de7fab8f2aacfd73375f33643
parent43fcf1b0359e41d6b5eea6b76f009d117027deb7 (diff)
nix/tests: print gtests logs
-rw-r--r--nix/tests/default.nix12
1 files 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()
'';