mod_auth_gssapi/SOURCES/In-tests-show-the-exception-on-failure.patch
2021-10-08 13:48:31 +00:00

44 lines
1.5 KiB
Diff

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