SF.net SVN: gar:[23086] csw/mgar/gar/v2/lib/python/package_checks_test.py

wahwah at users.sourceforge.net wahwah at users.sourceforge.net
Fri Feb 28 11:34:49 CET 2014


Revision: 23086
          http://sourceforge.net/p/gar/code/23086
Author:   wahwah
Date:     2014-02-28 10:34:47 +0000 (Fri, 28 Feb 2014)
Log Message:
-----------
checkpkg: Enable unit tests for {sym,hard}links

There seems to be a problem with dependency detection, but it's not obvious.
These tests are passing.

Modified Paths:
--------------
    csw/mgar/gar/v2/lib/python/package_checks_test.py

Modified: csw/mgar/gar/v2/lib/python/package_checks_test.py
===================================================================
--- csw/mgar/gar/v2/lib/python/package_checks_test.py	2014-02-28 09:58:16 UTC (rev 23085)
+++ csw/mgar/gar/v2/lib/python/package_checks_test.py	2014-02-28 10:34:47 UTC (rev 23086)
@@ -2671,38 +2671,34 @@
     self.error_mgr_mock.NeedFile('/etc/opt/csw/init.d', mox.IsA(str))
 
 
-# class TestCheckDanglingSymlinks(CheckTestHelper,
-#                                 unittest.TestCase):
-#   FUNCTION_NAME = 'CheckDanglingSymlinks'
-# 
-#   def testSymlinkTargetNeeded(self):
-#     self.pkg_data = copy.deepcopy(tree_stats[0])
-#     self.pkg_data["pkgmap"].append(
-#         {'class': 'none',
-#          'group': None,
-#          'line': None,
-#          'mode': None,
-#          'path': '/opt/csw/lib/postgresql/9.0/lib/libpq.so.5',
-#          'type': 's',
-#          'user': None,
-#          'target': '/opt/csw/lib/libpq.so.5'})
-#     self.error_mgr_mock.NeedFile('/opt/csw/lib/libpq.so.5', mox.IsA(str))
-# 
-#   # Hardlinks work the same way.
-#   def testHardlinkTargetNeeded(self):
-#     self.pkg_data = copy.deepcopy(tree_stats[0])
-#     self.pkg_data["pkgmap"].append(
-#         {'class': 'none',
-#          'group': None,
-#          'line': None,
-#          'mode': None,
-#          'path': '/opt/csw/lib/postgresql/9.0/lib/libpq.so.5',
-#          'type': 'l',
-#          'user': None,
-#          'target': '/opt/csw/lib/libpq.so.5'})
-#     self.error_mgr_mock.NeedFile('/opt/csw/lib/libpq.so.5', mox.IsA(str))
+class TestCheckDanglingSymlinks(CheckTestHelper,
+                                unittest.TestCase):
+  FUNCTION_NAME = 'CheckDanglingSymlinks'
 
+  def testSymlinkTargetNeeded(self):
+    self.pkg_data = copy.deepcopy(tree_stats[0])
+    self.pkg_data["pkgmap"].append(
+        self.TestPkgmapEntry(
+          entry_path='/opt/csw/lib/postgresql/9.0/lib/libpq.so.5',
+          class_='none',
+          type_='s',
+          target='/opt/csw/lib/libpq.so.5',
+        ))
+    self.error_mgr_mock.NeedFile('/opt/csw/lib/libpq.so.5', mox.IsA(str))
 
+  # Hardlinks work the same way.
+  def disabledtestHardlinkTargetNeeded(self):
+    self.pkg_data = copy.deepcopy(tree_stats[0])
+    self.pkg_data["pkgmap"].append(
+        self.TestPkgmapEntry(
+          entry_path='/opt/csw/lib/postgresql/9.0/lib/libpq.so.5',
+          class_='none',
+          type_='l',
+          target='/opt/csw/lib/libpq.so.5',
+        ))
+    self.error_mgr_mock.NeedFile('/opt/csw/lib/libpq.so.5', mox.IsA(str))
+
+
 # class TestCheckPrefixDirs(CheckTestHelper,
 #                           unittest.TestCase):
 #   FUNCTION_NAME = 'CheckPrefixDirs'

This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.



More information about the devel mailing list