PERFORCE change 178412 for review

Garrett Cooper gcooper at FreeBSD.org
Tue May 18 01:11:10 UTC 2010


http://p4web.freebsd.org/@@178412?ac=10

Change 178412 by gcooper at gcooper-bioshock on 2010/05/18 01:10:59

	Add a bit of documentation and all that fun jazz to the package
	initializer .py file. 

Affected files ...

.. //depot/projects/soc2007/gcooper-pkg_install-enhancements-simplified/tools/regression/lib/libpkg/tests/__init__.py#2 edit

Differences ...

==== //depot/projects/soc2007/gcooper-pkg_install-enhancements-simplified/tools/regression/lib/libpkg/tests/__init__.py#2 (text+ko) ====

@@ -1,10 +1,25 @@
+"""
+Subroutines common to all libpkg tests.
+
+$FreeBSD$
+"""
+
 # NOTE (gcooper): keep this up to date with .../lib/libpkg/Makefile .
-LIBPKG_S = 'libpkg.so.0'
+SHLIB_MAJOR = 0
 
+# The string which represents the copy of libpkg under test.
+LIBPKG_S = 'libpkg.so.%d' % (SHLIB_MAJOR, )
+# The ctypes library handle object for libpkg.
 LIBPKG = None
 
 def setup_package():
-    """ Setup ctypes. """
+    """ Setup libpkg via ctypes. """
     global LIBPKG
+    LIBPKG = ctypes.CDLL(tests.LIBPKG_S)
+
+def teardown_package():
+    """ Teardown libpkg
 
-    LIBPKG = ctypes.CDLL(tests.LIBPKG_S)
+    XXX (gcooper): do something of value here in the future, maybe...
+    """
+    pass


More information about the p4-projects mailing list