Blob Blame History Raw
From 5d7e17ab618d104454a9c23335e7a6045b544b5e Mon Sep 17 00:00:00 2001
From: Jakub Filak <jfilak@redhat.com>
Date: Thu, 12 Mar 2015 18:37:20 +0100
Subject: [PATCH] testsuite: report_python: dump /etc/os-relase to stdout upon
 failures

Signed-off-by: Jakub Filak <jfilak@redhat.com>
---
 tests/report_python.at | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/tests/report_python.at b/tests/report_python.at
index d41fe16..ee797dd 100644
--- a/tests/report_python.at
+++ b/tests/report_python.at
@@ -98,5 +98,11 @@ if report.getVersion_fromOSRELEASE() != report.getVersion():
     print "getVersion('{0}') did not return PRODUCT_VERSION='{1}' from /etc/os-release".format(report.getVersion(), report.getVersion_fromOSRELEASE())
     exit_code += 1
 
+if exit_code != 0:
+    print "++++ /etc/os-release ++++"
+    with open("/etc/os-release") as osrel:
+        sys.stdout.write(osrel.read())
+    print "^^^^ /etc/os-release ^^^^"
+
 sys.exit(exit_code)
 ]])
-- 
2.1.0