This is an automated email from the git hooks/post-receive script.
rharwood pushed a change to branch master in repository gssproxy.
from afe4c2f Tolerate NULL pointers in gp_same new 39b0ffd Clarify test suite's logging
The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "adds" were already present in the repository and have only been added to this reference.
Summary of changes: proxy/tests/testlib.py | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-)
This is an automated email from the git hooks/post-receive script.
rharwood pushed a commit to branch master in repository gssproxy.
commit 39b0ffd4a74bc12e2a6f09a8483b4d8063584447 Author: Alexander Scheel ascheel@redhat.com Date: Thu Jun 22 14:13:29 2017 -0400
Clarify test suite's logging
- Use PASS/FAIL instead of OO/XX - Remove SUCCEEDED/FAILED messaging - Show expected return code value on failure
Signed-off-by: Alexander Scheel ascheel@redhat.com [rharwood@redhat.com: changed commit messsage, cleaned up code] Reviewed-by: Robbie Harwood rharwood@redhat.com Merges: #197 --- proxy/tests/testlib.py | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-)
diff --git a/proxy/tests/testlib.py b/proxy/tests/testlib.py index 76dff2d..f9833f7 100755 --- a/proxy/tests/testlib.py +++ b/proxy/tests/testlib.py @@ -26,13 +26,7 @@ try: except ImportError:
def format_key(status, key): - if status == "success": - color = " OO " - elif status == "failure": - color = " XX " - else: - color = " -- " - return "[" + color + key + color + "]" + return "[" + key + "]"
def print_keyed(status, key, text, io): print("%s %s" % (format_key(status, key), text), file=io) @@ -49,13 +43,17 @@ def print_warning(key, text, io=sys.stderr): print_keyed("other", key, text, io)
def print_return(ret, name, expected_failure): - if ((ret == 0 and expected_failure == False) or - (ret != 0 and expected_failure == True)): - print_success("SUCCESS" if ret == 0 else "FAILED", - "%s test returned %s" % (name, str(ret))) + key = "PASS" + expected = "zero" if not expected_failure else "nonzero" + if (ret == 0 and expected_failure) or \ + (ret != 0 and not expected_failure): + key = "FAIL" + if (ret == 0 and not expected_failure) or \ + (ret != 0 and expected_failure): + print_success(key, "%s test returned %s" % (name, str(ret))) else: - print_failure("SUCCESS" if ret == 0 else "FAILED", - "%s test returned %s" % (name, str(ret))) + print_failure(key, "%s test returned %s (expected %s)" % + (name, str(ret), expected))
WRAP_HOSTNAME = "kdc.gssproxy.dev"
gss-proxy@lists.fedorahosted.org