test: include stdout in rsync error output

This commit is contained in:
2026-07-05 18:44:36 +02:00
parent 6a609c1b07
commit 895927fbad
+9 -2
View File
@@ -344,8 +344,15 @@ path = {source_dir}
entry["status"] = "Failed" entry["status"] = "Failed"
errors = [] errors = []
if rsync_result.returncode != 0: if rsync_result.returncode != 0:
err = rsync_result.stderr.strip().split("\n")[0] if rsync_result.stderr else "No output" errs = []
errors.append(f"Exit code {rsync_result.returncode}: {err[:80]}") if rsync_result.stderr:
errs.append(rsync_result.stderr.strip().split("\n")[0])
if rsync_result.stdout:
errs.append(rsync_result.stdout.strip().split("\n")[0])
if not errs:
errs.append("No output")
err = " | ".join(errs)
errors.append(f"Exit code {rsync_result.returncode}: {err[:150]}")
if missing: if missing:
errors.append(f"Missing ({len(missing)}): {', '.join(missing[:5])}") errors.append(f"Missing ({len(missing)}): {', '.join(missing[:5])}")
if mismatches: if mismatches: