Blame SOURCES/In-tests-show-the-exception-on-failure.patch

7772e2
From 3fc1f9f5d7f5a33900572b419ecdfd2d3672ceca Mon Sep 17 00:00:00 2001
7772e2
From: Robbie Harwood <rharwood@redhat.com>
7772e2
Date: Fri, 21 Dec 2018 10:50:49 -0500
7772e2
Subject: [PATCH] In tests, show the exception on failure
7772e2
7772e2
Otherwise, the user might get nothing at all out, depending on what failed.
7772e2
7772e2
Signed-off-by: Robbie Harwood <rharwood@redhat.com>
7772e2
(cherry picked from commit 881f98ee08f6d8d7a2352ab2f3e8e38845cf8039)
7772e2
(cherry picked from commit 1de81677f1878ea1667b56169fe714d685771b4e)
7772e2
---
7772e2
 tests/magtests.py | 4 +++-
7772e2
 1 file changed, 3 insertions(+), 1 deletion(-)
7772e2
7772e2
diff --git a/tests/magtests.py b/tests/magtests.py
7772e2
index 576e88f..6414503 100755
7772e2
--- a/tests/magtests.py
7772e2
+++ b/tests/magtests.py
7772e2
@@ -8,6 +8,7 @@ import shutil
7772e2
 import signal
7772e2
 import subprocess
7772e2
 import sys
7772e2
+import traceback
7772e2
 
7772e2
 # check that we can import requests (for use in test scripts)
7772e2
 import requests
7772e2
@@ -207,7 +208,6 @@ def setup_test_certs(testdir, testenv, logfile):
7772e2
     with open(opensslcnf, 'w+') as f:
7772e2
         f.write(text)
7772e2
 
7772e2
-    print(pkinit_key)
7772e2
     cmd = subprocess.Popen(["openssl", "genrsa", "-out", pkinit_key,
7772e2
                             "2048"], stdout=logfile,
7772e2
                            stderr=logfile, env=testenv,
7772e2
@@ -718,6 +718,8 @@ if __name__ == '__main__':
7772e2
         errs += test_basic_auth_krb5(testdir, testenv, logfile)
7772e2
 
7772e2
         errs += test_no_negotiate(testdir, testenv, logfile)
7772e2
+    except Exception:
7772e2
+        traceback.print_exc()
7772e2
     finally:
7772e2
         for name in processes:
7772e2
             logfile.write("Killing %s\n" % name)