svn rev #23768: trunk/src/ tests/ util/

ghudson@MIT.EDU ghudson at MIT.EDU
Fri Mar 5 14:30:33 EST 2010


http://src.mit.edu/fisheye/changelog/krb5/?cs=23768
Commit By: ghudson
Log Message:
Add a message parameter to k5test's success(), to briefly indicate the
scope of test scripts.  Only displayed when verbose is set.



Changed Files:
U   trunk/src/tests/t_anonpkinit.py
U   trunk/src/tests/t_general.py
U   trunk/src/util/k5test.py
Modified: trunk/src/tests/t_anonpkinit.py
===================================================================
--- trunk/src/tests/t_anonpkinit.py	2010-03-05 19:19:42 UTC (rev 23767)
+++ trunk/src/tests/t_anonpkinit.py	2010-03-05 19:30:32 UTC (rev 23768)
@@ -31,4 +31,4 @@
 realm.kinit('@%s' % realm.realm, flags=['-n'])
 realm.klist('WELLKNOWN/ANONYMOUS at WELLKNOWN:ANONYMOUS')
 
-success()
+success('Anonymous PKINIT.')

Modified: trunk/src/tests/t_general.py
===================================================================
--- trunk/src/tests/t_general.py	2010-03-05 19:19:42 UTC (rev 23767)
+++ trunk/src/tests/t_general.py	2010-03-05 19:30:32 UTC (rev 23768)
@@ -11,7 +11,7 @@
     if 'fred\n' not in output:
         fail('Policy not preserved across dump/load.')
 
-    # Check that kinit fails appropriatel with the wrong password.
+    # Check that kinit fails appropriately with the wrong password.
     output = realm.run_as_client([kinit, realm.user_princ], input='wrong\n',
                                  expected_code=1)
     if 'Password incorrect while getting initial credentials' not in output:
@@ -45,4 +45,4 @@
     if 'Key: vno 258,' not in output:
         fail('Expected vno not seen in kadmin.local output')
 
-success()
+success('Dump/load, FAST kinit, kdestroy, kvno wrapping.')

Modified: trunk/src/util/k5test.py
===================================================================
--- trunk/src/util/k5test.py	2010-03-05 19:19:42 UTC (rev 23767)
+++ trunk/src/util/k5test.py	2010-03-05 19:30:32 UTC (rev 23768)
@@ -38,7 +38,7 @@
     realm.run_as_client(['./clientprog', realm.host_princ])
 
     # Inform framework that tests completed successfully.
-    success()
+    success('World peace and cure for cancer.')
 
 By default, the realm will have:
 
@@ -124,6 +124,12 @@
 * fail(message): Display message (plus leading marker and trailing
   newline) and explanatory messages about debugging.
 
+* success(message): Indicate that the test script has completed
+  successfully.  Suppresses the display of explanatory debugging
+  messages in the on-exit handler.  message should briefly summarize
+  the operations tested; it will only be displayed (with leading
+  marker and trailing newline) if the script is running verbosely.
+
 * output(message, force_verbose=False): Place message (without any
   added newline) in testlog, and write it to stdout if running
   verbosely.
@@ -144,10 +150,6 @@
   honored.  If keywords contains krb5_conf and/or kdc_conf fragments,
   they will be merged with the default and per-pass specifications.
 
-* success(): Indicate that the test script has completed successfully.
-  Suppresses the display of explanatory debugging messages in the
-  on-exit handler.
-
 * buildtop: The top of the build directory (absolute path).
 
 * srctop: The top of the source directory (absolute path).
@@ -308,8 +310,9 @@
     sys.exit(1)
 
 
-def success():
+def success(msg):
     global _success
+    output('*** Success: %s\n' % msg)
     _success = True
 
 




More information about the cvs-krb5 mailing list