[cedar-backup-svn] SF.net SVN: cedar-backup: [884] cedar-backup2/trunk
Brought to you by:
pronovic
|
From: <pro...@us...> - 2008-03-20 05:10:04
|
Revision: 884
http://cedar-backup.svn.sourceforge.net/cedar-backup/?rev=884&view=rev
Author: pronovic
Date: 2008-03-19 22:10:01 -0700 (Wed, 19 Mar 2008)
Log Message:
-----------
Add diagnostic info to unit test output
Modified Paths:
--------------
cedar-backup2/trunk/Changelog
cedar-backup2/trunk/INSTALL
cedar-backup2/trunk/util/test.py
Modified: cedar-backup2/trunk/Changelog
===================================================================
--- cedar-backup2/trunk/Changelog 2008-03-20 04:25:33 UTC (rev 883)
+++ cedar-backup2/trunk/Changelog 2008-03-20 05:10:01 UTC (rev 884)
@@ -1,5 +1,6 @@
Version 2.16.1 unreleased
+ * Add diagnostic info to the unit test output, and ask for it in INSTALL.
* Change suggested execution index for Capacity extension in manual.
* Clean up filesystem code that deals with file age, and improve unit tests.
- Some platforms apparently cannot set file ages precisely
Modified: cedar-backup2/trunk/INSTALL
===================================================================
--- cedar-backup2/trunk/INSTALL 2008-03-20 04:25:33 UTC (rev 883)
+++ cedar-backup2/trunk/INSTALL 2008-03-20 05:10:01 UTC (rev 884)
@@ -37,5 +37,6 @@
python util/test.py
If any unit test reports a failure on your system, please email me the
-output from the unit test, so I can fix the problem.
-
+output from the unit test, so I can fix the problem. Please make sure
+to include the diagnostic information printed out at the beginning of
+the test run.
Modified: cedar-backup2/trunk/util/test.py
===================================================================
--- cedar-backup2/trunk/util/test.py 2008-03-20 04:25:33 UTC (rev 883)
+++ cedar-backup2/trunk/util/test.py 2008-03-20 05:10:01 UTC (rev 884)
@@ -94,7 +94,37 @@
import logging
import unittest
+##############################
+# printDiagnostics() function
+##############################
+def printDiagnostics():
+ """
+ Print useful diagnostic information to the screen.
+
+ This is the kind of information I usually ask for when I get a bug report.
+ If I print it out here, I shouldn't have to ask for it as often, since
+ people typically email me the test output.
+ """
+ try:
+ windowsversion = sys.getwindowsversion()
+ except AttributeError:
+ windowsversion = "N/A"
+
+ try:
+ uname = os.uname()
+ except AttributeError:
+ uname = "N/A"
+
+ print ""
+ print "Diagnostics:"
+ print " version.....:", sys.version_info
+ print " encoding....: %s" % sys.getfilesystemencoding() or sys.getdefaultencoding()
+ print " platform....: %s" % sys.platform
+ print " win32.......: %s " % windowsversion
+ print " uname.......: %s %s %s" % (uname[0], uname[2], uname[4])
+
+
##################
# main() function
##################
@@ -222,6 +252,9 @@
if args == [] or "capacity" in args: unittests["capacity"] = capacitytests.suite()
if args != []: print "*** Executing specific tests: %s" % unittests.keys()
+ # Print some diagnostic information
+ printDiagnostics()
+
# Create and run the test suite
print ""
suite = unittest.TestSuite(unittests.values())
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|