[Erp5-report] r40104 luke - /erp5/trunk/buildout/tests/assertSoftware.py

nobody at svn.erp5.org nobody at svn.erp5.org
Tue Nov 9 14:09:10 CET 2010


Author: luke
Date: Tue Nov  9 14:09:09 2010
New Revision: 40104

URL: http://svn.erp5.org?rev=40104&view=rev
Log:
 - test memcached linking fully

Modified:
    erp5/trunk/buildout/tests/assertSoftware.py

Modified: erp5/trunk/buildout/tests/assertSoftware.py
URL: http://svn.erp5.org/erp5/trunk/buildout/tests/assertSoftware.py?rev=40104&r1=40103&r2=40104&view=diff
==============================================================================
--- erp5/trunk/buildout/tests/assertSoftware.py [utf8] (original)
+++ erp5/trunk/buildout/tests/assertSoftware.py [utf8] Tue Nov  9 14:09:09 2010
@@ -140,11 +140,6 @@ class AssertLddLibs(unittest.TestCase):
         "'parts/.*/lib/libiulib.so'")
     self.assertEqual(result, 0)
 
-  def test_memcached_libevent(self):
-    """Checks proper liunking to libevent from memcached"""
-    result = os.system("ldd parts/memcached/bin/memcached | grep -q 'parts/li"
-        "bevent/lib/libevent'")
-
 class AssertSoftwareRunable(unittest.TestCase):
   def test_HaProxy(self):
     stdout, stderr = subprocess.Popen(["parts/haproxy/sbin/haproxy", "-v"],
@@ -225,6 +220,20 @@ class AssertMysql50Tritonn(unittest.Test
         "'parts/senna/lib/libsenna.so.0'")
     self.assertEqual(result, 0)
 
+class AssertMemcached(unittest.TestCase):
+  """Tests for built memcached"""
+
+  def test_ld_memcached(self):
+    """Checks proper liunking to libevent from memcached"""
+    elf_dict = readElfAsDict('parts/memcached/bin/memcached')
+    self.assertEqual(sorted(['libpthread', 'libevent-1.4', 'libc']),
+        elf_dict['library_list'])
+    soft_dir = os.path.join(os.path.abspath(os.curdir), 'parts')
+    expected_rpath_list = [os.path.join(soft_dir, software, 'lib') for
+        software in ['libevent']]
+    self.assertEqual(sorted(expected_rpath_list), elf_dict['rpath_list'])
+    self.assertEqual(sorted(expected_rpath_list), elf_dict['runpath_list'])
+
 class AssertApache(unittest.TestCase):
   """Tests for built apache"""
 




More information about the Erp5-report mailing list